Back to Community
Buy Red Candle, Hold 12 weeks, Sell (Stocks and Commodities, April 2017, pg 18)

This month in Stocks and Commodities magazine (The title of the article is Playing with Numbers by Domenico D'Errico) an algorithm for trading was presented that:
1. On a weekly basis
2. If a red candle forms (close - open < 0), buy security
3. Sell after 12 weeks

I made one very minor changes:
1. If leverage > desired_leverage sell to bring to desired_leverage

Because QT doesn't have GTC orders there is a lot of code that pollutes meaning that needs to be written.
1. If partial fill reissue order for remaining shares
2. If failed order try to reissue it

Enhancements
1. More than one stock is allowed to be traded. Statically allocated to 1/number_of_stocks as a percentage of portfolio.

This algorithm for SPY from 2002 thru 3/21/2017 outperforms the SPY. The drawdown is still too high to be useful but it is an interesting concept.

Clone Algorithm
10
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: 58d30e3f37888b177c000f98
There was a runtime error.