Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Fundamental WMA Crossover With 2 Metrics

This is based on the fundamental moving average crossover algorithm I posted earlier. This version uses two fundamental metrics and increases the time period for the longer-term moving average to three years. It also uses a weighted moving average instead of a simple moving average. The variable names were also changed so different fundamental metrics can be used without either rewriting lots of code or using variable names that don't make sense. Some of the quarter lengths in the original version of the algorithm were incorrect and they were updated as well.

3 responses

It works a little bit better with weekly rebalancing. I also added an if-else statement to prevent it from crashing if the filter doesn't return any stocks.

Anyone know how to create a long/short version of this algorithm?

This is the short-only version of the algorithm. It doesn't work very well in a bull market but it could outperform in a bear market.