A comparison between moving averages.
Moving averages are used in Technical Analysis of the Forex or Stock Market to determine the direction of the trend. Less sensitive averages are used for establishing longer term trends. Conversely, shorter term averages indicate the direction of the shorter trend. Popular values for technicians are the 10, 20 and 50 day Simple Moving Averages (SMA).
This short article will explore the behavior of different moving averages when using a sinusoidal wave as input. Noise will be introduced to study how fast the indicators respond and how long they remember the anomalous values.
This graph shows the behavior of different averages when calculated using a sinusoidal wave oscillating from -1 to +1. Noise has been introduced to the sine wave at the first positive peak.
The averages plotted are:
The front weighted Modified Average indicator has the most lag of them all. It also does not reach the +1 and -1 extremes of the input signal. The 5 period and 3 periods moving averages track closer, but still show some lag.
The Fast Moving Average tracks closer to the input wave than the other averages and its two components. It reacts faster to the noise introduced in the signal and returns to tracking the sine wave sooner than the other averages. This simple indicator returns values similar to other fast moving averages such as the Hull Moving Average (HMA), or the Jurik Moving Average (JMA).
The C# .NET source code for the Simple Moving Average, Fast Moving Average and Hull Moving Average are included in the 4XLab.NET platform. The graph for this article has been plotted using Excel. The spreadsheet is available for download as an attachment. The implementation of the Jurik Moving Average is available through Jurik's Research website http://www.jurikres.com