Skip to main content
Global Market Radar

Market Basics · Chart Academy · Smoothing filters · Updated 2026-08-30

Smoothing, lag and the Kalman filter

SMA, EMA, Wilder's SMMA, the weighted WMA and a Kalman trend estimate compared honestly — every smoother trades lag for noise, and none of them forecasts.

평활화, 지연, 그리고 칼만 필터 — 단순·지수·와일더(SMMA)·가중(WMA) 이동평균과 칼만 추세 추정을 정직하게 비교합니다. 모든 평활화는 지연과 잡음을 맞바꾸며, 어느 것도 미래를 예측하지 않습니다.

What it is

Every line drawn through price is a weighted average of past closes. What separates one smoother from another is only how the weights are spread, and that choice fixes two things at once: how much of the bar-to-bar noise is removed, and how far behind a moving market the line runs. Less noise always costs more lag. No weighting escapes that trade; it only chooses a point on it.

A useful single number for lag is the centre of mass of the weights — how many bars back the average effectively sits. On a market rising at a constant rate, a line lags by exactly that many bars. GMR's own test suite runs each of these filters over a steady ramp and checks the figures below, so they are measured, not quoted:

  • SMA (simple) — equal weights over n bars. A 20-bar SMA sits 9.5 bars behind a steady trend: (n − 1) ÷ 2.
  • EMA (exponential) — weight 2 ÷ (n + 1) on the newest bar, decaying geometrically. A 20-bar EMA also settles 9.5 bars behind; it reacts sooner to a turn because recent bars weigh more, but its average lag equals the SMA's.
  • SMMA / RMA (Wilder's smoothing) — an exponential average with weight 1 ÷ n. A 20-bar SMMA sits 19 bars behind, twice the SMA — which is why Wilder's RSI and ATR move so slowly.
  • WMA / LWMA (linearly weighted) — weights n, n − 1 … 1. A 20-bar WMA sits about 6.3 bars behind, (n − 1) ÷ 3, and passes more noise through in exchange.
  • Kalman filter — not a fixed window but a model: the level is assumed to wander (process noise Q) and each close is assumed to be that level plus measurement noise (R). The filter blends its prediction with each new close in the proportion the two noises imply.

How to spot it

The Kalman filter's behaviour is set by one ratio, q = Q ÷ R: how much the true level is believed to move per bar compared with how noisy a single close is. A large q trusts each close and follows price closely; a small q trusts the model and smooths hard.

The simplest version — a local level with no velocity — settles to a constant blending weight K = (√(q² + 4q) − q) ÷ 2. At that point it is exactly an exponential average with weight K. With q = 0.02, K is about 0.13, which behaves like an EMA of about 14 bars and lags a steady trend by about 6.6 bars. So a local-level Kalman filter on its own is not magic; it is an EMA whose weight was derived from assumptions about noise.

The version that changes the trade adds velocity to the state: the filter estimates both where the level is and how fast it is moving, and predicts the next bar from both. On a steady trend its lag goes to zero once it has settled, and its velocity recovers the trend's slope. The cost is noise and overshoot: when the trend turns, the filter carries the old velocity forward for a few bars before the new closes correct it.

GMR computes a causal level-plus-velocity Kalman estimate in its internal chart lab: each bar's value uses only that bar and earlier ones, so an estimate never changes after the fact. It reports the estimated drift in units of ATR, where price sits against the estimate, and — separately — the support and resistance zones, the gated RSI and the Bollinger position beside it. It is not yet part of GMR's published answers.

Why people watch it

Traders reach for faster averages to see a turn sooner and slower ones to ignore noise, and each new average is usually a new point on the same lag-versus-noise line. The Kalman filter is popular because it states its assumptions explicitly and, with velocity in the state, removes the steady-trend lag that every fixed moving average carries.

Its popularity in trading scripts also means it is often presented as more than it is — a line that 'predicts' price, or signals that repaint. A causal filter describes the recent past. A smoother that looks at later bars to draw earlier ones looks accurate on a finished chart and cannot be reproduced in real time.

Confirmation

A trend read from any smoother is confirmed by the same things that confirm a trend without one: market structure making the matching sequence of swings, and price accepted beyond the relevant support or resistance zone. The estimate's slope agreeing with structure is one piece of evidence. Bollinger bands, moving averages and a Kalman estimate are all computed from the same closes, so their agreement is one piece of evidence counted once, not three.

Invalidation

A trend estimate stops describing the market when price keeps crossing back and forth through it, when its slope flips repeatedly within a few bars, or when structure and zones say range while the line still leans. In a range every smoother turns into noise-following; in a sudden gap or regime change a level-plus-velocity filter overshoots before it recovers. Q and R are assumptions, and a market that changes its volatility breaks them — adaptive noise can soften that, within bounds, but never removes it.

Common mistakes

  • Treating a lower-lag line as a forecast. Zero lag on a steady trend means it keeps up with the trend, not that it sees the next bar.
  • Using a smoother that repaints — one that revises earlier values when new bars arrive — and judging it on how good it looks in hindsight.
  • Tuning Q and R until the line fits last month's chart. A setting fitted to one regime is a description of that regime, not a property of the market.
  • Reading a crossing of price and the estimate as a trade instruction. It is the moment one smoothed description of the past changed sides.
  • Counting SMA, EMA, Bollinger and Kalman as independent confirmations when all of them are weighted averages of the same closes.

Quick check

  1. 1. A 20-bar SMA and a 20-bar EMA follow a market rising at a constant rate. How far behind does each settle?

    • The EMA settles far closer
    • Both settle about 9.5 bars behind
    • The SMA settles closer
    • Neither lags on a steady trend
    Show answer

    B. Both settle about 9.5 bars behind

    Their weights have the same centre of mass, (n − 1) ÷ 2 bars. The EMA reacts sooner to a turn, but on a steady trend its lag equals the SMA's.

  2. 2. What does raising q = Q ÷ R do to a Kalman trend estimate?

    • Nothing, only R matters
    • It follows each close more closely: less lag, more noise
    • It predicts further ahead
    • It removes the need for support and resistance
    Show answer

    B. It follows each close more closely: less lag, more noise

    A larger q says the level really moves a lot relative to how noisy a close is, so each close is trusted more. That is the same lag-for-noise trade every smoother makes, with the setting stated as an assumption.

  3. 3. Why does GMR only use a causal (forward-only) Kalman filter?

    • Causal filters are always smoother
    • Because a value that uses later bars changes after the fact and cannot be reproduced in real time
    • Because smoothing is not allowed
    • Because causal filters never lag
    Show answer

    B. Because a value that uses later bars changes after the fact and cannot be reproduced in real time

    A two-sided smoother looks perfect on a finished chart because it used the future to draw the past. A causal estimate at each bar is what could actually have been known then — it lags, and it never repaints.