1989issue C041-4
Constructing alpha-beta price channels and trend filters
One recursive two-gain smoother can be written as a residual-sigma-width price channel, a lagged trend filter, or both. Lookback, residual-sigma-width, and the startup-fit are the construction choices that decide what the overlay measures.
- The same alpha-beta-filter, a recursive two-gain update of level and slope, can emit a price-channel, a trend-filter, or both from one ordered series.
- Three inputs set the channel smoother length, the lagged-filter length, and the residual-sigma-width. Unless they are changed, the construction uses 6 periods, 15 periods, and a 2.5-sigma half-width and writes both overlays.
- A startup-fit on the first lagged-filter window seeds level and slope. The two recursive gains are formed from the chosen lookback as 2 divided by that lookback plus 1.5, and that first gain divided by the lookback plus 0.5.
- The construction rejects a channel lookback below 2, a channel lookback longer than the filter lag, or a combined window that consumes the whole series.
One smoother, two overlays
This archive article records how a single two-gain smoother is assembled so it can be read as a price channel or as a lagged trend filter. The alpha-beta-filter is a recursive two-gain update of a level and a slope from ordered observations, used to produce a forecast path at a chosen sampling interval and lookback.
The construction reads an ordered series from one column of a multi-column array and writes the channel and filter series into other columns of the same array. It can emit the channel only, the lagged filter only, or both.
The three construction inputs
Three tunable inputs set the channel smoother length, the lagged-filter length, and the channel half-width in residual-sigma units. Residual-sigma-width is the channel half-width expressed as a multiple of the residual standard deviation around the smoothed path.
Unless those inputs are changed, the construction uses 6 periods for the channel smoother, 15 periods for the lagged filter, and a 2.5-sigma half-width, and it emits both overlays.
Startup-fit and the two gains
A startup-fit is a linear least-squares estimate of level and slope on the opening window, used to seed the recursive updates. In this construction, a linear least-squares fit on the first lagged-filter window supplies the starting level and slope for the recursive updates.
The two recursive gains are formed from the chosen lookback as 2 divided by that lookback plus 1.5, and that first gain divided by the lookback plus 0.5.
Residual-sigma-width as a price channel
A price-channel places upper and lower bounds around that smoothed path at a residual-sigma-width so a chartable band can be treated as a repeatable, testable structure. Upper and lower channel bounds equal the smoothed path plus and minus the residual-sigma multiple, and the residual variance is refreshed as later observations arrive.
The lagged trend filter
A trend-filter is the lagged path from the same smoother, used as a directional overlay rather than as a pair of bounds. The trend filter is a second pass of the same smoother that uses the longer lookback and reports the level projected backward by that lag.
Rejection rules and stored columns
The construction rejects a channel lookback below 2, a channel lookback longer than the filter lag, or a combined window that consumes the whole series.
Completed overlays can be stored as date, upper bound, lower bound, lagged filter, and a zero volume placeholder.
All readings on this track · 7 readings
- 1985Constructing a recursive two-gain price smoother
- 1989Constructing alpha-beta price channels and trend filters
- 1989Alpha-beta lag parameters versus moving-average windows
- 1995Constructing a reproducible alpha-beta price channel
- 2006Shared coefficient construction for recursive price filters
- 2010How to judge a Kalman filter forecast as a Trend filter
- 2019Constructing a calendar-conditioned trend filter