2.36 Zero-Lag EMA: The Kalman Filter, Simplified
The zero-lag EMA borrows the Kalman predict step: smooth Price + kappa*velocity, so the slope cancels lag in trends. The same guess overshoots reversals, so it is no turn detector.
The old article "The Hidden Cost of Every Moving Average: Lag" established the rule no smoother escapes: averaging the past reports the past, so the output trails price by a structural delay you pay in money and missed entries. The old article "Why Moving Averages Can Lie at Turning Points" showed where that lag does the most damage, at the turn, when a moving average is still reporting the regime that just ended. The zero-lag EMA is the most honest attempt to cut that delay, and it works by stealing one idea from the Kalman filter: do not just smooth the price you have, add a guess about where it is going next.
Smooth the forecast, not the price
A plain EMA smooths the current price. The Kalman filter, the optimal estimator Kalman built for navigation, does more: it tracks both position and velocity, and uses the velocity to predict the next position before the next measurement arrives. Ehlers stripped that idea down to a single line that keeps the prediction and drops the heavy machinery.
$$ \text{ZEMA}[n] = \alpha\,(\text{Price} + \kappa V) + (1-\alpha)\,\text{ZEMA}[n-1], \qquad \alpha = \frac{2}{M+1} $$
The structure is a normal EMA, with one substitution. Where a plain EMA feeds in the raw price, the zero-lag EMA feeds in the price plus a velocity term, kappa times V, where V is the estimated velocity, the recent slope, and kappa is a tunable gain that scales how far ahead you lean. The quantity Price plus kappa-V is the predicted next price: take where you are, add where the slope says you are going. Smooth that forecast instead of the bare price and the output sits closer to the live price than a same-length EMA, because the velocity term cancels part of the delay that the averaging introduces. It is the Kalman filter's predict step without the covariance bookkeeping.
Why the velocity term cancels lag
Lag exists because an average is weighted toward older bars, so its center of mass sits behind the present. Adding kappa times the slope nudges the input forward by an amount proportional to how fast price is moving, which offsets the backward pull of the average. In a steady trend the slope is roughly constant, the forward nudge roughly matches the backward lag, and the two cancel, so the zero-lag EMA hugs the trend where a plain EMA trails it. Turn kappa up and you lean further ahead and cut more lag; turn it down toward zero and the whole thing collapses back into an ordinary EMA. The name oversells it, the way every zero-lag name does: this is lag reduction, not lag elimination, and the residual delay is real, just smaller.
It is worth naming what the filter is, structurally. The zero-lag EMA is recursive, an infinite impulse response filter, because it feeds its own past output back in, so it carries infinite memory from one stored number like any EMA. That makes it cheap, one state variable, a few multiplies per bar, which is why it can run on streaming data without the matrix work a full Kalman filter demands. You get most of the Kalman predict benefit at a fraction of the Kalman cost.
The trap is exactly the turning point
The velocity term is a blessing in a trend and a curse at a turn, and the old article "Why Moving Averages Can Lie at Turning Points" already told you why. The forward nudge assumes the recent slope continues. While price trends, that assumption holds and the lag cancels. At a reversal the slope is about to flip, so the velocity term points the prediction the wrong way, leaning the filter further into the old direction at the precise moment the market changes its mind. The zero-lag EMA overshoots the turn and can fire a confident signal in the dying direction.
This is the same failure that haunts every prediction-based lag reducer, including the Kalman models it imitates: they buy responsiveness in trends by extrapolating slope, and they pay for it at reversals, which is when you most wanted to be right. A larger kappa cuts more lag in trends and overshoots harder at turns, so the gain is not a free dial, it is a slider between trend-tracking and turn-safety. The practical rules follow directly. Tune kappa to the smallest value that gives acceptable trend lag, not the largest that looks impressive on a trending backtest. Do not use the zero-lag EMA as a turning-point detector, because that is its worst job. And whatever lag you measured on trending history, expect it to reappear as overshoot at the next reversal, because the same velocity term produces both.

KEY POINTS
- The zero-lag EMA cuts the structural delay from the old article "The Hidden Cost of Every Moving Average: Lag" by stealing the Kalman filter's predict step: smooth a forecast of the next price, not the current price.
- The forecast is Price plus kappa times V, where V is estimated velocity (recent slope) and kappa is a tunable gain. Feed that into a normal EMA recursion and the output hugs price closer than a same-length EMA.
- The velocity term cancels lag because the forward nudge offsets the average's backward center of mass. In a steady trend the two roughly cancel; kappa scales how far ahead you lean.
- It is a recursive (infinite impulse response) filter: one stored state, a few multiplies per bar, which delivers most of the Kalman predict benefit without the covariance matrix machinery.
- "Zero-lag" oversells it. This is lag reduction, not elimination, and the residual delay is real, just smaller. Set kappa to zero and it becomes a plain EMA.
- The slope assumption breaks at reversals, so the filter overshoots turns and can signal in the dying direction, the exact failure from the old article "Why Moving Averages Can Lie at Turning Points." Tune kappa small, never use it as a turn detector, and expect trend lag savings to return as turn overshoot.
References
- Statistically Sound Indicators for Financial Market Prediction - Timothy Masters (Amazon)
- Cycle Analytics for Traders - John Ehlers (Amazon)
- Trend Without Hiccups: A Kalman Filter Approach (position + velocity, lag reduction, SP500 tests, arXiv)
- MESA Software Technical Papers: Zero Lag, Kalman and Alpha-Beta Filters (John Ehlers)
- Zero Lag Error-Corrected EMA: construction and signals (QuantWave)
- What is the Zero-Lag Exponential Moving Average (ZLEMA) (TrendSpider Learning Center)