Skip to main content
Track Triangular moving average
6 / 8
Library

1999issue C061-6

Fixed-lag construction of moving-average smoothers

A moving average is a lookback average of ordered price observations used to suppress short-lived fluctuations while introducing delay. This archive article first reads that lag from a known turning-point path, then compares weighting schemes by counting data-direction reversals at a matched delay.

  • Smoothness can be operationalized by coding each observation as up or down versus the prior one and summing the times that binary state changes.
  • Fair smoothness comparisons held lag fixed rather than holding the moving-average period fixed.
  • At a 3-day lag the shortest windows that produced that delay were 9 for exponential, 6 for simple, 10 for linear or weighted, 22 for endpoint, and 6 for both triangular and sine-weighted.
  • On the daily close sample, at each matched lag from 2 through 7 days, the linear, triangular, endpoint, and sine-weighted series each showed a longer average interval between reversals than both the simple and exponential series.
Entries in this reading3 entries

What a moving average spends in delay

A moving-average is a lookback average of ordered price observations used to suppress short-lived fluctuations while introducing delay. Lag is the number of sampling intervals between a turning point in the unsmoothed series and the corresponding turning point in the smoother.

Six constructions were specified: simple, exponential with coefficient 2/(n+1), endpoint least-squares, linear (also called weighted), triangular, and sine-weighted. An endpoint-moving-average is the newest fitted value of a least-squares straight line through a lookback window. A sine-weighted-moving-average is a finite-window average that weights observations with a sine function that is low at both ends of the window and high in the middle.

Two finite-window weight patterns

A triangular-moving-average is a finite-window average whose weights rise to a peak at the center of the window and then fall, then are divided by the sum of those weights. For odd windows a triangular moving average uses palindromic integer weights such as 1-2-1, 1-2-3-2-1, or 1-2-3-4-3-2-1. The five-point form is (P5 + 2P4 + 3P3 + 2P2 + P1)/9.

A weighted-moving-average is a finite-window average that assigns linearly declining integer weights from the newest observation back to the oldest, then divides by the sum of the weights. A five-point linear moving average, also called a weighted moving average, is (5P5 + 4P4 + 3P3 + 2P2 + P1)/15, where the divisor is the sum of the weights.

A synthetic path that makes lag visible

Lag was read from a 199-point synthetic path that rose by 1 each day from 1 to 100 and then fell back to 1. A 14-day linear moving average turned 4 days after that peak.

Fair smoothness comparisons held lag fixed rather than holding the moving-average period fixed. At a 3-day lag the shortest windows that produced that delay were 9 (exponential), 6 (simple), 10 (linear/weighted), 22 (endpoint), 6 (triangular), and 6 (sine-weighted).

Smoothness as fewer data-direction reversals

Smoothness can be operationalized by coding each observation as up or down versus the prior one and summing the times that binary state changes. Each such change is a data-direction-reversal: a change from an up step to a down step, or the reverse, between consecutive observations of a series.

Across 7254 daily closes from 17 March 1970 through 30 November 1998, the raw series reversed direction 3332 times, averaging 2.18 days between reversals. An 11-day simple moving average left 883 reversals, averaging 8.21 days between reversals.

On daily closes from 17 March 1970 through 30 November 1998, at each matched lag from 2 through 7 days, the linear, triangular, endpoint, and sine-weighted series each showed a longer average interval between reversals than both the simple and exponential series.

On 1066 weekly closes from 29 September 1978 through 24 December 1998, a 39-week simple moving average produced 47 reversals (22.7 weeks apart) while a 39-week sine-weighted moving average with the same lag produced 18 reversals (59.2 weeks apart).

Five-point sine-weighted average versus daily close

Price jumps from 43.63 to 49.38 and back while the five-point sine-weighted average turns more slowly, which is the lag this construction is designed to expose. Numbers are the Close and SWMA columns from the article's Excel sidebar for 1–29 April 1998.
Price jumps from 43.63 to 49.38 and back while the five-point sine-weighted average turns more slowly, which is the lag this construction is designed to expose. Numbers are the Close and SWMA columns from the article's Excel sidebar for 1–29 April 1998.Daily closes, 1–29 April 1998 · 1998-04-01T00:00:00.000Z to 1998-04-29T00:00:00.000Z

The five-point sine-weight window leaves the first four sessions blank. The printed denominator is 3.73, the sum of sin(n·180°/6) for n = 1 through 5.

Educational research material, not investment advice. Historical source context does not establish present-day performance.
6 of 8 in the Triangular moving average track
20031-2 pp.Next on Triangular moving averageWeighting recipes inside one moving-average lookbackA simple moving average is a rolling mean over a fixed lookback, updated by adding the newest bar and dropping the oldest.
All readings on this track · 8 readings
  1. 1989Constructing lag-matched triangular moving averages
  2. 1990Lag-aligned MACD from triangular moving averages
  3. 1990Constructing triangular moving average weights
  4. 1990Constructing a lag-aligned triangular MACD
  5. 1998Paired tests for moving-average lag and smoothness
  6. 1999Fixed-lag construction of moving-average smoothers
  7. 2003Weighting recipes inside one moving-average lookback
  8. 2010Assembling a smoothed percent-b oscillator from Heikin-Ashi and stacked averages
All 8 readings tagged Triangular moving average
Also on Triangular moving average5 readings