Skip to main content
Track Highpass filter
2 / 7
Library

2006issue C081-9

Constructing a trend filter from a cycle-length moving average and a highpass residual

A market series can be rebuilt as an instantaneous trendline plus a smoothed Highpass filter residual. The cycle-length Moving average cancels the dominant cycle so price is reconstructed from explicit trend and cycle parts.

  • A simple Moving average whose length equals the measured dominant cycle is constructed to cancel that cycle and its harmonics while passing lower-frequency components.
  • The instantaneous trendline is assembled as that cycle-length simple Moving average plus half of a three-bar-weighted momentum or slope term.
  • The Highpass filter residual uses a stated alpha and a first-difference recursion, then a three-bar weighting, with a first-difference fallback when fewer than four bars are available.
  • The market-model series is the sum of the instantaneous trendline and the smoothed Highpass filter residual, with default inputs of median or mid-range price and a length of 20 bars.
Entries in this reading3 entries

A constructed market series

The archive workflow builds a market-model series from two explicit parts. One part is an instantaneous trendline that starts from a cycle-length Moving average. The other is a Highpass filter residual that is smoothed and added back to that trendline.

The sum reconstructs price from explicit trend and cycle parts. The Trend filter in this workflow is the assembled instantaneous trendline, not a separate unexplained series.

The cycle-length moving average

A simple Moving average whose length equals the measured dominant cycle is constructed to cancel that cycle and its harmonics while passing lower-frequency components.

The instantaneous trendline

The instantaneous trendline is assembled as the cycle-length simple Moving average plus half of a three-bar-weighted momentum or slope term.

The highpass residual

The Highpass filter residual uses an alpha of (1 - sin(360 / Length)) / cos(360 / Length) and a first-difference recursion of the form 0.5 * (1 + alpha) * (Price - Price[1]) + alpha * HP[1].

The Highpass filter output is then three-bar weighted as (HP + 2*HP[1] + 2*HP[2] + HP[3]) / 6, with a first-difference fallback when fewer than four bars are available.

Reconstructing the series

The market-model series is the sum of the instantaneous trendline and the smoothed Highpass filter residual, reconstructing price from explicit trend and cycle parts.

Default construction inputs in the supplied implementations include median or mid-range price and a length of 20 bars.

E-mini S&P 500 rebuilt from the instantaneous trendline and highpass residual

Daily continuous E-mini S&P 500 from April 2005 through March 2006. The smoother line is the instantaneous trendline, a cycle-length average plus a smoothed momentum term. Adding the smoothed highpass residual rebuilds a series that stays with the futures close, including the final printed close 1257.50 and model print 1248.80. Values were read from the TradeStation figure, not from a table.
Daily continuous E-mini S&P 500 from April 2005 through March 2006. The smoother line is the instantaneous trendline, a cycle-length average plus a smoothed momentum term. Adding the smoothed highpass residual rebuilds a series that stays with the futures close, including the final printed close 1257.50 and model print 1248.80. Values were read from the TradeStation figure, not from a table.CME E-mini S&P 500 continuous futures (ES) · Daily · 2005-04-01T00:00:00.000Z to 2006-03-31T00:00:00.000Z

Interior points are digitized from the raster to the nearest few index points. The model and trend use median price (H+L)/2 and length 20. The cyclic-component pane on the same figure uses length 15 and is omitted because it is on a different scale.

Educational research material, not investment advice. Historical source context does not establish present-day performance.
2 of 7 in the Highpass filter track
201461-62 pp.Next on Highpass filterConstructing a roofed stochastic from highpass and lowpass stagesThe construction presents three linked stages: a two-pole lowpass smoother, a roofing filter that runs a highpass stage before that same lowpass, and a stochastic oscillator on the roofed series.
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