How many times have I read about moving average crossover signals? How many times have I been asked what are the best two averages to use? More to the point, how much money are traders prepared to lose using this strategy? OK, I vented some frustration. Let me explain why I feel so negatively about moving average crossover signals. I put together a very basic system which bought at the close when the shorter average crossed above the longer and sold at the close when the shorter average crossed below the longer. I could optimize this and come up with a magical result that would have traders drooling and anticipating which sports car they would buy with the profits. However, here’s the first problem. Optimization really means very little. I’m sure you all know that we can all claim 20:20 hindsight and that reality is that we have to trade without the benefit of knowing how moving averages will optimize before data has developed over a period. OK, that’s easy to understand but let’s just look at exactly what happens. What I did was take a daily USDJPY chart from 1995 to 2006. Each year I optimized the data and then applied the resultant optimized parameters to the following year. I optimized the short average for periods between 3 and 15 and the longer average between 15 and 40. I know this doesn’t really provide the best sample period for an optimization but I can assure you that it does also represent the same testing methods using a longer testing period. Here are the results: Year | Optimized P&L | Avg 1 | Avg 2 | Applied to: | Profit | 1995 | 35.77 | 15 | 21 | 1996 | 0.31 | 1996 | 6.50 | 9 | 16 | 1997 | -4.83 | 1997 | 18.01 | 15 | 17 | 1998 | -12.09 | 1998 | 33.73 | 10 | 16 | 1999 | 2.77 | 1999 | 12.24 | 5 | 20 | 2000 | 3.78 | 2000 | 12.99 | 13 | 18 | 2001 | 4.31 | 2001 | 19.78 | 11 | 37 | 2002 | -9.59 | 2002 | 12.32 | 14 | 21 | 2003 | 0.37 | 2003 | 6.70 | 3 | 17 | 2004 | 3.11 | 2004 | 20.01 | 6 | 17 | 2005 | 0.18 | 2005 | 16.03 | 15 | 19 | 2006 | -10.23 | 2006 | 2.00 | 8 | 18 | 2007 | 10.67 | Totals | 196.08 | | | | -16.78 |
The column at the very left is the year I optimized and is followed by the number of points profit and the optimum moving average lengths. I then applied the strategy using the optimum lengths to the following year’s data and recorded the profit. As you can see the actual results after applying the optimum lengths to the following year are really quite disastrous! The total of the optimized results and the actual trading results actually turn a very strong profit into a loss… To highlight why this is, look at the optimum moving average periods running from year to year. The shorter average ranges from a 3 period average in 2003 to a 15 period average seen three times in 1995, 1997 and 2005. The longer moving average ranges from a 16 period average in 1996 & 1998 to a 37 period average in 2001. There is no pattern to the numbers and no way of knowing quite what it will turn out to be the following year. This means that the stability of the parameters is very poor. To explain what I mean by this, as an example, I took 1999 which had an optimized profit of 12.24. I optimized only this average and not both and placed the results in a simple bar chart: 
You can see that only 4 period actually made any profit at all. What is more, the optimum period was more than twice the next highest profit. This means that a small change in market patterns will cause a significant drop in profitability. When you consider in more than half the years the optimum parameter was above 10 it makes the selection of what parameter to use totally impossible to anticipate. Is there any way to get around this problem? Well, as far as I have tested, not with moving averages. It is possible to add take profit and stop loss but frankly they are optimized as well and the more variables you add to the system the more unstable it gets. With systems based on other entry & exit criteria all you can do is optimize and walk forward as I have suggested above. A better period would be to optimize for 5 years and apply the results for the following 6 months. When looking at the results make sure that the optimum parameters do not suffer volatile ups and downs around the optimum. This provides a little more confidence that while you may not get the best result, you won’t get a really bad one either. Good luck Ian Copsey |