Skip to main content
Track Lowpass filter
8 / 9
Library

2016issue C0118-21

Building Nyquist-safe lowpass trend filters

Bar series are discrete samples taken once per chosen interval, not a continuous price path. A cycle can be recovered only with at least two samples per period, and shorter content can fold into a false composite waveform. Moving-average and lowpass trend filters are rebuilt so they sit far from that two-bar Nyquist bound.

  • Series used for analysis are discrete samples taken once per bar interval, so a cycle can be recovered only with at least two samples per period.
  • Nonlinear mixing at the sampling clock can fold shorter content into the observed band and form a false composite waveform, with modeled alias-to-signal impact largest at the two-bar Nyquist period.
  • A two-bar simple moving average has a transmission zero at Nyquist. A four-bar-cutoff lowpass stage further reduces near-Nyquist composite swing while limiting added lag.
  • Thirteen 30-minute samples per session move the same working cycle several octaves below the new Nyquist rate, and a 26-bar cutoff on that clock reduces lag versus the daily four-bar equivalent.
Entries in this reading3 entries

Bars are discrete samples

Series used for analysis are discrete samples taken once per chosen bar interval, not a continuous price path.

The Nyquist frequency on a bar clock

A cycle can be recovered only with at least two samples per period. That two-sample rate is the Nyquist frequency. On daily bars that bound is a two-bar period, and any shorter content cannot be recovered uniquely. Slower sampling records a phantom aliased cycle.

Aliasing and folded sidebands

Sampling mixes the sampling frequency with data frequencies and, because the mixing is nonlinear, can superimpose harmonic sidebands on the observed series. Nothing in a market series prevents content shorter than the Nyquist period, so the upper sideband can fold into the lower sideband and form a false composite waveform.

Aliasing is that artifact. A cycle shorter than two bars per period is recorded as a phantom longer cycle after the upper sideband folds into the observed band.

Where the modeled impact sits

A fractal-style spectrum construction sets swing amplitude proportional to cycle wavelength, so modeled amplitude doubles each time cycle period doubles. Under that construction the alias-to-signal impact peaks at the two-bar Nyquist period and falls below 0.5 dB at an eight-bar period, two octaves lower.

Trend filters built from 50-bar or 200-bar moving averages sit far from Nyquist, while two-to-five-bar pattern constructions sit inside the band where aliasing is modeled as largest.

A first-line moving average and a tighter lowpass

A two-bar simple moving average has a theoretical transmission zero at the Nyquist frequency and therefore functions as a first-line lowpass against near-Nyquist aliases. A two-bar window is the shortest mean that can place a transmission zero at the Nyquist period.

A four-bar-cutoff lowpass stage is specified as a tighter construction that further reduces composite swing near Nyquist while limiting added lag. A trend filter is a slower moving-average or lowpass stage whose lookback is kept far from the bar-interval Nyquist period so the output tracks longer swings instead of near-sample wiggle.

Oversampling the same working cycle

Oversampling rebuilds the same working cycle on a finer bar clock so the cycle of interest sits several octaves below the new Nyquist period and a matched lowpass can use a shorter cutoff. Thirteen 30-minute samples per session move the same working cycle several octaves below the new Nyquist rate. The oversampled lowpass is smoother, and a 26-bar cutoff on that clock reduces lag versus the daily four-bar equivalent.

Educational research material, not investment advice. Historical source context does not establish present-day performance.
8 of 9 in the Lowpass filter track
201842-45 pp.Next on Lowpass filterConstructing a Finite Impulse Response Filter compared with Exponential smoothingA Finite Impulse Response Filter depends on a finite window of input samples and drops those samples from the average once they leave that window.
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