Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Stochastic Crossover with 2x ETFs and low drawdown

I cloned an Stochastic Crossover algorithm and fine tuned it with a basket of four 2x ETFs.

The main intention was to
- buy at absolute lows (whenever there is a crossover under 10)
- sell whenever there is a crossover over 80 OR the position has a 10% loss

So far the strategy looks great. Very few trades with low drawdown ( < 10% ) but still matches or beats the S&P.

Since there a long periods with no trades, I was thinking that we can hold some other ETF's (like SPLV,SHY or SPY itself) in the interim. Basically buy SPY as long as the 2x ETF stoch is over 25 and sell it whenever the 2x ETF stoch is less than 25 so that we prepare to buy the 2x ETF if it meets the conditions above.

Can someone collaborate & help program those conditions and see if it increases the returns and still keeps the drawdowns low.

3 responses

I replaced the double leveraged ETFs with single leveraged ETFs double leveraged (e.g. instead of SSO, use 2x SPY) since Quantopian doesn't allow double leveraged ETFs.

I also replaced cash with IEF and ran a longer backtest. Your algorithm doesn't really perform at all well until 2010.

PvR is only 28%. Leverage over 5.
It started with $10K, spent an additional ~$48K, and wound up with $26,350. The benchmark happened to be 100% over that time period. PvR is a profit for the amount risked / put on the table ($58K) returns calculation, the rubber-meets-the-road amount an investor would care about. In some cases, we are our own investor.

The original code was daily instead of minute, different time period as noted, and didn't have the margin problem much.

Thank you Lucas and garyha

You guys bought a whole new perspective to my initial algorithm. Appreciate your help.