Skip to main content
Track Adaptive Filter
5 / 9
Library

2001issue C041-6

Nonlinear Ehlers filter construction from momentum and distance weights

A nonlinear Ehlers filter forms each coefficient from a chosen statistic of the price series, multiplies those coefficients by the corresponding prices, and outputs the ratio of that numerator to the coefficient sum. The same weighted-average shell accepts a five-bar absolute change or a distance coefficient.

  • The nonlinear construction forms each coefficient from a chosen statistic of the price series, multiplies those coefficients by the corresponding prices, and outputs the ratio of that numerator to the coefficient sum.
  • A worked example uses a five-bar absolute price change as the coefficient statistic and a default lookback length of 15 samples on median price, the midrange of high and low.
  • The same weighted-average shell accepts a distance coefficient formed by summing squared differences between the current price and each earlier price in the lookback.
  • Editorial: rebuilding those coefficients from the chosen statistic at each bar is what makes the smoother a trend filter, an adaptive filter, and a testable momentum strategy.
Entries in this reading3 entries

Coefficients from a chosen statistic

The nonlinear construction forms each coefficient from a chosen statistic of the price series, multiplies those coefficients by the corresponding prices, and outputs the ratio of that numerator to the coefficient sum.

That procedure is the nonlinear Ehlers filter: a weighted-average construction whose coefficients come from a selected statistic, then normalizes the weighted prices by the sum of those coefficients. The coefficient sum is the total of the current lookback of coefficients and is the denominator of the filter.

A five-bar change on median price

A worked example uses a five-bar absolute price change as the coefficient statistic and a default lookback of 15 samples on the midrange of high and low. Median price is that midrange, taken as the average of high and low.

Lookback length is the number of past samples that enter both the coefficient vector and the weighted average. In the worked example that length is 15.

Distance weights in the same shell

The same weighted-average shell accepts a distance coefficient formed by summing squared differences between the current price and each earlier price in the lookback.

A generic implementation treats the coefficient statistic as an input, so replacing an absolute five-bar midrange change with a distance-squared function yields the distance-coefficient variant inside the same procedure.

A spreadsheet layout

A spreadsheet construction first builds the squared-difference series, then forms the filter as the product-sum of price and those coefficients divided by the coefficient sum, copying the row downward once five squared-difference values exist.

The same ratio on other platforms

Independent platform reconstructions keep the same ratio of weighted price to coefficient sum, including a midrange price series, a 15-bar summation window, and a coefficient line that can be an absolute five-bar change or a summed squared-distance term.

Distance-weighted Ehlers filter versus daily median price

The distance-weighted filter holds near 132.3–132.7 through the early-January swing, then steps down toward 130.5 after median price prints 128.94. A trader sees a smoother that follows the level of the move rather than every bar. Numbers are the worksheet’s median-price column and the finished filter ratio of coefficient-times-price over the coefficient sum.
The distance-weighted filter holds near 132.3–132.7 through the early-January swing, then steps down toward 130.5 after median price prints 128.94. A trader sees a smoother that follows the level of the move rather than every bar. Numbers are the worksheet’s median-price column and the finished filter ratio of coefficient-times-price over the coefficient sum.Daily · 2000-12-15T00:00:00.000Z to 2001-01-12T00:00:00.000Z

Each coefficient is the five-bar sum of squared differences from the current median price; this sheet then uses a five-term weighted average, shorter than the Length=15 window in the EasyLanguage listing.

Editorial: three uses of one construction

Editorial: TradersWeek reads this construction as a trend filter, an adaptive filter, and a testable momentum strategy, because the same weighted-average shell rebuilds its weights from a chosen statistic at each bar. That reading is editorial and is not a claim of the archive workflow.

A trend filter is a smoother that weights recent price, volume, or breadth observations so the output can be compared with a later out-of-sample path. The nonlinear Ehlers filter is that smoother: it weights recent prices by the current coefficients and returns the normalized ratio.

An adaptive filter is a filter whose coefficients are recomputed from a chosen statistic of the same series, so the weights change as the data change. Forming each coefficient from a chosen statistic, and treating that statistic as an input, is that recomputation.

A momentum strategy is a complete entry, exit, and abstention procedure whose signals come from a momentum-based coefficient rule and a defined holding period. Editorial: the five-bar absolute price change is a momentum-based coefficient rule. Placing that rule inside a defined holding period makes entry, exit, and abstention testable as one procedure.

Educational research material, not investment advice. Historical source context does not establish present-day performance.
5 of 9 in the Adaptive Filter track
20011-6 pp.Next on Adaptive FilterHow a fixed smoother becomes a living parameter surfaceA conventional filter keeps its fitting constants fixed for every observation, so it cannot retune itself when the trend character of the series changes.
All readings on this track · 9 readings
  1. 1982Constructing moving averages with weights, alignment, and adaptive lookbacks
  2. 1990Constructing adaptive filters from equal-weight averages
  3. 2000Cycle-scaled lookbacks for a channel-breakout rule
  4. 2000When charting code breaks the adaptive trendline
  5. 2001Nonlinear Ehlers filter construction from momentum and distance weights
  6. 2001How a fixed smoother becomes a living parameter surface
  7. 2005A three-part workshop for adaptive-filter length search
  8. 2010Rebuilding an exponential average as a bounded error-correcting filter
  9. 2018Assembling a recursive median oscillator as a two-stage adaptive filter
All 9 readings tagged Adaptive Filter
Also on Adaptive Filter5 readings