Kalman Filter Pass Node

Kalman Filter — Series Input

StatisticalNoise ReductionPass

Overview

The Kalman Filter Pass Node applies a one-dimensional Kalman filter to any upstream series, producing a smooth, noise-reduced estimate of the underlying state. Unlike moving averages, the Kalman filter adapts its smoothing weight dynamically based on the signal-to-noise ratio.

There is no warm-up period — the filter produces an output from the very first bar, initialising the state estimate from the first observation.

Formula

Predict step:
x̂ₜ = x̂ₜ₋₁   (state prediction)
P = P + Q   (uncertainty grows by processNoise Q)
Update step:
K = P / (P + R)   (Kalman gain; R = measurementNoise)
x̂ₜ = x̂ₜ + K × (zₜ − x̂ₜ)   (corrected estimate)
P = (1 − K) × P   (updated uncertainty)

Parameters

ParameterDefaultDescription
processNoise0.01Q — how much the true state is expected to change each bar. Higher = more responsive.
measurementNoise1.0R — noise in the measurement. Higher = smoother output (trusts state more than observation).

Inputs & Outputs

SlotDirectionTypeDescription
inputInput{ values, timestamps }Any upstream numeric series
valuesOutputnumber[]Filtered state estimate per bar — no nulls (produces output from bar 1)
timestampsOutputnumber[]Unix timestamps aligned to input

Use Cases

Noise-Reduced Price Signal

Smooth an indicator or price series before computing Z-scores or other derivatives, reducing false signals.

Adaptive Smoothing

Unlike EMA, the Kalman filter adapts its gain dynamically — faster when noisy signals are consistent with trend, slower when they aren't.

Preprocessing for Statistical Nodes

Apply Kalman filter before feeding into Hurst, DFA, or autocorrelation nodes to reduce the impact of tick noise.

Tips & Best Practices

Tune Q/R Ratio

The Q/R ratio controls responsiveness. High Q/R = responsive (tracks price closely); low Q/R = smooth (heavy lag). Try Q=0.01, R=1 as a starting point.

No Warm-Up

The Kalman filter produces output from bar 1, making it suitable for strategies that need signals early in the data.

Stationary vs Non-Stationary

The Kalman filter works on both stationary and non-stationary series, making it more flexible than Z-score which assumes a stable mean.

Related Indicators