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.
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

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.
All readings on this track · 43 readings
- 1990Constructing dollar baselines from rates, inflation, and residuals
- 1990Constructing a nominal index value from forward earnings and fitted yield
- 1990Constructing a nominal index price from earnings and a fitted yield
- 1990Endpoint-pinned price paths are not forecasts
- 1990Constructing least-squares polynomial smoothers
- 1991Endpoint growth rates versus linear-regression consistency
- 1991Out-of-sample checks for linear growth fits
- 1991Trend as persistence, not a straight line
- 1991Quadratic trend, residual oscillator, and a secondary cycle calendar
- 1991Time-origin offset and residual-price divergence on a quadratic least-squares fit
- 1991A least-squares trendline from ordered prices
- 1992Constructing log-linear growth and reliability screens
- 1992Constructing log-linear growth-rate baselines
- 1992Next-session high, low, and close from rolling linear regression
- 1993Auditing an index price-earnings multiple with short-rate regression
- 1994Regression-seeded nested exponential price filter
- 1994Constructing the double exponential average from lag cancellation
- 1994Evaluating money supply as a linear leading-index baseline
- 1995Constructing least-squares trend channels
- 1995Linear baseline holdout checks for annual bill-rate forecasts
- 1995Projection bands from high and low regression slopes
- 1995Evaluating a least-squares end-point moving average on a known test series
- 1996Constructing an endpoint moving average from a least-squares line
- 1996Scoring equity path consistency with a k-ratio overlay
- 1996Evaluating month-end yield gaps for equity regimes
- 1996Constructing session-indexed standard error bands
- 1998Evaluating linear regression baselines for index valuation
- 1998R-squared as a two-state trend filter from a price-time fit
- 2000Second-order moving-average lag correction
- 2002Price regression line versus beta for index tracking
- 2003Regression slope with an r-squared trend confidence gate
- 2003Constructing finite-volume-element divergence with slope comparison
- 2004Building a daily score from regression, retracement, and volume
- 2004Constructing least-squares trendlines from ordered prices
- 2007Rectangle breakout targets beyond height
- 2007Confirming a price trend with regression slope and r-squared
- 2008A linear-regression angle assembled as one trend filter
- 2010A two-state swing machine from four running extremes
- 2016Score oil-complex tightness before divergence or regression
- 2017Nikkei-yen intermarket divergence as a regime case study
- 2017Constructing Calmar ratio and linear regression baselines
- 2019Pair-trade layer construction versus average-spread management
- 2020A convolution slope built from nested linear regression