2015issue C0316-21
Linearity, commutation, and ratio smoothing in moving averages
Simple and exponential moving averages treat a scaled combination of two series the same way before or after averaging, and stacked layers commute. Repeated averaging spreads age-weighting into a wider, more symmetric bell, and the two ratio-smoothing routes are different operators.
- For a constant scale factor, both a simple moving average and an exponential moving average treat a linear combination of two series as the same linear combination of the two separately averaged series.
- When simple and exponential moving averages are stacked, the order of the layers does not change the final series, including a five-period exponential average of a ten-period simple average of a fifteen-period simple average of closes.
- Repeated averaging does not match a single longer average. Percentage weights by age form a spreading, more symmetric bell that shifts toward older observations and covers a wider span.
- For a positive denominator, averaging the numerator and denominator separately and then dividing is not the same as averaging the raw ratio, and the separately averaged quotient puts larger weight on bars where the denominator is larger.
A simple moving average is an equal-weight average of the most recent observations of a series. An exponential moving average is a recursive average that down-weights older observations with a fixed decay.
Linearity of the two averages
Linearity means that scaling and adding series before averaging equals averaging each series and then scaling and adding. For a constant scale factor, both a simple moving average and an exponential moving average treat a linear combination of two series as the same linear combination of the two separately averaged series.
Typical price is the bar midpoint formed from high, low, and close. Averaging a typical-price series built from high, low, and close is interchangeable with averaging those three series first and then taking their mean.
Order of stacked layers
Successive smoothing means applying more than one moving average, of any mix of types and lengths, to the same series. When simple and exponential moving averages are stacked, the order of the layers does not change the final series.
A five-period exponential average of a ten-period simple average of a fifteen-period simple average of closes equals the same three averages applied in reverse order.
Age-weighting after successive smoothing
Age-weighting is the share of the result attributed to each past observation, ordered by how old that observation is. Repeated averaging produces a smoother series whose percentage weights by age form a spreading, more symmetric bell rather than matching a single longer average.
Each extra average shifts weight from newer observations toward older ones, so the bell of significant weights moves toward older ages and covers a wider span. A mixed stack of simple and exponential averages still yields the same bell-shaped age-weighting pattern as stacks of one type alone.
Ratio smoothing
Ratio smoothing means smoothing a quotient either by averaging the quotient itself or by averaging the numerator and denominator separately and then dividing. For a positive denominator series, averaging the numerator and denominator separately and then dividing is not the same operator as averaging the raw ratio.
The separately averaged quotient is itself a weighted average of the raw ratio values, with larger weight on bars where the denominator is larger.
All readings on this track · 15 readings
- 1990Building a percent-difference moving-average oscillator
- 1991Ease of movement oscillator construction
- 1993A twelve-month moving-average filter for inflation direction
- 1993Constructing two-endpoint JSA moving averages
- 1999Centered moving averages for trend construction
- 2000Constructing a slope-corrected moving average
- 2000Lookback length as a construction check for the modified moving average
- 2001Smoothing balance of market power with a moving average
- 2005Three-state moving-average directional breakout construction
- 2005Constructing a move-adjusted moving average
- 2005Moving-average construction: windows, weights and stops
- 2008Constructing stacked moving-average filters
- 2011Constructing percentage-offset moving-average bands
- 2015Linearity, commutation, and ratio smoothing in moving averages
- 2019Constructing a 50-200 sma-channel for swing entries and exits