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

1999issue C061-4

How a five-bar sine-weighted average is assembled

A five-point sine-weighted average is assembled by multiplying successive lagged closes by sine values at 30, 60, 90, 120, and 150 degrees, then dividing by the sum of those sines. The same construction can be written with fixed weights 0.5, 0.866, 1, 0.866, and 0.5 on the current close and four lagged closes, or rebuilt in a loop whose Length or PERIOD input defaults to 5.

  • A five-point sine-weighted average multiplies successive lagged closes by sine values at 30, 60, 90, 120, and 150 degrees, then divides by the sum of those sines.
  • The same construction can use explicit weights 0.5, 0.866, 1, 0.866, and 0.5 on the current close and four lagged closes, then divide by 3.732.
  • A reusable function initializes a numerator and a denominator, then loops over a Length input that can default to 5 and plot the result as a single series.
  • A spreadsheet or a set of arithmetic rows can form the same ratio by summing sine coefficients and coefficient-times-lagged-close products, then dividing those two sums.
Entries in this reading3 entries

The five-point recipe

The sine-wave price model is a five-point smoother whose coefficients are sine values of equally spaced angles, then divided by the sum of those sines. A five-point sine-weighted average can be built by multiplying successive lagged closes by sine values at 30, 60, 90, 120, and 150 degrees, then dividing by the sum of those sines.

Fixed numeric weights

The same five-point construction can be written with explicit numeric weights 0.5, 0.866, 1, 0.866, and 0.5 on the current close and four lagged closes, then divided by 3.732. That writing is still a weighted moving average, because unequal coefficients are applied to successive observations before the result is normalized.

A looped function

A reusable function form initializes a numerator and a denominator, then loops over a Length input. At each step it adds MaxList of the sine of the step times 180/6 and zero, times the corresponding lagged close, to the numerator, and it adds the same sine term to the denominator. In this form, the plotted indicator can take a Length input defaulting to 5 and output the function result as a single series.

Spreadsheet and row arithmetic

A spreadsheet procedure can compute the same ratio by looping a lookback named PERIOD, defaulting to 5, summing sine of day times 180/6 times pi/180 times each lagged close in the numerator and the matching sine terms in the denominator. An equivalent construction can be assembled from separate arithmetic rows: a constant angle step, a sum of sine coefficients, a sum of coefficient-times-lagged-close products, and a final division of those two sums.

Compared with a simple moving average

A moving average is a forecast formed by combining ordered price observations over a defined lookback. A weighted moving average assigns unequal coefficients to successive observations before normalizing. Editorial: the sine-weighted construction differs from that simple baseline because it uses sine values of equally spaced angles as the coefficients and then divides by the sum of those sines.

Educational research material, not investment advice. Historical source context does not establish present-day performance.
15 of 20 in the Weighted moving average track
20031-4 pp.Next on Weighted moving averageSame-scale trend filter from a rolling least-squares endpointA moving-trend is the current-bar value of a least-squares line fitted to the last n observations and recomputed as the window advances.
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