Who this entry is for — Every moving average in the book — half-span, full-span, inverse — rests on this derivation. Four facts to take home: half-span lag, an exact zero at period equal to the span, a constant −0.23 error lobe, and the law of nature that saves the whole thing.
Source: J. M. Hurst, The Profit Magic of Stock Transaction Timing, Prentice-Hall, 1970 — Appendix IV, Frequency Response Characteristics of a Centered Moving Average (pp. 207–211, Figs. A IV-1, A IV-2).
Prerequisites
The cyclic moving averages (Ch. 3/6) and, for context, the numerical filters (Ch. 11).
The derivation
Feed the average a pure cosine, eᵢ = A·cos(ωt), and compute the centred output. Collecting terms, the output/input ratio — the amplitude ratio — comes out as:
aᵣ = (1 + 2f) / n — where f = cos(ωtₙ) + cos(2ωtₙ) + … + cos(((n−1)/2)·ωtₙ)
with n the number of elements and tₙ the data spacing. Every property follows from this exact formula — and the figures below draw it as is.
The four properties
- Phase: output is exactly in phase with input across the whole spectrum — except for 180° phase reversals in the odd error lobes. The lag is constant: half the span.
- Cutoff: the response first zeroes when the cycle's period equals the span (n·tₙ). Choosing the span = choosing which component vanishes entirely — the rule behind full-span and half-span.
- The −0.23 lobe: the first error lobe past cutoff is −0.23, constant, independent of design parameters; subsequent lobes alternate in sign as they shrink. High frequencies "creep through" attenuated, in or out of phase: the residue to recognize when hunting component turns.
- One knob only: the characteristics are entirely fixed by the span — there is nothing else to design.
Why such a mediocre filter works — The error lobes are Gibbs oscillations, the fault of the weighting function's square corners. As a generic "smoother" the MA would be poor — "except for the fact that the spectrum of stock prices consistently displays the aᵢ = k/ωᵢ relationship derived in Appendix One. It is only the sharp attenuation of high frequencies characteristic of stock price motion that permits the utilization of a filter with such relatively poor characteristics."
The inverse: the mirror
The inverse has response 1 − aᵣ: it behaves as a high-pass, again with error lobes up to 23% — but with one precious difference: no phase inversion, ever; the output is perfectly in phase across the entire spectrum, with the same half-span lag. The response first reaches 1 at period = span and in the lobes exceeds it by nearly ¼: when using the inverse to estimate a component's amplitude, correct for the excess.
Summary card
| Property | Value |
|---|---|
| Exact response | aᵣ = (1 + 2f)/n, f = Σ cos(k·ωtₙ) |
| Lag | ½ span, constant |
| First zero | period = span (n·tₙ) |
| First error lobe | −0.23, constant, out of phase |
| Folding | first window at period = tₙ |
| Inverse | 1 − MA: high-pass, always in phase, ≈ +0.23 overshoot |
| The lifesaver | the aᵢ = k/ωᵢ law of stock prices (App. I) |
Links
- Appendix I — the k/ω law that makes the MA usable
- Half-span and full-span — the span in operation
- The inverse — the high-pass mirror
- The Ormsby filters — how the corners get rounded
- The appendices — index
- Hurst tradition — chapter index