Back to Community
SPY 200MA Long Short, Low Frequency

This is a little algorithm I wrote based off the popular SPY 200MA trading strategy. I am fairly happy with returns and have no problems with liquidity. I would like help however reducing the draw down, but I am having trouble figuring out how to do that without increasing the frequency at which the algorithm trades, as I have noticed that returns take a hit at higher frequencies for my algorithm. Draw down can be reduced by lowering the target percent ordered in the trade function of the algorithm, but at the same time returns are also lowered. Greatest draw downs occur when the market takes a hit and the algorithm isn't scheduled to trade during the market hit. Any help is greatly appreciated. Also, I am new to this so I apologize if there is any glaring errors or oversights with the algorithm.

Clone Algorithm
15
Loading...
Backtest from to with initial capital
Total Returns
--
Alpha
--
Beta
--
Sharpe
--
Sortino
--
Max Drawdown
--
Benchmark Returns
--
Volatility
--
Returns 1 Month 3 Month 6 Month 12 Month
Alpha 1 Month 3 Month 6 Month 12 Month
Beta 1 Month 3 Month 6 Month 12 Month
Sharpe 1 Month 3 Month 6 Month 12 Month
Sortino 1 Month 3 Month 6 Month 12 Month
Volatility 1 Month 3 Month 6 Month 12 Month
Max Drawdown 1 Month 3 Month 6 Month 12 Month
# Backtest ID: 59a5bd5b25ea2c50f0e8a78a
There was a runtime error.
1 response

Update: Added a function called switch which checks to see if I should switch short or long positions based on returns half way through the month

Clone Algorithm
4
Loading...
Backtest from to with initial capital
Total Returns
--
Alpha
--
Beta
--
Sharpe
--
Sortino
--
Max Drawdown
--
Benchmark Returns
--
Volatility
--
Returns 1 Month 3 Month 6 Month 12 Month
Alpha 1 Month 3 Month 6 Month 12 Month
Beta 1 Month 3 Month 6 Month 12 Month
Sharpe 1 Month 3 Month 6 Month 12 Month
Sortino 1 Month 3 Month 6 Month 12 Month
Volatility 1 Month 3 Month 6 Month 12 Month
Max Drawdown 1 Month 3 Month 6 Month 12 Month
# Backtest ID: 59bb2fb7b51e1a5053142412
There was a runtime error.