Measuring The 'Edge' Provided By Comparing Current Price With Past Price
Past Price Vs. Simple Moving Average Price,
In the previous article on measuring the edge provided by a trend indicator we looked at how big an edge was provided by a simple moving average. In this article I am going to examine how effective using the raw price data is. Instead of determining the trend by comparing the closing price to the average closing price over x number of days (the simple moving average price), I'll be comparing the closing price to the closing price x number of days ago. This will help us to determine if averaging the price with a simple moving average is actually a useful filter or an unwelcome price distortion when we're trying to determine the direction of the long-term trend.
Quantifying The Edge Produced By Past Price,
I will attempt to quantify the 'edge' provided by trading in the direction of the trend as measured by comparing the closing price to the closing price x number of days ago using exactly the same method as I used to try and measure the edge gained from following the trend as read from a simple moving average. The method is as follows: If the price closes higher than the price closed x number of days ago the trend is said to be up, if the price closed lower than the price closed x number of days ago the trend is said to be down. During an up trend, if the next day's price closes higher than today's closing price the movement is recorded as a positive, and negative if tomorrow's price closes lower than today's price during an up trend. Likewise, during a down trend, if the next day's price closes lower than today's closing price the movement is recorded as a positive, and negative if tomorrow's price closes higher than today's price during a down trend. Or, in pseudo code -
If Today's_Close > Past_Closing_Price AND Tomorrow's_Close > Today's_Close THEN record the number of pips between today's and tomorrow's closing price as a positive movement.
If Today's_Close > Past_Closing_Price AND Tomorrow's_Close < Today's_Close THEN record the number of pips between today's and tomorrow's closing price as a negative movement.
If Today's_Close < Past_Closing_Price AND Tomorrow's_Close < Today's_Close THEN record the number of pips between today's and tomorrow's closing price as a positive movement.
If Today's_Close < Past_Closing_Price AND Tomorrow's_Close > Today's_Close THEN record the number of pips between today's and tomorrow's closing price as a negative movement.
I will then total the number of pips moved with and against the direction of the trend from the start of 2001 until the 10th of March 2010 on the EURUSD currency pair... The results are as follows -
Time In Past
Number Of Favourable Pips
Number Of Unfavourable Pips
Ratio
10 days
70,674.4
71,227.9
0.9922 to 1
20 days
72,997.6
69,051.7
1.0571 to 1
30 days
73,396.2
68,784.1
1.0670 to 1
40 days
73,549.8
68,634.5
1.0716 to 1
50 days
71,749.3
70,457.0
1.0183 to 1
60 days
71,398.4
70,794.9
1.0085 to 1
70 days
74,032.4
68,120.9
1.0868 to 1
80 days
75,757.3
66,386.0
1.1412 to 1
90 days
74,236.7
67,963.6
1.0923 to 1
100 days
75,056.6
67,046.7
1.1195 to 1
120 days
73,167.3
69,041.0
1.0598 to 1
140 days
72,767.9
69,368.4
1.0490 to 1
160 days
71,417.5
70,771.8
1.0091 to 1
Comparing the closing price to a previous closing price produced a positive edge on almost all time frames and the edge gained from using a look back period of 80 days was very significant.
Here were the results when we used a simple moving average as a trend filter -
Moving Average Length
Number Of Favourable Pips
Number Of Unfavourable Pips
Ratio
10-day SMA
69,794.2
72,414.1
0.9638 to 1
20-day SMA
70,092.7
72,115.6
0.9719 to 1
30-day SMA
71,366.9
70,841.4
1.0074 to 1
40-day SMA
74,129.2
68,079.1
1.0889 to 1
50-day SMA
73,950.4
68,257.9
1.0834 to 1
100-day SMA
73,340.9
68,867.4
1.0650 to 1
200-day SMA
72,469.4
69,738.9
1.0391 to 1
For the EURUSD currency pair at least, the results are clear; moving averages of about 40 – 50 days have worked best in the past.
Notice how using a look back period produces no real 'negative' edge (i.e. no 'edge ratio' significantly below 1) and it's best result gives us a far bigger edge than the best moving average result. But the moving average has a fairly smooth curve up towards it's optimal setting followed by a smooth and less steep curve down from it's optimal value.
Past Price Vs. Simple Moving Average Price - My conclusion,
I feel that comparing price to past price worked better as trend indicator than comparing the price to a moving average price. Firstly, on no time frame did using past price produce a negative expectancy; although the results of the 10-day and 160-day look back times were so close to zero that we could say that using a very short or a very long time as a look back period produces no significant edge. The moving averages produced a negative expectancy on several time frames. Secondly, the edge provided by the best time frames when we were comparing the current price to the past price was far more significant than the edge produced by the best moving average time.
However, the moving average method did have one advantage in that it provided a smooth curve around it optimal value, whilst look back periods of similar times produced wildly different results.
My conclusion is that while comparing price to past price is generally a more effective method of determining the direction of the trend than comparing the price to moving average price, a moving average is more than just an unhelpful distortion. The 'bell curve' around the moving average's optimal value suggests to me that systems that use a moving average as a trend filter may be more robust than systems that compare the current price to a previous price x number of days ago as a trend filter. It suggests to me that systems that use a suitable moving average as a trend filter are likely to be robust and perform well most of the time, whilst systems that look back at a previous price are likely to perform either very well, or not well at all - although the 'edge' provided by their trend filters is never likely to be negative.