Skip to main content
Track Adaptive moving average
23 / 24
Library

2018issue C078-11

Constructing a deviation-scaled adaptive moving average

A deviation-scaled moving average first locks exponential alpha to a critical period, then multiplies that baseline by the absolute amplitude of a whitened two-bar residual expressed in its own root-mean-square units.

  • An exponential moving average mixes the current close with the previous filter value through an alpha that lies between zero and one.
  • Common adaptive modifiers estimated over several bars add computational lag before they can change that alpha.
  • A deviation-scaled-moving-average multiplies a critical-period baseline alpha by the absolute amplitude of a whitened two-bar residual expressed in rms-scale units.
  • A single user period sets both the baseline alpha and the root-mean-square window that measures local scale.
Entries in this reading3 entries

Two stages of construction

A deviation-scaled-moving-average is assembled in two stages. First, an exponential baseline is locked to a user-chosen critical-period. Second, a whitened two-bar residual, expressed in its own rms-scale units, raises or lowers the mixing weight from that baseline.

An exponential mix and its alpha

An exponential moving average is built as a convex mix of the current close and the previous filter value. The mixing weight is alpha, which lies between zero and one. Smaller alpha increases smoothing. Larger alpha reduces smoothing and gives more weight to the latest close.

Why common adaptive modifiers add lag

Adaptive averages change that alpha from a separately measured market condition. Two common constructions derive the modifier from an RSI-like statistic or from net price change over a window divided by the sum of bar-to-bar changes. Both estimate the modifier over multiple bars, which adds computational lag.

A critical-period baseline

The user period is treated as the filter critical-period, the cycle length at which passed signal power is halved. The baseline exponential alpha is set to five divided by that period. When the oscillator’s scaled amplitude deviation equals one, the adaptive alpha matches an exponential average with the same critical-period.

A zeros-oscillator and spectrum-whitening

The scaling oscillator is a two-bar close-to-close difference. This zeros-oscillator has a transfer response of zero for an unchanging series, which supplies a nominal zero mean, and it rolls off at six decibels per octave. Fractal market amplitudes are described as rising at the same rate, so the difference is used for spectrum-whitening.

The same two-bar difference also has a transfer-response zero at the Nyquist period, the shortest cycle that sampled data can represent. That zero is intended to cancel the six-decibel noise gain of a one-bar difference and to lessen aliasing in the oscillator.

A two-pole residual and rms-scale

The oscillator is passed through a two-pole smoother whose critical-period is half the user period so the residual stays responsive. The smoother coefficients are computed only on the first bar. Because the input is nominally zero-mean, the filtered series is treated as zero-mean as well.

Local scale is the rms-scale of that filtered oscillator over the user period, the root-mean-square of the residual. Dividing the filtered series by that rms-scale expresses it in standard-deviation units. Small local deviation then yields a small effective alpha and heavier smoothing. Large deviation raises alpha and lets the filter follow price more quickly.

Working alpha and the adaptive series

The working alpha is the absolute scaled value times five divided by the period. The adaptive series is the usual exponential recursion that mixes the current close with the previous adaptive value using that working alpha. Tracking speed is retuned by changing the single period input that sets both the baseline alpha and the rms-scale window.

SPY daily with 40-period DSMA, 2017

SPY rose from the high-220s in January 2017 to the high-260s by year-end, and the 40-period deviation-scaled moving average stayed close through the rallies while flattening in the quieter mid-year stretches. Monthly readings were taken off the magazine Figure 1 candlestick pane (y-scale 225–265, DSMA(40) last printed at 266.30).
SPY rose from the high-220s in January 2017 to the high-260s by year-end, and the 40-period deviation-scaled moving average stayed close through the rallies while flattening in the quieter mid-year stretches. Monthly readings were taken off the magazine Figure 1 candlestick pane (y-scale 225–265, DSMA(40) last printed at 266.30).SPY · Daily · 2017-01-01T00:00:00.000Z to 2017-12-31T00:00:00.000Z

The raster is a magazine illustration of TradeStation Figure 1, not a data table. Points are month-end visual readings of the DSMA overlay; last printed DSMA(40) on the quote bar is 266.30. Do not treat tenths as exact ticks.

Educational research material, not investment advice. Historical source context does not establish present-day performance.
23 of 24 in the Adaptive moving average track
202032-36 pp.Next on Adaptive moving averageWalk-forward and adaptive averages as two tests of the same trendEvaluation here means comparing two implementations of the same trading idea under a shared risk constraint so the result speaks to test design, not to a preferred indicator.
All readings on this track · 24 readings
  1. 1991Building variable-length moving averages from partitioned price changes
  2. 1991Variable-length moving average from change dispersion
  3. 1992Constructing volatility-adaptive exponential smoothing
  4. 1995Constructing an adaptive moving average with an efficiency ratio and filter
  5. 1995Two-gate breakout confirmation with adaptive averages
  6. 1995Building momentum-scaled adaptive moving averages
  7. 1995Adaptive length as a construction choice inside exponential smoothing
  8. 1998Testing price-channel breakouts with a lag-aware adaptive average
  9. 1998Constructing filters by nesting offsets and variable weights
  10. 1998Constructing an efficiency ratio adaptive average and entry filter
  11. 2001Encoding candle structure as a numeric filter
  12. 2001Adaptive averages driven by cycle-phase speed
  13. 2005Constructing an adaptive moving average from a fractal-dimension weight
  14. 2005Range-dimension adaptive exponential filter
  15. 2010Constructing simple, exponential, and adaptive averages
  16. 2010How a price-hugging smoother is assembled from ordinary averages
  17. 2013Evaluating an adaptive moving average against a same-window moving average
  18. 2016Three-layer confirmation: adaptive average, stochastic relative strength index, and stop-and-reverse
  19. 2017One-alpha reverse-path exponential smoothing
  20. 2018Pair two adaptive averages to filter swing turns
  21. 2018Two Adaptive moving averages as a confirmation pair
  22. 2018Constructing an adaptive filter for adoption-cycle reversals
  23. 2018Constructing a deviation-scaled adaptive moving average
  24. 2020Walk-forward and adaptive averages as two tests of the same trend
All 28 readings tagged Adaptive moving average
Also on Adaptive moving average5 readings