Six ways to build a moving average
Every smoothing indicator is one of a small number of constructions. This page puts 12 of them on one ruler — the same four numbers for each, computed from the coefficients and not from any market — so that for once they can be compared instead of advocated.
Not one of the numbers below comes from a chart. They are properties of the coefficients, so no backtest can disagree with them, no choice of period or instrument can flatter one filter over another, and you can recompute every one of them from the exported taps in a spreadsheet.
What the four numbers are
| Number | What it is |
|---|---|
| Lag | How many bars behind price the line sits: the centre of mass of the impulse response, which for taps summing to 1 is exactly the group delay at zero frequency. |
| Noise gain | What it does to the variance of random movement — the sum of the squared taps. Below 1 it damps, above 1 it amplifies. |
| Peak gain | The most it magnifies anything, at any frequency. Usually not in the band it keeps but in the transition just below it, which is where a fast design overshoots. |
| Leak | How much of the movement faster than 4.0 bars still gets through, at the single frequency it handles worst. |
12 filters, measured identically
| Filter | Method | Lag | Noise | Peak | Leak | vs an EMA of the same lag |
|---|---|---|---|---|---|---|
| SMA | windowed | 11.50 | 0.0417 | 1.000 | 0.05546 | leak 0.942× · noise 1.00× |
| WMA | windowed | 7.67 | 0.0544 | 1.000 | 0.05656 | leak 0.654× · noise 0.889× |
| ALMA (0.85/6) | windowed | 4.62 | 0.0922 | 1.000 | 0.05202 | leak 0.378× · noise 0.944× |
| EMA | poles | 11.50 | 0.0417 | 1.000 | 0.05887 | leak 1.00× · noise 1.00× |
| Ehlers SuperSmoother | poles | 4.93 | 0.0920 | 1.000 | 0.02421 | leak 0.187× · noise 1.00× |
| Hull | cascade | 0.67 | 0.1792 | 1.287 | 0.04552 | leak 0.0817× · noise 0.418× |
| ZLEMA | cascade | 0.50 | 0.1417 | 1.145 | 0.14882 | leak 0.235× · noise 0.283× |
| T3 (v=0.7) | cascade | 10.35 | 0.0420 | 1.135 | 0.00095 | leak 0.0146× · noise 0.911× |
| Ehlers Laguerre (g=0.8) | laguerre | 17.50 | 0.0309 | 1.000 | 0.00547 | leak 0.139× · noise 1.11× |
| ours, Fast | least-squares | 4.38 | 0.2454 | 1.570 | 0.01026 | leak 0.0713× · noise 2.40× |
| ours, Balanced | least-squares | 7.66 | 0.1514 | 1.062 | 0.00169 | leak 0.0195× · noise 2.47× |
| ours, Smooth | least-squares | 18.50 | 0.1299 | 1.004 | 0.00154 | leak 0.0415× · noise 4.94× |
Leak is measured over periods of 4.0 bars and shorter for every row, which is what makes the column comparable across the table. The generator on each method page prints it over that design's own stopband instead — the more useful figure there, and a different one.
What the table says
Read down the lag column, not down the names: filters only argue with each other at equal delay. The lowest leak here belongs to T3 (v=0.7) at 0.00095, and the highest noise gain to ours, Fast at 0.2454 — two different filters, which is the whole point. Rejection is bought with tap energy; lag is bought back with negative coefficients; the two mechanisms have different price lists, and no name tells you which one you have.
Zero lag, and what it costs
Every few months somebody publishes a smoother that claims no lag, and the argument that follows is about whether that is possible. It is, it is not new, and it is measurable. Tillson's T3 has carried a dial for it since 1998.
| v | Lag | Noise | Peak | Leak |
|---|---|---|---|---|
| 0.0 | 34.50 | 0.0156 | 1.000 | 0.00020 |
| 0.3 | 24.15 | 0.0222 | 1.000 | 0.00044 |
| 0.7 | 10.35 | 0.0420 | 1.135 | 0.00095 |
| 1.0 | 0.00 | 0.0728 | 1.479 | 0.00153 |
At v=0 it is a plain triple cascade, 34.50 bars behind price, leaking 0.00020. At v=1 the lag is 0.00 — not nearly zero, zero — and the bill is a noise gain of 0.0728 against 0.0156 and a peak gain of 1.479 against 1.000. The question was never whether zero lag exists. It is whether the thing offering it also tells you that it carries 37% past the top of every move before it settles.
The methods, one page each
- Windows — Choose a shape, normalise it, and the shape is the filter. In the table above: SMA · WMA · ALMA (0.85/6).
- Poles — Place the poles of a recursion and let it run. In the table above: EMA · Ehlers SuperSmoother.
- Cascades — Build something smooth and late, then subtract a deeper copy of it to cancel the lateness. In the table above: Hull · ZLEMA · T3 (v=0.7).
- Laguerre — One exponential average, then all-pass sections that only delay, recombined. In the table above: Ehlers Laguerre (g=0.8).
- Least squares — State the response you want, including the delay, and solve for it. In the table above: ours, Fast · ours, Balanced · ours, Smooth.
- Adaptive — Re-estimate the period every bar. The one construction with no fixed response, which is why it is absent from the table above.
What this cannot tell you
What is measured here is the filter: how far behind price it sits, what it does to random movement, how much it overshoots, how much of the fast movement it lets through. Nothing here measures what happens when you trade with one. That depends on the rule you put it in, and we have not tested yours.
So the table answers one question and not the other. It is for choosing a delay with the bill in front of you, instead of choosing a name.