Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Tracking the S&P 500 using the Russell 2000

This algorithm seeks the viability of using the cyclical nature of the market and the Russell 2000 to go either long or short in S&P-tracking ETF's. This addresses the common question of whether the market trends can be predicted by any other trends.

The algorithm is simple. It purchases a basket of unleveraged and 2X ETFs that either track the S&P 500 or the inverse of the S&P 500. The algorithm determines the ratio of 2X to unleveraged ETFs using the difference in the value of the Russell 2000 to the moving average.

Please let me know if you have any suggestions or improvements for my algorithm!

4 responses

What does it look like if you backtest from prior to 2006?

Why does it go crazy when you switch to minute instead of daily data?

My compliments on creative use of leveraged ETFs.
Thanks for sharing this algorithm.

Some comments:
1. Two variables are not used.

  1. Backtesting cloned algorithm using daily interval I noticed shorter periods,I obtained 132% RETURN WHEN ALGORITHM RUN ON THE PERIOD 3 Feb 2014 to 26 Dec 2014. The performance seems to depend on the period selected. When Jan 2014 time period is included, the performance is greatly reduced.

Thanks again for sharing your algorithm.

It would appear that due to recent market paradigm shifts those algorithms that do not take into account radical oscillations of doubt and euphoria, deep plunges and equally steep recoveries, will suffer from severe drawdowns. This particular algorithm, being purely technical, may benefit from more conservative parameters, alternative peak detectors or risk reduction techniques. The Russell 2000 seems to have become more erratic in these last few years while the general market has retained its secular bull trend. But then again, perhaps small caps are to see their return to trend in 2015. I wonder what would happen if one used the age old 'DOW transports lead the market' adage and swapped in some representation of the transports, perhaps IYT?