1982issue C041-8
Spectrum-first construction of moving-average trend filters
Editorial view: treat a trend filter as a frequency specification rather than a default smoother. Read the spectrum to name the noise band, build the shortest moving-average or weighted-average window that rejects that band, and only afterward choose how much midpoint lag a price-versus-smoother crossing rule can tolerate.
- A spectrum-first construction locates a cutoff between retained lower-frequency power and higher-frequency noise, converts that frequency to a cycle length N, then chooses an equal-weight length of N or a weighted length of 2N+1 to reject that cycle.
- A Hanning weighted average rejects the undesired high-frequency band more cleanly than an equal-weight average of similar intent, but it needs a substantially longer window, so the equal-weight form is the shorter construction when length is the binding constraint.
- Symmetric moving-average and weighted-average outputs are in phase with the input at the filter midpoint; aligning an odd-length 2M+1 filter to the latest observation requires shifting the output by M samples.
- Even after spectrum-based length and extra lag are chosen, a price-versus-lagged-smoother crossing still produces two-sided crossings in sideways intervals and is not treated as complete without additional confirmation.
A trend filter starts as a frequency specification
A linear filter is a fixed-length weighted sum of ordered observations. Equal weights define an ordinary moving average. Unequal weights define a weighted moving average.
Editorial reading: TradersWeek treats a trend filter as a frequency specification rather than a default smoother. Spectral analysis is used first to name the noise band. A moving average or weighted moving average is then built as the shortest window that rejects that band. Filter lag for a price-versus-smoother crossing rule is chosen only after that window exists.
How short averages change amplitude
When a year is counted as 260 trading sessions, a 10-session cycle is 26 cycles per year. A three-session equal-weight average has no amplitude response at an 87-cycle-per-year three-session component and a local maximum at a 130-cycle-per-year two-session component.
Following a three-session average with a two-session average is equivalent to one four-weight filter with coefficients 1/6, 2/6, 2/6 and 1/6. That weighting can reject high frequencies more cleanly than the three-session average alone.
From a spectrum cutoff to a window length
To pass cycles longer than 10 sessions and reject those shorter than 6, the frequency targets are pass below 26 cycles per year and reject above 43. An N-session equal-weight average nulls an N-session cycle, while an N-session Hanning weighted average nulls a cycle of length (N+1)/2.
A Hanning weighted average rejects the undesired high-frequency band more cleanly than an equal-weight average of similar intent, but it needs a substantially longer window. The equal-weight form is the shorter construction when length itself is the binding constraint.
Stages assembled from the same blocks
The same moving-average building blocks can assemble a lowpass smoother, a highpass detrender, a bandpass oscillator, and a momentum stage. A highpass detrender is formed by subtracting a lag-compensated smoother from the original series. A bandpass oscillator is a lowpass pass then a highpass pass. A momentum stage is smoothing then a k-step difference of comparable length.
Amplitude response of a 3-day MA and a 4-day WMA

The source treats a year as 260 trading days, so a 3-day cycle is 87 cycles per year and a 2-day cycle is 130. The weighted filter uses weights 1, 2, 2, 1 over four days.
Filter lag is chosen after the window
Symmetric moving-average and weighted-average outputs are in phase with the input when referenced to the filter midpoint. Aligning an odd-length 2M+1 filter to the latest observation requires shifting the output by M samples.
On a weekly series whose power was concentrated below 3 cycles per year, a 17-week equal-weight smoother was selected because it nulls about 3.1 cycles per year. Lag was then lengthened from the natural 8-week midpoint to 12 weeks after crossings were inspected on a multi-year weekly record.
Even after spectrum-based length and extra lag are chosen, a price-versus-lagged-smoother crossing construction still produces two-sided crossings in sideways intervals and is not treated as complete without additional confirmation.
All readings on this track · 21 readings
- 1982Spectrum-first construction of moving-average trend filters
- 1990Crowd questions that switch cycle regimes
- 1993Antithetic twins to cancel origin-linked forecast bias
- 1994Constructing frequency response from a three-stage filter cascade
- 1994Bench-testing smoothers with cycle phase and power
- 1995Constructing minimum tradable cycles from spectral noise
- 1995Spectral whipsaw limits for a price-crossing average
- 1996Constructing market phase from dominant-cycle components
- 2000Constructing a Hilbert squelch dominant-cycle gate
- 2007When cycle mode fails: regime gates for spectral trades
- 2008Constructing singular-spectrum forecast baselines
- 2008Stacking a midband cycle gate on a short-memory trend filter
- 2011Engineering spectral cycle detection and moving-average harmony
- 2011Evaluating fixed oscillators against a moving dominant cycle
- 2011A construction checklist for a dominant-cycle sinewave
- 2012Assembling a market-mode heatmap from successive band-pass filters
- 2012Adaptive trend detection from dominant-cycle spectra
- 2015Constructing price paths from cycles and support
- 2018Oscillator distribution shape for mean-reversion filters
- 2020Constructing a cosine-correlation cycle and phasor trend filter
- 2020Constructing a correlation-cycle market-state engine