Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Mean Reversion Strategy for Stock Volume (Part 1)

This algorithm is an algorithm that is loosely based on a paper I have read by Princeton University’s own John Campbell. I am personally very interested in coming up with general relationships between stock price and volume, and using these to predict returns. I am also interested in mean-reversion and arbitrage-related signals because there seems to be a lack of research regarding contrarian trading strategies (and high risk trading in general).

In John Campbell’s paper, found here: http://www.nber.org/papers/w4193.pdf, Campbell cites the following: “the model implies that a stock price decline on a high-volume day is more likely than a stock price decline on a low-volume day to be associated with an increase in the expected stock return.”

I took this result and tried to find related results by looking only at the relationship between volume and price moving averages. I found using this algorithm, that the best results are found when shorting securities with higher volume/mavg than price/mavg and taking the long position when the opposite is true. The algorithm I have written is very simple in that respect because I am always buying or selling 20 stocks on any given day.

I wondering if there are easy ways to improve this trading signal. Currently, it only seems to be making returns after the halfway point in the backtesting period (this seems to be the case across all dollar-volume stock universes).

Thanks!