Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Portfolios of Stocks Based on Volume/Moving Average Ratio

This algorithm discusses another idea centered around change in stock volume. A potential issue with the first algorithm and algorithms like it is that we are buying a set amount of stock instead of applying a weight based on our metric specified in our algorithm. In this algorithm, we overweigh stocks in our portfolio that have high volume / volume mavg ratio. This momentum strategy in unique in the sense that we are allocating more cash towards ‘better performing’ stocks. Then we take the log of this to scale our portfolio so that mavgs of .5 and 2 are equidistant from the ratio of 1 (which we are indifferent about). When we use this weighting scheme, we get the results shown above.

Although this algorithm doesn't do exceptionally well with respect to the standard metrics: high return, sharpe ratio, and low drawdown, the results seem promising for future research. Currently, the signal is very simple and based on an elementary weighting scheme, but with advanced tools like machine learning, the algorithm could be refined.