2.43 Recursive vs Non-Recursive: The Two Families of Every Indicator

Every indicator is one of two families: non-recursive (FIR: inputs only, stable, lag = degree/2) or recursive (IIR: eats its own output, cheap, sharp, can ring). The family predicts the failures.

2.43 Recursive vs Non-Recursive: The Two Families of Every Indicator

The old article "Why Traders Should Analyze Indicators Mathematically" argued that every indicator is a signal-processing operation, and the old article "The Transfer Function View: Characterizing Any Indicator with the Z-Transform" showed how to write any linear one as a ratio of two polynomials. This article makes the split that ratio implies. There are exactly two families of linear filter, and every moving average, oscillator, and smoother you have ever used belongs to one or the other. Which family a filter is in determines its lag behavior, its stability, and its cost, before you know anything else about it. Learn the dividing line and you can predict a filter's worst habits from its structure alone.

The line: does the filter eat its own output?

Write any linear filter as output equals numerator over denominator times input, with the leading denominator coefficient set to one.

$$ \text{output} = \frac{b_0 + b_1 z^{-1} + b_2 z^{-2} + \cdots}{1 + a_1 z^{-1} + a_2 z^{-2} + \cdots}\;\text{input} $$

The numerator uses only input data, past and present prices. The denominator uses previously computed outputs, the filter's own past results. That single distinction names the two families. If the denominator is trivial, the filter touches only inputs, and it is non-recursive. If the denominator carries real terms, the filter feeds its own output back in, and it is recursive. Rearranged for computation, a recursive filter reads output equals the input terms minus the fed-back output terms, which is why it can remember forever from one or two stored numbers. Every indicator sorts into one of these two bins by this one question: does it eat its own output.

Non-recursive: finite memory, honest lag, no surprises

A non-recursive filter is a weighted sum of past inputs and nothing else. Its impulse response is finite, the family name FIR, finite impulse response, because once a price falls out of the window it is gone. The simple moving average is the plain case, equal weights summed over N bars. With only a numerator, the transfer function is a single polynomial, and you can factor that polynomial into roots called the zeros of the response, the cycle speeds the filter kills dead.

The property that makes this family worth using is its lag behavior. A non-recursive filter whose coefficients are symmetric about the center has a lag equal to its degree divided by two, and that lag is the same at every frequency.

$$ \text{lag} = \frac{\text{degree}}{2}\ \text{bars, constant across all frequencies} $$

A degree-six symmetric filter lags three bars, whether the cycle is fast or slow. That is linear phase, and it matters because the filter delays every component by the same amount, so it does not distort the shape of a waveform passing through, it only shifts it. The cost is bluntness: a sharp non-recursive filter needs many taps, which means more lag and more computation, and the simple moving average pays for its equal weights with leaky sidelobes, the failure detailed in the old article "Why the SMA Is Often a Terrible Smoother." What you get in return is predictability. A non-recursive filter cannot go unstable and holds no nasty resonances; what you see in its coefficients is what you get.

Recursive: infinite memory, cheap and sharp, occasionally feral

A recursive filter feeds its own output back, so its impulse response is infinite, the family name IIR, because a piece of every past bar lives on forever in the feedback. The exponential moving average is the canonical case: today's value is a slice of today's price plus the rest of yesterday's output, one stored number holding the entire history. With a real denominator, the transfer function's denominator polynomial factors into roots called poles, the feedback resonances, and the EMA has exactly one.

The payoff is efficiency. A recursive filter gets a sharp response from one or two stored values, where a non-recursive filter would need dozens of taps for the same steepness. That O(1) or O(2) state is decisive for streaming and intraday work. The price is that feedback comes with teeth. A recursive filter does not have linear phase, so its lag varies with frequency and it distorts waveform shape, not just timing. A pole placed badly makes the filter ring, overshoot, or in the worst case run away unstable, none of which a non-recursive filter can do. So the families trade cleanly: non-recursive buys you stability, linear phase, and transparency at the cost of many taps and lag; recursive buys you sharpness and near-zero storage at the cost of nonlinear phase, possible ringing, and the chance of instability.

Why the label is the first thing to check

Knowing a filter's family tells you its failure modes before you test it. Hand me a non-recursive filter and I know its lag from its degree, I know it is stable, and I know its main risk is sidelobe leakage from a poor window. Hand me a recursive filter and I know it is cheap and can be sharp, and I know to check it for ringing, frequency-dependent lag, and stability of its poles. Most of the smoothers in this pillar, the EMAs, the super-smoother, the Butterworth, the band-pass recursions, are recursive, which is why poles and ringing keep coming up. Most of the windowed averages and the difference-based detrenders are non-recursive, which is why their lag is a clean degree-over-two. When you reach for an indicator, read its structure first: the family it belongs to has already decided half of how it will behave and how it will fail, and the old article "The Trader's Guide to Low-Pass Filters" picks pole counts inside exactly this recursive family.

KEY POINTS

  • Write any linear filter as numerator over denominator times input. The numerator uses inputs only; the denominator uses the filter's own past outputs. That split defines the two families.
  • Non-recursive (FIR) filters use inputs only, have finite memory, and their numerator factors into zeros (cycles killed). The SMA is the plain case.
  • A symmetric non-recursive filter lags by degree over two, the same at every frequency (linear phase), so it shifts a waveform without distorting its shape. It is stable and transparent but needs many taps for sharpness and can leak through sidelobes.
  • Recursive (IIR) filters feed their output back, have infinite memory from one or two stored numbers, and their denominator factors into poles (resonances). The EMA is the canonical case, with one pole.
  • Recursive filters are cheap and sharp but have nonlinear (frequency-dependent) lag, can ring or overshoot, and can go unstable if a pole is misplaced, none of which a non-recursive filter can do.
  • The family is the first thing to check: it predicts the failure modes. Most smoothers in this pillar are recursive (watch for ringing and unstable poles); most windowed averages and difference detrenders are non-recursive (clean degree-over-two lag).

References