In one sentence — An Ormsby filter is a mathematical sieve: it mainly retains oscillations inside a chosen band and attenuates the rest. Its output describes the available data; by itself, it does not forecast the next segment.
How do Ormsby numerical filters work according to Hurst?
In Chapter 11 of The Profit Magic of Stock Transaction Timing, Hurst starts with a concrete analogy. A moving average is a poorly selective sieve: it passes low frequencies, meaning slow oscillations. Its inverse mainly retains high frequencies. A band-pass filter instead retains the interval between two boundaries.
Hurst adapts a design published by Joseph F. A. Ormsby. First the desired response is drawn; then a finite sequence of weights is calculated to approximate it. The filter does not automatically “find” a cycle: the researcher decides in advance which band to examine.
The band in four frequencies
The desired response is a trapezoid. Its four angular frequencies are ordered as ω₁ < ω₂ < ω₃ < ω₄:
- below
ω₁, the desired response is zero; - between
ω₁andω₂lies the first transition zone; - between
ω₂andω₃, the response is about one, so the band is retained; - between
ω₃andω₄, the filter gradually returns to zero.
The ramps matter as much as the middle. A finite filter cannot produce a perfectly vertical wall: a component near a boundary may be only partly attenuated. All four frequencies therefore need to be reported, not just a “central” period.
The sampling interval t is part of the design. Weights built for observations seven weeks apart cannot be applied unchanged to daily or weekly closes. Frequencies, periods, and the Nyquist limit must use the same unit.
From weights to output
With an odd number n of weights there is one central coefficient. Let h = (n−1)/2; the output associated with point c is:
y_c = Σ w_j x_{c+j}, with j from −h to +h.
Each price in the window is multiplied by its weight; the products are added; the window advances by one observation. Hurst also subtracts the mean of all weights from every coefficient. The final weights sum to zero, so the zero-frequency component does not pass.
The weights are symmetric around the centre. If the output is placed on the middle datum, admitted components remain aligned: this is the historical meaning of zero phase in the procedure. Zero phase does not mean zero delay. A causal version that uses only present and past observations must wait or shift the result and therefore has group delay.
The missing edge
Computing y_c requires h observations before and h after the centre. Near the latest date, those future observations do not exist. The historical chart can therefore show the centred curve only up to half a span before the present.
In the book's example, n = 199, so h = 99. With one observation every seven weeks, the unavailable margin is 99 × 7 = 693 weeks, about 13.3 years on each edge. Hurst accepts this cost because he is studying decades of past data. It is not a configuration intended as a real-time trading signal.
Filling the edge with future data, extrapolation, or padding creates different objects and can alter amplitude and phase. A reproducible test must state the boundary rule.
The book's historical example
Figure XI-1 uses 199 weights, observations spaced seven weeks apart, and four boundaries at 0.85, 1.25, 2.05, and 2.45 radians per year. The halfway points on the two ramps correspond to periods of about 6.0 and 2.8 years. Hurst therefore describes a 50%-or-greater passband of 2.8–6.0 years, chosen to study the nominal oscillation near 4.5 years.
His practical rule links the approximation to the product n·t·Δω, where Δω = ω₂−ω₁ = ω₄−ω₃. In the example, 199 × 7 × 0.4 = 557.2. Hurst associates values between 500 and 700 with a design error of about 2.5–1%.
That percentage measures how far the realized frequency response departs from the desired trapezoid. It is not a forecast error, does not measure return, and does not show that the selected component will persist.
What the output actually shows
On a synthetic series built from a trend, several oscillations, and noise, the filter can recover the component inserted in its band. The test confirms the sieve's mathematical operation on the same sample; it is not independent validation on market data.
On real prices, a filtered curve shows the portion of the data admitted by that design. It does not identify the cause of an oscillation, guarantee that its period is stable, or provide a buy or sell signal by itself.
To assess predictive use, the data, band, number of weights, edge treatment, and decision rule are frozen in advance. Performance is then measured on a later out-of-sample interval that was never used to choose the parameters. Simple alternatives and trading costs also belong in the comparison.
Sources
- J. M. Hurst, The Profit Magic of Stock Transaction Timing, Prentice-Hall, 1970, Chapter 11, pp. 175–183 — sieve, frequency response, precision-delay trade-off, design, and centred application.
- Joseph F. A. Ormsby, Design of Numerical Filters with Applications to Missile Data Processing, Journal of the ACM, 8(3), 1961, pp. 440–466 — the original work cited by Hurst.
- SciPy,
firwin2— modern construction of a linear-phase FIR from desired frequencies and gains. - SciPy,
freqz— modern computation of a digital filter's complex frequency response.
Connections
- Spectral analysis according to Hurst — the Chapter 11 framework
- Fourier analysis according to Hurst — describing candidate frequencies
- DJIA spectral decomposition — the historical band-pass application
- Inverse moving average — the high-pass comparison
- Moving-average response — why the average is a weak separator
- Hurst tradition — the complete historical path