EVIDENT
Sign in
← Blog

Cutting moving-average lag without overfitting: Kalman and Ehlers DSP filters on Bitcoin

Why classical moving averages lag price turns by half their window length, and what happened when we tested state-space Kalman and Ehlers SuperSmoother filters on 1,000 daily Bitcoin candles.

October 12, 2026 · 2 min read · Evident · English · Türkçe

Every trend trader knows the dilemma of a moving average. Make the window short and you get chopped to pieces in sideways noise; make it long and half the move is over before the crossover fires.

Short answer: a classical $N$-bar simple moving average introduces a group delay of $(N-1)/2$ bars because it weights stale prices equally with today's close. Replacing raw moving averages with a state-space velocity Kalman filter (kalman(close, 0.05)) paired with John Ehlers' 2-pole Butterworth SuperSmoother (supersmoother(close, 21)) and a Choppiness regime gate returned +39.57% net of fees with a 1.45 Profit Factor on 1,000 daily BTCUSDT candles.

Why classical averages lag

From a signal-processing perspective, a daily price chart is a low-frequency trend wave buried inside high-frequency microstructure noise. A Simple Moving Average (SMA) is the crudest low-pass filter possible: it lets high-frequency aliasing leak through while delaying the phase of the signal.

Two mathematical tools from control theory and digital signal processing (DSP) address this directly in Evident's Indicator Lab and Strategy Studio:

  1. **Ehlers SuperSmoother (supersmoother(src, n)):** a 2-pole Butterworth filter combined with 2-bar alias cancellation. It attenuates short-period whipsaw noise far more sharply than an EMA of the same length.
  2. **State-Space Velocity Kalman Filter (kalman(src, gain)): instead of averaging past levels, it tracks a two-element state — position and velocity**. When a breakout accelerates, the velocity term pulls the filter onto price; when price stalls, the filter damps random oscillations.

Adding the Ehlers Roofing and Inverse Fisher Transform

When building an oscillator rather than a trend line, long-term trend drift distorts the bounds (an oscillator stays pinned at the top during a bull run). Ehlers' Roofing Filter (roofing(close, 10, 48)) applies a 2-pole high-pass filter to strip wavelengths longer than 48 bars, then passes the result through a SuperSmoother to remove noise shorter than 10 bars.

Passing that normalized wave through an Inverse Fisher Transform (ifisher(x, 5)) compresses values toward the $-1$ and $+1$ rails, turning hesitant mid-line wiggles into clean trigger crossings.

What we measured on 1,000 daily BTCUSDT bars

Strategy ModelNet Return (post-fee)Profit FactorMax Drawdown
DSP Kalman(0.05) × SuperSmoother(21) + Chop(14) < 58.5+39.57%1.4518.4%
Stat-Arb WaveTrend(10,21) + Z-Score(20) < −0.5+16.47%1.269.88%

Try the exact formula and rules

Both the DSP Roofing oscillator and the Kalman × SuperSmoother trend strategy are available as one-click blueprints in the Academy Cookbook and Strategy Studio.

This is quantitative research, not investment advice.

Evident does not give investment advice. Past performance does not indicate future returns. Leveraged and automated trading carries the risk of losing capital.