Build A Better Moving Average by Richard D. Ahrens
Smooth Those Spikes
Is it possible to have a moving average that minimizes
zigzags and powers through the occasional price spike?
Find out here.
Smoothing market price data sounds like a simple
concept, yet it is extremely difficult to do. We apply
moving averages to a time series to reduce noise and
reveal the underlying trend with as little delay as possible. As
such, there are three main elements we have to look at:
In digital signal processing (DSP), this is also
referred to as the signal.
* Noise—Gyrations inherent in any complex system.
* Delay—How long we have to wait to get an answer.
Moving averages essentially act as low-pass filters, that is, they
are supposed to smooth away high-frequency noise and leave
the lower-frequency signal for us to view. The problem is that large price changes can overwhelm the smoothing
ability of short-term averages, and long-term averages
introduce so much delay that the answers are
of limited use by the time we get them.
Is there an optimal average?
A 200-day simple moving average (SMA) does a
wonderful job of getting rid of noise, but you have
to wait 100 days to get an answer. An 11-day simple
moving average gets you an answer with only five days
of delay, but doesn’t do much to quiet the noise. You
can see why it’s difficult to smooth price data!
Averages were originally intended to work with
reasonably well-behaved data. Teachers of mathematics
and statistics generally warn their students
that using an average isn’t useful for every kind of
data. An average always gives you an answer, but
if the data is badly behaved, the answer may not be
Market price data is particularly problematic because
it is not normally distributed. Discontinuities
(sudden jumps in price) happen frequently, and the
sudden jumps in price tend to overwhelm moving
averages and cause unwanted distortions in their
results. Market price data follows a power law distribution,
also known as the Laplace double exponential distribution,
which means it will have frequent, large jumps (Figure 1).
This was documented as early as 1915 by Wesley Claire
Mitchell and later by Benoit Mandelbrot in the 1960s. These
price discontinuities constitute a special sort of noise, and
from time to time it can be a significant issue. Sometimes
price will jump, leaving a sizeable gap, and then it gaps back
to the previous level a few days later. Other times, it will gap
up or down and simply stay at the new level.