Saturday, October 15, 2016

Strategy backtest pt.5 - market trend

In the last posts about my backtesting I had a closer look at long trades, short trades and stop losses (check posts with label "backtesting" or links on the bottom of this post). I figured that a "long-only" strategy only worked in bullish markets while "short-only" strategies only worked in bearish markets. So it was important to work on general market trend indicators.


The following chart shows the value of the DAX between 1992 and 2004. It clearly shows that the market was mainly bullish until mid 1997. After a half year of consolidation it became bullish again, before it dropped in 1998. After a bullish period the market turned bearish in 2000 which lasted until 2003. Of course it is easy to make money with long trades in periods of a bullish market. And vice versa it is easy to make money with short trades in periods of a bearish market.



In a first step I focused on short trades in combination with general market trend indication. I wanted to check whether it is possible to make money with short trades in a partially bullish market. Therefore I investigated trading systems that only open trades on decreasing rates when the market is bearish. The market indicators and stop losses however are different:

  1. Fixed stop loss; market considered bearish when 50-day EMA is lower than 100-day EMA
  2. reinforced stop loss; market considered bearish when 50-day EMA is lower than 100-day EMA
  3. trailing stop loss; market considered bearish when 50-day EMA is lower than 100-day EMA
  4. reinforced stop loss; market considered bearish when 50-day EMA is lower than 200-day EMA
  5. reinforced stop loss; market considered bearish when 100-day EMA is lower than 200-day EMA
  6. reinforced stop loss; market considered bearish when rate is lower than 100-day EMA
  7. reinforced stop loss; market considered bearish when rate is lower than 50-day EMA
  8. reinforced stop loss; market considered bearish when RSI is above 50

The following table shows the result of the backtests (click here for an explanation of the performance index DPI):



While the all sell-trade-systems investigated in my last post where lossy, adding a market indicator changed the picture completely. Now 7 out of 8 approaches are profitable (although none was able to beat the DAX). Here are some further findings:

  • Best performing strategy is #7. It beats the DAX in 5 of 13 years. However in the mainly bearish years between 2000-2002 it was less successful as for example #4 or #5.
  • The once again worst and only lossy approach was the one with the trailing stop loss. 
  • EMA and RSI seems to be a good tool to detect market trends. With the boundary conditions of my backtest the EMA-based strategy #7 was only slightly better than #8.
  • Even with a "general market trend detection" it seams to be difficult to make money with sell trades (with a rather simple trading system on a daily data basis). Anyhow, some systems at least didn't open trades in 1996 and 1997 thus avoiding losses (DPI=0)
  • The total number of trades was drastically reduced by adding the market trend detection

My overall conclusion: Market trend detection is essential for a successful trading system. All investigated approaches showed a similar performance, thus demanding further investigation.


***

Related posts:

Evaluating the strength of a trading strategy
First trading strategy backtest


***

Important remark: The results presented above and throughout my blog are no recommendation for your trading! I only share my personal findings and opinions to give ideas and let my followers and copiers know what I am currently working on. I can not guarantee the correctness of my calculations and my presented results. Furthermore past performance is not an indication for future results. Only trade with money you are prepared to lose! 

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