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

1990issue C111-2

Constructing a five-day step-weighted moving average

A five-observation step-weighted moving average multiplies successive values by the integers 1 through 5 and divides by 15. The same moving-average object can be written in noniterative form or revised in one step from the newest observation and a lagged running window sum.

  • A five-observation step-weighted moving average multiplies successive values by the integers 1 through 5 and divides by the sum of those weights.
  • For a window of n observations the normalizing divisor is n(n+1)/2, which equals 15 when n is 5.
  • Evaluating that five-weight formula on four successive windows yields 26.10, then 26.77, then 27.57, then 27.57.
  • The iterative form adds (5 times the newest observation minus the previous five-observation sum) divided by 15 to the previous average, while the running window sum computed at this step is reserved for the next update.
Entries in this reading2 entries

Integer weights for five observations

A five-observation step-weighted moving average multiplies successive values by the integers 1 through 5 and divides by the sum of those weights.

A step-weighted moving average is a weighted moving average whose weights rise by one integer from the oldest observation in the window to the newest. The weighted moving average applies an explicit unequal weight to each observation in a fixed lookback and normalizes by the sum of those weights.

The triangular-number normalizing divisor

For a window of n observations the weight-sum divisor is n(n+1)/2, which equals 15 when n is 5. That quantity is the normalizing divisor: the sum of the assigned weights. For consecutive integer weights 1 through n it equals n(n+1)/2.

Noniterative evaluation of four windows

Evaluating that five-weight formula on four successive windows yields 26.10, then 26.77, then 27.57, then 27.57.

That calculation is the noniterative form: direct evaluation of the current window as a weighted sum divided by the weight total. The result is a moving average, a forecast formed from ordered price, volume, or breadth observations over a defined sampling interval and lookback.

An iterative form that lags the running sum

An iterative update obtains the next value by adding (5 times the newest observation minus the previous five-observation sum) divided by 15 to the previous average. That iterative form is an equivalent one-step update that revises the previous average from the newest observation and the previous window sum.

The companion running sum is maintained by adding the newest observation and subtracting the observation that leaves the five-day window. That running window sum is the unweighted total of observations inside the current lookback, carried forward only to compute the next update.

The average at a given step uses the running sum from the prior step, so the sum computed at the current step is reserved for the following update.

Educational research material, not investment advice. Historical source context does not establish present-day performance.
4 of 20 in the Weighted moving average track
19921-1 pp.Next on Weighted moving averageConstructing simple, weighted, and exponential moving averagesA simple moving average is the sum of the included prices divided by the number of observations in the window.
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