2003issue C121-2
Weighting recipes inside one moving-average lookback
A simple moving average, an exponential average, and a triangular average share a fixed lookback of ordered observations and differ in how they weight the bars inside that window. This note records each construction so the three can be compared on the same series.
- A simple moving average is a rolling mean over a fixed lookback, updated by adding the newest bar and dropping the oldest.
- An exponential average assigns greater weight to newer observations to reduce lag; a triangular average is double-smoothed and places the greatest weight in the middle of the lookback.
- The same averaging construction can be applied to hourly, daily, weekly, or five-minute bars, not only to daily closes.
- Editorial view: once the window, the update rule, and where the mass sits inside that window are written down, simple, exponential, and triangular filters become comparable constructions on the same series.
A lookback and an update rule
A simple moving average is built as a rolling mean of a fixed lookback of observations, adding the newest value and dropping the oldest at each new bar. In that equal-weight construction, each observation in the lookback contributes the same amount to the current value.
A 10-period simple average of closes is the mean of the most recent 10 closing values, then rolled forward as each new close arrives. The same averaging construction can be applied to hourly, daily, weekly, or five-minute bars, not only to daily closes.
Where the weight sits inside the window
An exponential moving average assigns greater weight to more recent observations than to older ones, which is presented as a way to reduce lag relative to a simple moving average.
A linearly weighted moving average multiplies each bar in the window by its ordinal rank and divides by the sum of those ranks. In that linear-weight construction, the rank multipliers for a 10-bar window sum to 55 and those for a 20-bar window sum to 210.
A triangular moving average is constructed by applying a moving average to another moving average, producing a double-smoothed series. Unlike an exponential average that emphasizes the newest data, a triangular moving average places the greatest weight on the middle of the lookback window.
Explicit constructions that can be tested
Because the construction is explicit and numeric, moving averages are described as readily quantified and tested building blocks for mechanical trend-following systems.
A related reading list flags further construction variants, including variable-length, endpoint, and optimized moving averages.
All readings on this track · 8 readings
- 1989Constructing lag-matched triangular moving averages
- 1990Lag-aligned MACD from triangular moving averages
- 1990Constructing triangular moving average weights
- 1990Constructing a lag-aligned triangular MACD
- 1998Paired tests for moving-average lag and smoothness
- 1999Fixed-lag construction of moving-average smoothers
- 2003Weighting recipes inside one moving-average lookback
- 2010Assembling a smoothed percent-b oscillator from Heikin-Ashi and stacked averages