Interactive illustrations to Chapter 3 of the book Market Timing with Moving Averages: The Anatomy and Performance of Trading Rules by Valeriy Zakamulin
Chapter 3 presents a detailed review of all ordinary types of moving averages, as well as some exotic types of moving averages. These exotic moving averages include moving averages of moving averages and mixed moving averages with less average lag time. For the majority of moving averages, this chapter computes the closed-form solutions for the average lag time and smoothness. This chapter also demonstrates that the average lag time of a moving average can easily be manipulated; therefore the notion of the average lag time has very little to do with the delay time in the identification of turning points in a price trend.
In these interactive illustrations the user can define two types of moving averages, their averaging periods, and then compare their:
Average lag times
Smoothness
Price weighting functions
Price-change weighting functions
Values computed using monthly closing prices of the S&P 500 index
Reactions to a change in an artificial stock price trend
Notice the following properties of moving averages (presented in Chapter 2):
A price-change weighting function always overweights the most recent price changes;
When the prices are in uptrend, the moving average tends to be below the last closing price;
When the prices are in downtrend, the moving average tends to be above the last closing price;
The longer the average lag time, the larger the expected discrepancy between the last closing price and the value of a moving average;
When prices are steadily increasing or decreasing, all moving averages with the same average lag time move largely together as a single moving average regardless of the shapes of their weighting functions and the sizes of their averaging windows;
When prices increase or decrease steadily, both the price and all moving averages (with different average lag times) move parallel in a graph;
Even if the average lag time of a moving average is zero or negative, a turning point in a price trend is identified with a delay
NB: The average lag times and smoothness of each moving average are computed using a numerical method and the weights that are shown in the graph that plots the price weighting function. The other weights, which are not plotted in the graph, are not considered in the computations. Therefore for some moving averages the computed average lag time and smoothness are a bit less than their actual values
The abbreviations for the moving averages:
Abbreviation | Moving Average Type |
---|---|
SMA | Simple Moving Average |
LMA | Linear Moving Average |
EMA | Exponential Moving Average |
SMASMA | Triangular Moving Average (SMA smoothed by another SMA) |
EMAEMA | Double exponential smoothing (EMA smoothed by another EMA) |
EMAEMAEMA | Triple exponential smoothing |
DEMA | Double Exponential Moving Average of Mulloy |
TEMA | Triple Exponential Moving Average of Mulloy |
ZLEMA | Zero Lag Exponential Moving Average of Ehlers and Way |
HMA | Hull Moving Average |