Sunday, September 25, 2016

strategy backtest pt.2

In the last weeks I worked hard on developing a suitable backtesting tool (see posts for version 1 and version 2). In order to compare different strategies I developed a performance index that I described in this former post. Now it is time to investigate strategies and present first results.


Right now my backtesting tool contains the following indicators and trading options:
  • MACD, Stochastics, Moving average (simple and exponential), Bollinger bands, and RSI
  • sell and buy positions with three stop loss options:
    • fixed stop loss and take profit
    • reset stop loss and take profit if signal for running trade is repeated (e.g. "buy" signal when buy trade is running)
    • trailing stop loss with fixed take profit
Current limitations are no leverage and only one trade at a time.

When working with the above possibilities there are already a lot of possible options for trading systems. In a first step I want to focus on long trades (buy positions) that are only closed on fixed stop loss (2%) and take profits (10%) and opened when indicators give an according signal:
  1. MACD breaks its signal line
  2. Stochastics %K-line breaks the %D-line
  3. Rate is within a 5% range to the lower Bollinger band
  4. RSI rises above 30
  5. 50 days moving average breaks 200 day moving average
  6. DAX breaks the 200 day moving average
  7. closing rate is higher than the day before
I applied this strategy to the DAX (ger30) between 1992 and 2004 and calculated the DPI for each year and the overall time period. The results are summarized in the following table. For easier reading I marked the DPIs in different colors:
  DPI <-1: blue
  -1<DPI<0: dark red
  0<DPI<1: orange
  1<DPI: green
For an explanation of the DPI please refer to this post.


The results demonstrate, that none of the above described strategy is able to beat the simple buy-and-hold strategy. Here are some further findings:
  • Best results are obtained with the Stochastics-based strategy #2, while strategies #3 and #5 are basically burning money. 
  • Different strategies perform differently over the years. For example strategy #5 has only one profitable year, which is 2004. In this year the strategy is the second best of all investigated strategies. Except #5 every strategy has at least one year with a DPI>1 (better than buy-and-hold).
  • All strategies performed better than buy-and-hold in 2002, where the DAX crashed and lost more than 40% of its value. Without further investigation I guess it is due to low amount of "buy"-signals and a tight stop loss.
  • The number of trades does not correlate to the performance of the strategy: While strategy #7 needs 235 trades for a DPI of 0,6, strategy #1 achieves the same result with only 92 trades. (if I had added the buy-and-hold strategy it would show 1 trade with the best result).
My overall conclusion: There is a lot of improvement necessary to achieve a DPI>1. It probably needs an intelligent combination of several indicators and a better stop-loss/take-profit approach.

1 comment:

  1. Am short of words for the amazing profit you helped me earn in just a week with binary options strategy am so sorry I doubted at the beginning, I invested $200 and earn $2,500 in just one week, and kept on investing more, today I am financially successful, you can contact him via email: tdameritrade077@gmail.com
    Via whatsapp: (+12166263236)
    I advice you shouldn't hesitate. He's great.

    ReplyDelete