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.
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.
All readings on this track · 20 readings
- 1988Indicator smoothing: lookback, weight, and scale
- 1990Recency weighting in simple, linear, and exponential moving averages
- 1990Seed and recurrence construction for moving averages
- 1990Constructing a five-day step-weighted moving average
- 1992Constructing simple, weighted, and exponential moving averages
- 1992Constructing moving averages with weighting schemes and extra filters
- 1992Constructing a weighted-average TRIN10 with Bollinger envelopes
- 1992Constructing a banded weighted open-TRIN oscillator
- 1993Evaluating a weighted dual rate-of-change momentum filter
- 1993Constructing equal, linear and exponential moving averages
- 1993Constructing a general weighted moving average from one exponent
- 1993Calibrating the weighted-moving-average exponent
- 1993Constructing an exponent-weighted average of put-call ratios
- 1994Cycle-tuned momentum with spectral peaks
- 1999How a five-bar sine-weighted average is assembled
- 2003Same-scale trend filter from a rolling least-squares endpoint
- 2003How a rolling linear-regression endpoint is assembled as a moving-trend
- 2004Constructing a volume-weighted moving average as a forecast baseline
- 2005Constructing a move, volume and recency weighted average
- 2016MACD as a zero-line filter with dual moving averages