Skip to main content
Track Linear regression
16 / 43
Library

1994issue C011-2

Regression-seeded nested exponential price filter

A two-layer exponential filter can open both averages from one linear fit on an initial block of weekly closes. After that opening, the nested second average updates from the first average rather than from price, and the dedicated filter series is twice the first average minus the second.

  • A linear fit on an initial block of closes can supply the intercept and slope that open both exponential averages.
  • The nested second average updates from the current first average, not from the raw close.
  • At each step the filter equals twice the first average minus the second average, and that series is written as a dedicated output.
  • If the regression-seeds are omitted, both averages may instead be opened with the first close.
Entries in this reading2 entries

Two nested averages and one filter series

DEMA1 is a constructed price filter equal to twice a single exponential average minus a second exponential average of that first average. The two-layer construction first forms an exponential-average of the price series, then forms a nested-second-average of that first average with the same smoothing-weight.

The worked construction uses weekly closing prices as the ordered input series. The filter series is written as a dedicated output, separate from the two nested averages used to form it.

Regression-seeds for both layers

A linear fit on an initial block of closes supplies the intercept and slope used to open both averages. A regression-seed is an opening level for an exponential average computed from that intercept and slope rather than from the first observation.

The opening value of the first average is the fitted intercept minus ((1-0.074)/0.074) times the fitted slope. The opening value of the second average uses the same intercept and slope but subtracts twice that ((1-0.074)/0.074) multiple of the slope.

Updates after the opening step

After initialization, the first average updates as 0.074 times the new close plus (1-0.074) times its previous value. After initialization, the second average updates as 0.074 times the current first average plus (1-0.074) times its previous value.

An exponential-average is a recursive level that blends a new input with the previous level using a fixed weight. The nested-second-average takes the first exponential average as its input, not the raw price. In this construction the smoothing-weight is 0.074, the fixed fraction applied to the newest input at each update.

The dedicated filter series

The filter value at each step is twice the first average minus the second average. That combination is DEMA1, written as its own series rather than left inside the two nested averages.

Both averages may instead be opened with the first close when the linear-fit seeds are omitted.

Weekly NASDAQ close against regression-seeded and close-seeded DEMA1

A trader should see the two DEMA1 openings split after the 1987 crash—the regression-seeded filter undershoots the close-seeded one—then lock together near mid-1988, while both lag the weekly NASDAQ close on the 1990–91 V-bottom and track it more tightly in the 1992–93 advance. The coordinates were read from the plotted curves; the sidebar gives formulas, not a price table.
A trader should see the two DEMA1 openings split after the 1987 crash—the regression-seeded filter undershoots the close-seeded one—then lock together near mid-1988, while both lag the weekly NASDAQ close on the 1990–91 V-bottom and track it more tightly in the 1992–93 advance. The coordinates were read from the plotted curves; the sidebar gives formulas, not a price table.NASDAQ · Weekly · 1987-08-14T00:00:00.000Z to 1993-08-27T00:00:00.000Z

The source fixes the EMA constant at 0.074 and opens both averages from LINEST on the first 26 weekly closes (D2:D27). The close-seeded series instead copies the first close into both averages. Raster reading is only good to about five index points.

Educational research material, not investment advice. Historical source context does not establish present-day performance.
16 of 43 in the Linear regression track
19941-3 pp.Next on Linear regressionConstructing the double exponential average from lag cancellationOn a noise-free exact linear series that has already reached steady state, twice the first exponential average minus the second recovers the original series at every time index.
All readings on this track · 43 readings
  1. 1990Constructing dollar baselines from rates, inflation, and residuals
  2. 1990Constructing a nominal index value from forward earnings and fitted yield
  3. 1990Constructing a nominal index price from earnings and a fitted yield
  4. 1990Endpoint-pinned price paths are not forecasts
  5. 1990Constructing least-squares polynomial smoothers
  6. 1991Endpoint growth rates versus linear-regression consistency
  7. 1991Out-of-sample checks for linear growth fits
  8. 1991Trend as persistence, not a straight line
  9. 1991Quadratic trend, residual oscillator, and a secondary cycle calendar
  10. 1991Time-origin offset and residual-price divergence on a quadratic least-squares fit
  11. 1991A least-squares trendline from ordered prices
  12. 1992Constructing log-linear growth and reliability screens
  13. 1992Constructing log-linear growth-rate baselines
  14. 1992Next-session high, low, and close from rolling linear regression
  15. 1993Auditing an index price-earnings multiple with short-rate regression
  16. 1994Regression-seeded nested exponential price filter
  17. 1994Constructing the double exponential average from lag cancellation
  18. 1994Evaluating money supply as a linear leading-index baseline
  19. 1995Constructing least-squares trend channels
  20. 1995Linear baseline holdout checks for annual bill-rate forecasts
  21. 1995Projection bands from high and low regression slopes
  22. 1995Evaluating a least-squares end-point moving average on a known test series
  23. 1996Constructing an endpoint moving average from a least-squares line
  24. 1996Scoring equity path consistency with a k-ratio overlay
  25. 1996Evaluating month-end yield gaps for equity regimes
  26. 1996Constructing session-indexed standard error bands
  27. 1998Evaluating linear regression baselines for index valuation
  28. 1998R-squared as a two-state trend filter from a price-time fit
  29. 2000Second-order moving-average lag correction
  30. 2002Price regression line versus beta for index tracking
  31. 2003Regression slope with an r-squared trend confidence gate
  32. 2003Constructing finite-volume-element divergence with slope comparison
  33. 2004Building a daily score from regression, retracement, and volume
  34. 2004Constructing least-squares trendlines from ordered prices
  35. 2007Rectangle breakout targets beyond height
  36. 2007Confirming a price trend with regression slope and r-squared
  37. 2008A linear-regression angle assembled as one trend filter
  38. 2010A two-state swing machine from four running extremes
  39. 2016Score oil-complex tightness before divergence or regression
  40. 2017Nikkei-yen intermarket divergence as a regime case study
  41. 2017Constructing Calmar ratio and linear regression baselines
  42. 2019Pair-trade layer construction versus average-spread management
  43. 2020A convolution slope built from nested linear regression
All 112 readings tagged Linear regression
Also on Linear regression5 readings