Possible modifications to TD_Sequential_Base strategy

I’ve tried making some changes to the public script TD_Sequential_Base strategy. Here are some ideas I’ve tried:

1.Adding a second step for buy signal recognition.
The base strategy is aggressive in the sense that it would generate a buy signal so long as there are nine consecutive bars with new low close price after a bear flip. The book DeMark Indicators introduced another step after the base setup, suggesting counting 13 more bars whose close prices are lower than the lows of two bars earlier, and waiting for a bull flip before entering buy position. I tried adding this step to the original strategy to see if it could improve the trade win percentage.
2.Dynamic stop loss and stop profit.
Instead of choosing constant values for stop profit and stop loss, I set these values to be dependent on the price range of the nine consecutive bars and the bid-ask spread.
The base strategy sets the position to 100 whenever a buy signal occurs. I tried using trade volume to determine the position. For example, the previous askvol over bidvol is an indicator of the chance that the stock price may go up, so the position size could be set higher when this ratio is high, aiming to loss.

I used 2017 first-quarter data to backtest the modified strategy, and got a Sharpe ratio of 2.02 and a maximum drawdown of -0.69%. The stop loss is set to be twice the level of stop profit.

Future improvements: the PnL varies a lot in different backtesting period. Using the second quarter of 2016 data, the Sharpe ratio is 1.30 but the daily returns become more volatile. If second-half year of 2015 data is used, the PnL becomes negative.


Sign In or Register to comment.