Skip to main content
Track Lowpass filter
5 / 9
Library

2010issue C0318-25

Constructing cycle versus trend mode filters

A bandpass-filter keeps a chosen swing-period band around a bar-count dominant-cycle and attenuates slower trend and faster noise. A lowpass-filter average of that isolated series recovers a slowly varying mean-offset. Mode is then assigned by comparing that offset with mode-threshold values taken from averaged cycle peaks and valleys.

  • A bandpass-filter keeps frequencies in a chosen swing-period band and attenuates slower trend components and faster noise.
  • Half-bandwidth sets how wide a range of periods around the dominant-cycle center is admitted, and a setting that is too small lengthens filter memory and can leave the output ringing.
  • A lowpass-filter average of the isolated cycle over two cycle periods recovers a mean-offset treated as a scaled, smoothed trend component.
  • Comparing that mean-offset with mode-threshold values from a fraction of averaged local peaks and valleys assigns uptrend, downtrend, or cycle mode.
Entries in this reading3 entries

A tunable three-stage stack

Editorial note. TradersWeek presents this historical workflow as a three-stage filter stack that students can tune. The stages are: isolate a swing band around a bar-count dominant-cycle, recover the slow mean-offset of that isolated series with a lowpass-filter, and classify cycle versus trend by comparing the offset with fractional mode-threshold values rather than by reading the chart by eye.

The archive facts below describe only that construction. They do not say how the stack should be traded.

Isolate a swing band

A bandpass-filter can be built to keep frequencies in a chosen swing-period band while attenuating slower trend components and faster noise.

The dominant-cycle period is specified as a bar count so the same construction can be used after calendar time scale is removed. That bar count centers the passband.

With a 20-bar center period and a half-bandwidth of 0.1, the constructed passband admits cycle components from 18 to 22 bars. Raising the half-bandwidth to 0.5 widens the admitted period range to about 10 to 30 bars and increases responsiveness when the dominant-cycle is not known in advance.

Making the half-bandwidth too small lengthens filter memory and can leave the output ringing after the input has already excited it.

On a chirp waveform whose frequency sweeps from high to low, the bandpass-filter keeps the on-band swing, reduces off-band high and low frequencies, and removes a constant mean level.

Recover a slow mean-offset

After the bandpass-filter isolates the cycle, a lowpass-filter average of that output over two cycle periods recovers a slowly varying mean-offset. That mean-offset is used as a scaled, smoothed trend component.

A positive integer-period average of the isolated cycle corresponds to an uptrend built from higher swing highs and higher swing lows. A negative average corresponds to a downtrend built from lower highs and lower lows.

Assign mode from extrema thresholds

Local peaks and valleys of the bandpass series are taken when a bar is higher or lower than both neighbors. Each of those series is then smoothed with a 50-bar average. A fraction of those averages becomes the mode-threshold values.

Mode is assigned by comparing the recovered mean-offset with those thresholds: above the upper threshold is uptrend, below the lower threshold is downtrend, and between them is cycle mode.

Editorial note. The comparison with mode-threshold values is the classification step. The archive does not treat a visual reading of the raw price chart as the mode rule.

Educational research material, not investment advice. Historical source context does not establish present-day performance.
5 of 9 in the Lowpass filter track
201032-39 pp.Next on Lowpass filterConstructing a trend filter as a low-frequency modelA price series can be constructed as a constant plus a trend term, cyclical terms, and noise, then regrouped by frequency relative to a chosen trading horizon.
All readings on this track · 9 readings
  1. 1991Constructing a coincident moving average as a lowpass filter
  2. 1994Centering a dual lowpass bandpass on a counted cycle
  3. 1997Zero-lag cycle filters can fail on a price series
  4. 2002Constructing zero-lag finite-impulse-response and exponential smoothers
  5. 2010Constructing cycle versus trend mode filters
  6. 2010Constructing a trend filter as a low-frequency model
  7. 2015Whitened lowpass filters for trend and countertrend
  8. 2016Building Nyquist-safe lowpass trend filters
  9. 2018Constructing a Finite Impulse Response Filter compared with Exponential smoothing
All 13 readings tagged Lowpass filter
Also on Lowpass filter5 readings