Skip to main content
Track Finite Impulse Response Filter
10 / 10
Library

2020issue C0748-56

Truncated bandpass construction as a finite-length trend filter

July 2020 teaching implementations rebuild a recursive bandpass over a finite lookback, force the two oldest stored states to zero, and compare that truncated reading with the untruncated baseline on the same close prices.

  • The untruncated bandpass is computed from the two-bar close difference plus two lagged filter terms whose coefficients come from the period and bandwidth cosines.
  • Truncation applies the same recursive coefficients over a finite lookback and forces the two oldest stored states to zero.
  • A zero crossing of the truncated reading is the defined event for reversing the signed trend-filter state on the next bar.
  • The construction limits the data range so temporary extremes have less lasting influence on the output than they do in the infinite-memory baseline.
Entries in this reading3 entries

What the construction rebuilds

The July 2020 implementations start from a recursive bandpass that isolates a chosen cycle length from ordered prices. That untruncated reading is the forecast baseline.

A finite-impulse-response reconstruction then applies the same bandpass over a finite lookback so older observations cannot keep driving the output. Length is the finite number of recent bars retained after truncation.

The untruncated bandpass baseline

The untruncated bandpass is computed from the two-bar close difference plus two lagged filter terms. The coefficients on those lagged terms come from the period and bandwidth cosines.

Period is the cycle length, in bars, that sets those cosine coefficients. Bandwidth is a fraction of the period that sets how narrow the passband is.

How truncation limits the memory window

The implementations reconstruct a truncated bandpass by applying the same recursive coefficients over a finite lookback and forcing the two oldest stored states to zero. That zeroing step is the truncation: filter state beyond the stated length is cleared so extreme past prices drop out of the calculation.

The construction is presented as a way to limit the data range so that temporary extremes have less lasting influence on the filter output than they do in the infinite-memory baseline.

The truncated reading as a trend filter

The teaching implementations treat a zero crossing of the truncated reading as the defined event for reversing the signed trend-filter state on the next bar.

The trend filter is a signed, zero-centered reading of the truncated bandpass. It marks a change of direction at a defined sampling interval.

Truncated versus recursive bandpass on daily SPY

On daily SPY the length-10 truncated bandpass and the ordinary recursive bandpass (period 20, bandwidth 0.1) stay inside a tight band and agree with each other through 2019, then split after the March 2020 drop: the untruncated filter rings to about −15 points and is still negative at the right edge, while the truncated copy bottoms less deep and has already crossed back above zero. Earlier points are digitized from the Zorro comparison pane in the July 2020 Traders’ Tips; the final readings are the cursor labels printed on that plot (−3.221 untruncated, 0.95 truncated).
On daily SPY the length-10 truncated bandpass and the ordinary recursive bandpass (period 20, bandwidth 0.1) stay inside a tight band and agree with each other through 2019, then split after the March 2020 drop: the untruncated filter rings to about −15 points and is still negative at the right edge, while the truncated copy bottoms less deep and has already crossed back above zero. Earlier points are digitized from the Zorro comparison pane in the July 2020 Traders’ Tips; the final readings are the cursor labels printed on that plot (−3.221 untruncated, 0.95 truncated).SPY · Daily · 2018-11-01T00:00:00.000Z to 2020-04-30T00:00:00.000Z

Zorro snippet fixes Period 20, bandwidth 0.1, UnstablePeriod/truncation length 10, daily SPY from 2018-11-01. Mid-sample y-values are only to the nearest point because the traces overlap on a dark raster; 2019 wiggles are envelope readings, not exact peaks.

Default inputs in the teaching implementations

The supplied EasyLanguage construction uses Period 20, Bandwidth 0.1, and Length 10 as the default inputs for both the indicator and the strategy versions.

A companion platform reconstruction uses the same defaults of period 20, bandwidth 0.10, and length 10 when it instantiates the truncated series on close prices.

Educational research material, not investment advice. Historical source context does not establish present-day performance.
10 of 10 in the Finite Impulse Response Filter track
1986Track finished · Next track: Flag and pennantConstructing bounded relative-strength overlays from oscillator limits52 readings
All readings on this track · 10 readings
  1. 1982An odd-length smoother from a cycle cutoff
  2. 1989Smoothing filters, cutoff, poles, and sample delay
  3. 1992Constructing a cycle-aware finite impulse response detrender
  4. 2002Rebuild a smoother by writing the lag into the coefficients
  5. 2002Timing market cycles with finite impulse response filters and FFT
  6. 2002Constructing the relative strength index with an even-order finite-impulse-response prefilter
  7. 2003Recursive and cascaded moving-average construction
  8. 2006One second-order transfer function, a family of trend filters
  9. 2019Constructing the Voss line from a bandpass and a short FIR sum
  10. 2020Truncated bandpass construction as a finite-length trend filter
All 14 readings tagged Finite Impulse Response Filter
Also on Finite Impulse Response Filter5 readings