Definition
The Kalman filter is a recursive algorithm that computes the minimum mean squared error (MMSE) linear estimator of the latent state vector αt in a linear Gaussian state-space model, given all observations up to time t. At each step it alternates between a prediction step (propagating the state one period forward via the transition equation) and an update step (revising the prediction using the new observation and the Kalman gain). Under Gaussianity the filtered estimates equal the conditional means, and the filter delivers the exact log-likelihood as a by-product via the innovation decomposition.
Key Ideas
- Optimality: Among all linear estimators, the Kalman filter minimises the mean squared error of α^t∣t=E[αt∣y1,…,yt]; under joint normality it is also the minimum-variance unbiased estimator (MVUE).
- Innovation representation: The one-step-ahead prediction error vt=yt−Ztat∣t−1 is serially uncorrelated with variance Ft=ZtPt∣t−1Zt′+Ht. The log-likelihood factorises as ℓ=−21∑t(log∣Ft∣+vt′Ft−1vt), making maximum likelihood estimator (MLE) evaluation O(T).
- Kalman gain: Kt=Pt∣t−1Zt′Ft−1 is the optimal weight given to the innovation, balancing state uncertainty Pt∣t−1 against measurement noise Ht.
- Kalman smoother: A backward Rauch-Tung-Striebel or de Jong pass computes the smoothed estimates at∣T=E[αt∣y1,…,yT], using all T observations. Required for the Expectation-Maximization (EM) algorithm's E-step and for simulation smoothers used in Bayesian Markov Chain Monte Carlo (MCMC) estimation.
- Diffuse initialisation: When the initial state distribution is unknown, the filter starts with P1∣0→∞; the exact diffuse filter (Durbin-Koopman 2001) handles this rigorously without ad-hoc large constants.
- Kim filter: For Markov-switching (MS) state-space models, running separate filters per regime generates Mt branches. Kim's (1994) probability-weighted collapse approximation reduces this to O(M2T); see Plucking Model and Markov-Switching VAR.
How It Works
State-Space Form
yt=Ztαt+εt,εt∼N(0,Ht)(measurement)
αt=Ttαt−1+Rtηt,ηt∼N(0,Qt)(transition)
where yt is p×1 observed, αt is m×1 latent, and (εt,ηt) are mutually uncorrelated at all leads and lags.
Prediction Step
at∣t−1=Ttat−1∣t−1,Pt∣t−1=TtPt−1∣t−1Tt′+RtQtRt′
Update Step
vt=yt−Ztat∣t−1,Ft=ZtPt∣t−1Zt′+Ht
Kt=Pt∣t−1Zt′Ft−1
at∣t=at∣t−1+Ktvt,Pt∣t=(I−KtZt)Pt∣t−1
Kalman Smoother (Rauch-Tung-Striebel)
Run the filter forward; then pass backward for t=T−1,…,1:
Lt=Pt∣tTt+1′Pt+1∣t−1
at∣T=at∣t+Lt(at+1∣T−at+1∣t),Pt∣T=Pt∣t+Lt(Pt+1∣T−Pt+1∣t)Lt′
Log-Likelihood for MLE
ℓ(θ)=−2Tplog(2π)−21t=1∑T(log∣Ft∣+vt′Ft−1vt)
Maximised over model parameters θ via quasi-Newton methods (e.g., Broyden-Fletcher-Goldfarb-Shanno (BFGS)).
Why It Matters
- The innovation decomposition converts the joint density of (y1,…,yT) into a product of conditionals, making exact likelihood evaluation O(T) instead of O(T3). This is the computational foundation for likelihood-based estimation of all linear state-space models.
- Time-varying parameter vector autoregressions (VARs), unobserved-components models, dynamic factor models, and affine term-structure models all rely on the Kalman filter for parameter estimation and state extraction.
- The smoother's output drives the E-step of the EM algorithm and feeds the simulation smoother (de Jong-Shephard 1995; Durbin-Koopman 2002) used in Bayesian MCMC state-space estimation.
- The Kim filter extends the Kalman recursion to Markov-switching models, enabling approximate maximum likelihood estimation of state-space models with discrete regime changes at O(M2T) cost.
Open Questions
- Nonlinear and non-Gaussian extensions: The extended Kalman filter (EKF) linearises nonlinear measurement/transition equations; the unscented Kalman filter (UKF) uses sigma points; particle filters (sequential Monte Carlo (SMC)) are asymptotically exact but expensive. None dominates uniformly.
- High-dimensional systems: When m or p is large (e.g., large dynamic factor models), the m×m matrix inversions in Pt∣t−1 become costly; low-rank and sparse representations are active research areas.
- Exact vs. approximate regime-switching: Kim's (1994) approximation error is hard to assess analytically; the exact Gibbs-sampling approach of Kim-Nelson (1999) is more accurate but more expensive.
Related