1998issue C021-3
Constructing filters by nesting offsets and variable weights
This archive lesson rebuilds three filters from the same ordered closes by changing a displaced moving-average window, a nested exponential step, and a variable blending weight.
- Anchored momentum is 100 times a ratio-minus-one that compares the close, or an exponential average of the close, with a simple moving average used as a fixed reference window.
- T3 is a generalized double-exponential step applied three times, each pass taking the prior pass as its price input with unchanged period and factor.
- A variable-length exponential average updates recursively with a weight equal to an absolute up-versus-down change oscillator times a fixed exponential constant.
- T3 and IE/2 attach an alert when the close crosses the plotted filter, and both plots use the same vertical scale as price.
The same closes, three assemblies
The archive builds filters by assembling a few reusable parts on ordered closes. Exponential smoothing is a recursive blend of the latest observation with the prior average, using a decay constant taken from a chosen smoothing length. A moving average is a lookback mean of ordered price observations, used both as a plotted baseline and as a displaced reference window inside a scaled ratio. An adaptive moving average is a recursive average whose blending weight is scaled by a contemporaneous up-versus-down change oscillator, so the effective length shortens when net directional change is large and lengthens when it is small.
Editorial reading: those parts are interchangeable components. The constructions below keep the same ordered closes and change only how a window is offset, how a smooth is nested, or how a weight is allowed to vary.
A displaced reference window
Anchored momentum is a scaled ratio-minus-one that compares the close, or an exponential average of the close, with a simple moving average used as a fixed reference window.
One construction is 100 times a ratio-minus-one that places either the close or an exponential average of the close over a simple moving average of the close read at offset ((simple-average length - 1) / 2) - momentum length.
A second construction keeps the same 100 times ratio-minus-one form but uses a simple moving average whose length is twice the momentum period plus one as the denominator.
A nested exponential step
A generalized double-exponential step is a weighted mix of a single exponential average and a double exponential average that sits between those two smooths, controlled by a factor on the unit interval. It is constructed as (1 + weighting factor) times a single exponential average of price minus the same factor times a double exponential average of that price and period.
T3 is that generalized double-exponential step applied three times in succession, each pass using the prior pass as its price input with unchanged period and factor.
Supplied T3 constructions use a weighting factor of 0.7 with a period of 6 in one recipe and a period of 7 in another, and the factor is entered on the unit interval.
A variable blending weight
A variable-length exponential average is a recursive exponential update whose weight is the product of a fixed exponential constant and the absolute value of a summed up-close versus down-close oscillator. After a warm-up of period minus 1 observations that returns the close, the next value equals the prior value plus the product of an absolute up/down-change oscillator, the constant 2 / (smoothing length + 1), and the close-minus-prior gap.
That oscillator is the absolute value of (sum of up-close changes - sum of down-close changes) / (sum of up-close changes + sum of down-close changes) over a stated lookback. Two recipes pair an average length of 21 with a smoothing length of 5.
Closes are classified against bands at 1.01 and 0.99 times the variable-length average to mark observations above, below, or inside the channel.
A companion line on the price scale
IE/2 is the arithmetic mean of a linear-regression slope plus a simple average of price and the endpoint linear-regression value of price, computed over one shared lookback. The supplied recipe uses a shared lookback of 15.
T3 and IE/2 constructions attach an alert when the close crosses the plotted filter, and both plots use the same vertical scale as price.
All readings on this track · 24 readings
- 1991Building variable-length moving averages from partitioned price changes
- 1991Variable-length moving average from change dispersion
- 1992Constructing volatility-adaptive exponential smoothing
- 1995Constructing an adaptive moving average with an efficiency ratio and filter
- 1995Two-gate breakout confirmation with adaptive averages
- 1995Building momentum-scaled adaptive moving averages
- 1995Adaptive length as a construction choice inside exponential smoothing
- 1998Testing price-channel breakouts with a lag-aware adaptive average
- 1998Constructing filters by nesting offsets and variable weights
- 1998Constructing an efficiency ratio adaptive average and entry filter
- 2001Encoding candle structure as a numeric filter
- 2001Adaptive averages driven by cycle-phase speed
- 2005Constructing an adaptive moving average from a fractal-dimension weight
- 2005Range-dimension adaptive exponential filter
- 2010Constructing simple, exponential, and adaptive averages
- 2010How a price-hugging smoother is assembled from ordinary averages
- 2013Evaluating an adaptive moving average against a same-window moving average
- 2016Three-layer confirmation: adaptive average, stochastic relative strength index, and stop-and-reverse
- 2017One-alpha reverse-path exponential smoothing
- 2018Pair two adaptive averages to filter swing turns
- 2018Two Adaptive moving averages as a confirmation pair
- 2018Constructing an adaptive filter for adoption-cycle reversals
- 2018Constructing a deviation-scaled adaptive moving average
- 2020Walk-forward and adaptive averages as two tests of the same trend