Kalman Smoother Pass Node
Kalman Filter Adaptive Smoothing — Series Input
Overview
The Kalman Smoother Pass Node applies a 1D Kalman filter to a series input, producing an optimally smoothed output under the assumption of Gaussian process and observation noise. It adaptively removes noise while preserving trend dynamics — responding faster to large moves and slower during consolidation.
Unlike a simple moving average, the Kalman filter's smoothing is state-dependent: it continuously estimates the signal's true value by balancing predicted state uncertainty (processNoise) against observation uncertainty (obsNoise). The ratio processNoise/obsNoise controls the responsiveness vs. smoothness trade-off.
Algorithm
Parameters
| Parameter | Default | Description |
|---|---|---|
| processNoise | 0.01 | Process noise variance Q — how much the true state can change per bar |
| obsNoise | 1.0 | Observation noise variance R — how noisy the observed values are assumed to be |
Inputs & Outputs
| Slot | Direction | Type | Description |
|---|---|---|---|
| input | Input | { values, timestamps } | Any numeric series to filter |
| values | Output | (number | null)[] | Kalman-smoothed values aligned to input |
| timestamps | Output | number[] | Unix timestamps aligned to input |
Use Cases
Low-Lag Trend Smoothing
Use Kalman Smoother Pass as a drop-in replacement for a moving average — it tracks the trend with less lag than an EMA of equivalent responsiveness, because it adaptively weights recent observations more heavily during rapid price changes.
Signal Pre-Processing
Apply Kalman smoothing before feeding a noisy indicator (e.g., RSI, raw volume) into a threshold-based or crossover strategy. The filter removes high-frequency noise while preserving the directional structure needed for reliable signal generation.
Velocity Estimation
The first difference of the Kalman-smoothed series provides a noise-reduced velocity (rate of change) estimate. This is far more stable than raw returns or ROC on noisy series — useful for momentum-based strategies that use the rate of indicator change as the signal.
Tips & Best Practices
processNoise/obsNoise Ratio Controls Smoothing
What matters is the ratio Q/R (processNoise/obsNoise). High Q/R (e.g., 0.1/1.0) means the filter trusts observations more — faster response, less smoothing. Low Q/R (e.g., 0.001/1.0) means the filter trusts the model more — slower response, more smoothing.
Stable From Bar 1
Unlike windowed indicators, the Kalman filter produces a valid output from bar 0. The filter converges quickly — by bar 5–10 the Kalman gain has typically stabilized. You can safely use the full output without discarding early bars.
Not a Predictive Filter
The 1D Kalman Smoother (constant velocity model) only smooths — it does not predict future values. For predictive extrapolation, a 2-state Kalman filter (position + velocity) is needed. This node is best used for noise removal, not forecasting.