Skip to main content
Track Highpass filter
7 / 7
Library

2020issue C0720-23

Finite-memory truncation for cycle filters

Truncation automatically limits how many past observations can shape an indicator, so a brief extreme does not keep dominating later output. This article rebuilds recursive highpass and lowpass stages inside a chosen window so initialization and lingering transients can be audited.

  • Truncation automatically limits the data range of an indicator so a brief extreme does not keep dominating later output.
  • A finite impulse response filter already forms each point from a sliding fixed window; truncation can only degrade that construction.
  • Recursive filters that reuse prior output change with sample length and with the bar where the recursion is started, so initialization is one reason to impose a finite history.
  • Truncating recursive cycle filters removes start-of-sample initialization error and shortens the transient left by a past shock, which matters because market observations are nonstationary.
Entries in this reading3 entries

What truncation changes

Truncation automatically limits the data range of an indicator so a brief extreme in the series does not keep dominating later output. The calculation is confined to a permitted history: distant observations and distant recursive terms are not allowed to keep shaping the current reading.

A finite impulse response filter already follows that rule. It computes each point from a fixed window that slides across ordered observations. A simple moving average, a relative strength index, and a stochastic oscillator use that construction.

Fixed windows versus recursive memory

Truncation can only degrade finite impulse response filters and other indicators built on a fixed window. Those constructions already refuse an unbounded past, so shortening the window further only discards observations the original design meant to use.

Recursive filters that reuse prior output are different. They change with sample length and with the bar where the recursion is started. That reuse is an infinite impulse response recursion: the required history does not end at a fixed window. Initialization is therefore one reason to impose a finite history.

Stopping an infinite lag series

A one-pole lowpass recursion sets the current output from the current input and the previous output. Its transfer response, the ratio of filter output to input, expands into an infinite lag series that can be stopped at any chosen power.

Because the weight placed on the previous output is less than one, later lag coefficients fade. A truncation length can be chosen at the lag where higher-power coefficients no longer affect the transfer response. The same finite-history idea can be applied by recomputing a higher-order recursion backward through an array.

Rebuilding a cycle-isolation filter

A cycle-isolation filter can combine a two-bar price difference, which has highpass character, with recursive terms on the prior two outputs, which retain lowpass memory. The highpass stage attenuates slow drift so shorter cyclic movement can remain. The recursive terms act as a lowpass stage that attenuates short fluctuations so a slower component can remain. Coefficients are fixed by a center period and a percentage bandwidth.

The truncated form restacks an array and recomputes that recursion over a finite length instead of carrying unbounded state. Each new bar starts from the chosen window rather than from an inherited remainder of every earlier output.

Truncated versus standard bandpass on daily SPY

A 10-bar truncated bandpass stays with the 2019 SPY advance and does not keep ringing after the December 2018 shock, while the infinite-memory bandpass sits in a valley at the mid-March price peak. Points were read from the lower pane of the published TradeStation figure; the last truncated print is the labeled -1.38.
A 10-bar truncated bandpass stays with the 2019 SPY advance and does not keep ringing after the December 2018 shock, while the infinite-memory bandpass sits in a valley at the mid-March price peak. Points were read from the lower pane of the published TradeStation figure; the last truncated print is the labeled -1.38.SPY · Daily · 2018-12-01T00:00:00.000Z to 2020-01-31T00:00:00.000Z

Source settings are center period 20 bars, 10 percent bandwidth, and a 10-bar truncation window on daily SPY from December 2018 into early January 2020. The red and blue traces overlap on the dark raster, so amplitudes are approximate to one decimal; the mid-March peak-versus-valley contrast follows the author's description of this same figure.

Educational research material, not investment advice. Historical source context does not establish present-day performance.
7 of 7 in the Highpass filter track
1988Track finished · Next track: Historical analog comparisonCrash fear fails the depression regime test38 readings
All readings on this track · 7 readings
  1. 2006Constructing lowpass, highpass, and finite impulse response filters from one recurrence
  2. 2006Constructing a trend filter from a cycle-length moving average and a highpass residual
  3. 2014Constructing a roofed stochastic from highpass and lowpass stages
  4. 2014The dual-K highpass roofing filter is unfinished until three choices are written together
  5. 2015Constructing a decycler from high-pass cancellation
  6. 2015Constructing decycler oscillators from highpass and bandpass filters
  7. 2020Finite-memory truncation for cycle filters
All 7 readings tagged Highpass filter
Also on Highpass filter5 readings