Thanks for your reply and for the backtrader project. I should have written that the strategy is to own the N most oversold stocks each day. Then the exit criterion is to sell the stock when it is no longer one of those N most oversold.
Meh. So what if they do? There's nothing new under the sun. I read an article in SeekingAlpha that gets my interest, code it up, backtest and find it interesting. All it does for me is simplify executing a system. No magical secrets involved.
I disagree. And obviously it's not true that there is nothing new or else they wouldn't be paying random people from the internet to use their trading strategies. They would just use all the already known strategies.
Hmm...moving averages are momentum signal, not mean reversion. Check out this website, this website and this website for ideas.
Thanks for the links, but buying/selling a stock when it is below/above a moving average is a plausible mean-reversion strategy. Change the sign of the position of a trend-following system, and you have a mean-reversion system. The question is whether it will work.
Actually, it's only plausible if you could take a position in the moving average itself as a trading instrument. Then you could buy/sell the primary trading instrument and take an offsetting position in the moving average. Sooner or later, they will converge and you will have your reversion strategy. Of course, this is impossible since you cannot trade the moving average itself. Buying a stock because it is well below its moving average is an oversold strategy, not a mean-reversion strategy. Oversold means you think it will bounce back, so you take a long position. There is no mean reversion involved. Another trader may look at the same situation and take the opposite view ... that the weakness of the stock is a breakout to the short side.
A practical definition of mean-reversion : Trading in the direction toward a mean. That mean is relative though, since it may depend on conditions like the timeframe and period/method used to calculate it. So two traders trading mean-reversion could actually be in opposite directions of one another, even take the opposite side of the other's trade!