1992issue C051-14
Constructing a cycle-aware finite impulse response detrender
A linear-regression span can tilt against the cycle it is meant to remove, and a raw difference can hide turning points. Optimum detrending differences two low-pass weighted groups whose spacing follows the dominant cycle and a spectral cutoff, so the finite impulse response stays nearly in phase with price.
- Linear-regression trendlines on a single sine-wave cycle can tilt the wrong way depending on starting phase, so the correct lookback span is ambiguous on non-stationary market data.
- A moving average whose length equals the dominant cycle removes that cycle completely, but a live series must accept lag if the average is not centered.
- First differences and half-cycle two-point differences cancel a linear trend yet boost or leave high-frequency content, including a third harmonic.
- Optimum detrending applies one finite impulse response: two weighted groups are differenced and low-pass smoothed so filter lag offsets difference lead and the output stays nearly in phase with price.
Why trendline lookback is ambiguous
Linear-regression trendlines on a single sine-wave cycle can tilt the wrong way depending on starting phase. The correct lookback span is therefore ambiguous on non-stationary market data.
How the dominant cycle sets the average
The dominant cycle is the prevailing oscillatory period in the series that sets moving-average length, group separation, and the filter cutoff used to isolate shorter swings.
A moving average whose length equals the dominant cycle removes that cycle completely because the full-period average is zero regardless of starting phase, and subtracting it from price leaves the higher-frequency remainder.
Centering that average removes lag for historical charts but leaves the most recent half cycle without a trendline, so a live series must accept lag if the average is not centered.
Why simple differences cannot finish the job
First differences cancel a linear trend and advance a sine wave by a quarter cycle, but they boost high-frequency content so intermediate turning points can disappear unless the lag is widened and then low-pass smoothed.
Differencing samples a half cycle apart leaves a constant offset equal to the trend slope and does not attenuate a third harmonic, so simple two-point differences cannot finish the high-frequency cleanup.
Optimum detrending as a group difference
Optimum detrending differences two weighted groups: the weights act as a low-pass filter, the difference removes very low frequencies, group separation under a half cycle keeps residual offset small, and filter lag offsets difference lead so the result stays nearly in phase with price.
A finite impulse response filter is a finite weighted combination of past prices that simultaneously differences two groups and low-pass smooths, yielding a detrended series nearly in phase with the original.
Spectral cutoff across sampling intervals
Spectral analysis is the frequency-domain treatment of price as high-frequency swing versus low-frequency trend, including transfer response, cutoff frequency, and sampling limits.
With one sample per day the shortest analyzable cycle is two days (0.5 cycles per day). An ideal low-pass cutoff at 0.125 cycles per day passes periods longer than eight days and blocks shorter ones.
The same cutoff theory is intended to transfer across sampling intervals: eight-to-32-day cycles on daily data, eight-to-32-week cycles on weekly data, and eight-to-32-hour cycles on hourly data.
Symmetric taps for the finite impulse response
A worked construction uses N = 5, Fc = 0.1, and symmetric taps for k from -4 to +4, because the sinc term is zero at k = ±5. Sign reversal across the center implements the group difference.
Each detrended output value is the sum of nine consecutive prices times those fixed weights, which is a finite impulse response of the price series.
Symmetric FIR tap weights for a 10-day cycle

The source spreadsheet fixes a 10-day dominant cycle, cutoff Fc = 0.1 cycles per day and N = 5. Taps at k = ±5 are omitted because sin(π)/π = 0.
All readings on this track · 10 readings
- 1982An odd-length smoother from a cycle cutoff
- 1989Smoothing filters, cutoff, poles, and sample delay
- 1992Constructing a cycle-aware finite impulse response detrender
- 2002Rebuild a smoother by writing the lag into the coefficients
- 2002Timing market cycles with finite impulse response filters and FFT
- 2002Constructing the relative strength index with an even-order finite-impulse-response prefilter
- 2003Recursive and cascaded moving-average construction
- 2006One second-order transfer function, a family of trend filters
- 2019Constructing the Voss line from a bandpass and a short FIR sum
- 2020Truncated bandpass construction as a finite-length trend filter