Basic Prerequisites: 04 · Time-Varying Beta.


1. Intuition & Practical Objective

The Kalman filter has a dangerous property that rolling OLS does not: it reports how confident it is. That confidence is a feature - until it is wrong. A filter with a misspecified model can march along with a tiny reported variance while its actual error grows without bound. That is divergence, and it is the single most important failure mode to recognize because it is silent: nothing in the code errors, the output looks smooth and authoritative, and the trade bleeds.

This page names the failure modes precisely, ties each to a broken first principle, gives you a runnable reproduction of the two most important ones (misspecification and divergence), and lays out the diagnostics and remedies a practitioner should actually run.


2. Mathematical Ground Truth & Derivations

2.1 Failure mode taxonomy, mapped to first principles

The filter is optimal under assumptions; each failure mode is one assumption breaking:

FailureBroken assumptionSignatureRemedy
Over-smoothing ( too small)correct process-noise magnitudepersistent-sign innovations; lag after a breakadaptive/estimated ; innovation-based scaling
Over-reacting ( too large)“estimate dominated by noise; hedging whipsawshrink ; smooth
Divergence”actual error reported s.e.; gain floor on ; covariance inflation; Joseph form
Numerical breakdownexact arithmetic loses symmetry/PSD; NaN or oscillationJoseph form / square-root filter; jitter on
Model misspecificationthe whole model ()biased residuals with structure; flat likelihoodadd states/regressors; diagnose residuals
Non-linearity / non-Gaussianitylinear-Gaussianfilter is only-best-linear; multimodal posterior missedEKF/UKF or particle filter (page 06)

2.2 The lag–noise trade-off, quantitatively

For a scalar random-walk state with observation variance and process variance , the steady-state gain satisfies the Riccati fixed point; the effective averaging window scales like in the reverse direction. So the response lag after a step change of size obeys approximately and the estimation noise scales like - pushing down to cut noise directly lengthens the lag. There is no setting that is both fast and quiet; there is only the point on the curve that your strategy can tolerate, and ML estimation of is how you find it rather than guess it.

2.3 Divergence, formally

Divergence occurs when the computed covariance becomes a systematic underestimate of the true error covariance. Then the gain is too small, the state estimate stops tracking the truth, the predicted observation stays wrong - and because the reported covariance is also too small, the filter never “notices”. The classic triggers: (i) set to zero or far too small on a series that in fact moves; (ii) finite-precision loss of positive-definiteness; (iii) unmodeled deterministic drift. The tell is the ratio

the standardized innovation. If the model is right, is approximately iid . If that series drifts away from unit variance (say its average square ) or develops runs, the filter is diverging or misspecified - even if the estimates look fine.

2.4 The diagnostic battery (practice)

  1. Standardized innovations : should be iid . Test mean (bias), variance (over/under-confidence), and autocorrelation (structure the model missed).
  2. Innovation variance ratio (filter health): the average of should be . Values mean the filter is over-confident (too small /); means it is under-confident.
  3. Covariance sanity: monitor for names where it collapses to zero - that is the over-confidence that precedes divergence.
  4. Joseph form / square-root as the baseline, not an optimization.

3. Computational Implementation - reproducing misspecification and divergence

The local-level model with a +5 level shift at exposes both failure modes cleanly. Part A sweeps across five orders of magnitude and measures the lag–noise trade-off directly; Part B sets and shows the filter collapsing and then diverging while reporting near-zero uncertainty.

Part A is the trade-off in raw numbers. With the filter never reaches the new level within 250 steps (lag “never”); with it tracks instantly but the average error is worse (RMSE 1.04 vs 0.47) because it chases noise. The sweet spot is : lag of 6 steps, post-shift RMSE 0.512 - and note neither end is good, which is the whole point. Part B is divergence: the gain decays from to , the estimate freezes at 2.51 while the truth is 5.0, the filter reports a standard error of 0.045, and its actual error is 2.49 - 56× larger than it claims. A dashboard would show a confident, stable series; the book would be badly hedged.


4. Failure Modes & First-Principles Breakdowns (numbered)

  1. Misspecification is the master failure. Every other item is a special case: the filter is optimal for the model you gave it, and a wrong , , or makes “optimal” meaningless. Estimate the parameters by ML (page 03 §2.5) and validate the innovations (§2.4), never trust hand-set values.
  2. Divergence is over-confidence, not instability. The filter doesn’t blow up numerically - it goes quiet and wrong. Guard with a floor on (never let process noise go to zero) and monitor the standardized-innovation variance ratio.
  3. Fixed windows leak, recursive filters lag. The rolling-OLS/rolling-mean alternative is not a safe fallback: it lags by half a window by construction. The Kalman filter is not “the version with lag”; it is the version where you choose and justify the lag via .
  4. Numerical fragility is real. Symmetry/PSD drift, ill-conditioned , and diffuse-initialization blow-ups all show up in production. Use the Joseph form or a square-root filter, solve rather than invert, and keep standardized.
  5. Regime breaks are not random walks. A beta that jumps at an index reconstitution is not the same process as one that drifts continuously; a pure random-walk prior will be too slow at the jump and too noisy between jumps. If the economics says “jump”, model the jump (Markov switching, jump-diffusion state).
  6. Backtest the filter, not just the signal. A dynamic-beta strategy’s edge may be consumed by the extra turnover the filter induces; always pass the filtered-alpha strategy through the DSR / purged-CV battery (Backtesting Hygiene).

5. References

  • Tsay, Analysis of Financial Time Series (3rd ed.)
  • Durbin & Koopman, Time Series Analysis by State Space Methods
  • Särkkä, Bayesian Filtering and Smoothing
  • Harvey, Forecasting, Structural Time Series Models and the Kalman Filter
  • Chan, Algorithmic Trading

6. Connected Graph Bridges