Skip to main content
Track Weighted moving average
11 / 20
Library

1993issue C121-5

Constructing a general weighted moving average from one exponent

A general weighted moving average is assembled from an ordered price series, a lookback length, and one exponent that shapes the weights. Changing only that exponent moves the same smoother from a simple average to a more reactive recent-price filter.

  • A general weighted moving average is built from an ordered price series, a lookback length, and one exponent that shapes the weights.
  • Each bar's weight is its recency rank raised to the exponent and then divided by a shared normalizing total.
  • An exponent of 0 reproduces a simple moving average, and an exponent of 1 reproduces a conventional linearly weighted moving average.
  • Raising the exponent increases sensitivity to the newest observations, including the square-weighted case when the exponent equals two.
Entries in this reading1 entry

Three inputs and one reusable smoother

A general weighted moving average can be built from three inputs: an ordered price series, a lookback length, and one exponent that shapes the weights. A weighted moving average is a lookback average in which each observation is multiplied by a rank-based weight before the weighted values are summed.

The general form uses one reusable rule. Raise each bar's recency rank to the exponent, then divide by a shared normalizing total.

How the weights are formed

The normalizing total is the sum of the integers from 1 through the lookback length, each raised to the chosen exponent. Each bar's weight is its recency rank raised to the exponent and then divided by that normalizing total, so nearer bars receive larger weights when the exponent is positive.

Once lookback length is fixed, the exponent is the only parameter that reshapes the weight curve.

Special cases of the exponent

An exponent of 0 reproduces a simple moving average. An exponent of 1 reproduces a conventional linearly weighted moving average.

An exponent of 2 is the square-weighted case, used in a twelve-period construction. An eight-period construction can use a fractional exponent of 0.6.

Sensitivity as the exponent rises

Raising the exponent increases sensitivity to the newest observations, shown on a nine-period average at exponents 0, 1, 2, 3, and 4. Sensitivity is how strongly the average responds to the newest observation as the exponent rises.

Longer lookbacks and price overlays

A longer lookback can be assembled by computing the denominator once and splitting the weighted sum into repeated terms that differ only in rank and lag. Overlaying the average on price requires the indicator scale to use the same high and low bounds as the price series.

S&P 500 with nine-period GWMAs at rising exponents

Nine-period general weighted moving averages on the December 1991 S&P 500 overlay the same daily bars as the exponent rises from a flat simple average (red) through a linear weighted average (brown) to more reactive filters at exponents 2, 3 and 4. Higher exponents hug turning points more tightly. Values were read off the TradeStation figure, not from a printed table.
Nine-period general weighted moving averages on the December 1991 S&P 500 overlay the same daily bars as the exponent rises from a flat simple average (red) through a linear weighted average (brown) to more reactive filters at exponents 2, 3 and 4. Higher exponents hug turning points more tightly. Values were read off the TradeStation figure, not from a printed table.S&P 500 Index December 1991 · Daily · 1991-05-15T00:00:00.000Z to 1991-08-15T00:00:00.000Z

The source plots a nine-period GWMA. Alpha 0 matches a simple moving average; alpha 1 matches a linear weighted moving average. Digitized from the raster, so prices are approximate.

Educational research material, not investment advice. Historical source context does not establish present-day performance.
11 of 20 in the Weighted moving average track
19931-9 pp.Next on Weighted moving averageCalibrating the weighted-moving-average exponentEqual-weight and linearly weighted averages are special cases of one general-weighted-moving-average family.
All readings on this track · 20 readings
  1. 1988Indicator smoothing: lookback, weight, and scale
  2. 1990Recency weighting in simple, linear, and exponential moving averages
  3. 1990Seed and recurrence construction for moving averages
  4. 1990Constructing a five-day step-weighted moving average
  5. 1992Constructing simple, weighted, and exponential moving averages
  6. 1992Constructing moving averages with weighting schemes and extra filters
  7. 1992Constructing a weighted-average TRIN10 with Bollinger envelopes
  8. 1992Constructing a banded weighted open-TRIN oscillator
  9. 1993Evaluating a weighted dual rate-of-change momentum filter
  10. 1993Constructing equal, linear and exponential moving averages
  11. 1993Constructing a general weighted moving average from one exponent
  12. 1993Calibrating the weighted-moving-average exponent
  13. 1993Constructing an exponent-weighted average of put-call ratios
  14. 1994Cycle-tuned momentum with spectral peaks
  15. 1999How a five-bar sine-weighted average is assembled
  16. 2003Same-scale trend filter from a rolling least-squares endpoint
  17. 2003How a rolling linear-regression endpoint is assembled as a moving-trend
  18. 2004Constructing a volume-weighted moving average as a forecast baseline
  19. 2005Constructing a move, volume and recency weighted average
  20. 2016MACD as a zero-line filter with dual moving averages
All 24 readings tagged Weighted moving average
Also on Weighted moving average5 readings