- Introduced by
- Harvey; Durbin & Koopman (state space treatment); Kalman filter
- Year
- 1990
- Type
- State space time series model
What does it do?
A state space model describes an observed time series through unobserved (latent) state variables, linked by a measurement equation and a transition equation.
The Kalman filter estimates these states as the observations arrive. The framework follows the state space tradition of Harvey (1990) and Durbin & Koopman (2012). ARIMA models have a state space representation, and several exponential smoothing methods correspond to specific structural forms, such as the local level model, so the framework covers these families within one estimation approach.
The intuition behind the method
Imagine a quantity you cannot observe directly — like the underlying trend or seasonal pattern of a series — that drifts over time according to its own rules, while what you actually record is a noisy reading of it. The state space model separates the hidden 'true' signal from the measurement noise. The Kalman filter walks through the data one step at a time, making a prediction of the hidden state, then nudging that prediction toward each new observation in proportion to how trustworthy the observation is.
History
The Kalman filter was originally developed in control engineering, a point Harvey (1990) makes when he brings it into econometric time series analysis. Harvey's Forecasting, Structural Time Series Models and the Kalman Filter (1990) framed structural models, with explicit trend and seasonal components, in state space form. Durbin and Koopman's Time Series Analysis by State Space Methods (2012) gives a comprehensive later treatment and argues that the state space approach handles a much wider range of problems than the ARIMA system alone.
When to use it
Choose a state space model when you have a continuous time series and want to model latent components such as a slowly evolving trend, seasonality or a cycle, to forecast, or to track the underlying state as new observations arrive. The baseline Kalman recursions assume a linear, Gaussian system with well-defined measurement and process noise, so the model suits series for which those assumptions are a reasonable approximation. Avoid it, or move to extended, unscented or simulation-based methods, when the dynamics are clearly nonlinear or heavy-tailed. For short series, keep the component structure simple, because the number of variance parameters that can be estimated reliably depends on the information in the data rather than on a fixed sample size. A figure of about 30 observations is an informal practitioner heuristic with no cited source. If you only need a short-horizon forecast and do not need an interpretable decomposition, a simpler model may be easier to justify.
Limitations and considerations
- The baseline filter assumes a linear, Gaussian system; nonlinear or non-Gaussian dynamics require extensions such as the extended or unscented filter, or simulation methods.
- The measurement and process noise structures must be specified in advance, and separating the variance components can be difficult when the data carry little information about them.
- Maximum likelihood estimation of the variance parameters can be sensitive to starting values and to weak identification of the components.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- Provides a state space representation of ARIMA models and maps several exponential smoothing methods to specific structural forms (for example, the local level model), so one estimation framework covers these families.
- Represents unobserved components such as trend, seasonal and cycle explicitly, so the fitted states have a direct interpretation, and supports real-time state estimation through the Kalman filter.
- Handles missing observations and time-varying system matrices (Z_t, T_t, H_t, Q_t) within the same recursive machinery.
Applications
- Modelling trends and cycles in macroeconomic time series, one of the application areas Harvey (1990) illustrates.
- Extracting an interpretable trend and seasonal component from a series for explanatory analysis.
- Real-time tracking of a latent state, where the estimate is updated as each new observation arrives.
- Handling missing observations within the same recursive framework.
How it works
How it works
The measurement equation links the observed value y_t to the unobserved state vector α_t through the design matrix Z_t, with measurement noise ε_t assumed to be normal with variance H_t. This is the step that reads the latent state into the data that are actually recorded.
Formula
y_t = Z_t \alpha_t + \varepsilon_t, \quad \varepsilon_t \sim N(0, H_t)
The transition equation governs how the state evolves: α_{t+1} = T_t α_t + R_t η_t. The matrix T_t sets the dynamics, for example a local linear trend or a seasonal cycle depending on how the model is specified, and η_t is process noise, normal with covariance Q_t. Because the matrices carry a time index, they can vary over time.
Formula
\alpha_{t+1} = T_t \alpha_t + R_t \eta_t, \quad \eta_t \sim N(0, Q_t)The Kalman filter updates the state estimate recursively. It predicts the state from the previous period, observes y_t, and corrects the prediction by the gain K_t times the innovation y_t − Z_t α̂_{t|t-1}. The filter computes the gain from the predicted state covariance and the noise variances H_t and Q_t. The prediction error decomposition turns these recursions into a likelihood, which is maximised over the unknown variance parameters. The recursions require a starting state and covariance, which must be specified explicitly (see pitfalls).
Formula
\hat{\alpha}_{t|t} = \hat{\alpha}_{t|t-1} + K_t (y_t - Z_t \hat{\alpha}_{t|t-1})Common pitfalls
- Imposing a linear Gaussian state space form on clearly nonlinear or heavy-tailed dynamics and then trusting the resulting filter output.
- Leaving the measurement variance H_t and process variance Q_t weakly identified, which yields unstable component estimates.
- Specifying trend, seasonal and cycle components together on a short series, so that the likelihood cannot separate them.
- Specifying the initial state and its covariance carelessly. Non-stationary components are commonly started with a diffuse prior, and the choice affects early filtered estimates and the likelihood, so the first few filtered values should be treated with caution.
Frequently asked questions
How is a state space model different from ARIMA?
ARIMA models can be written in state space form, so the state space framework is the more general one in this sense. The practical difference is that state space models work directly with interpretable unobserved components such as trend, seasonal and cycle, and estimate them in real time with the Kalman filter. ARIMA instead describes the series through autoregressive and moving-average terms.
What does the Kalman filter actually do?
It is a recursive algorithm that estimates the hidden state period by period. At each step it predicts the next state, compares the prediction with the new observation to form the innovation, and corrects the estimate by the Kalman gain times that innovation. The same recursions deliver the likelihood, through the prediction error decomposition, that is used to fit the model.
Does the data have to be Gaussian and linear?
The baseline Kalman filter assumes a linear, Gaussian system with well-defined measurement and process noise. For nonlinear or non-Gaussian dynamics you need extensions such as the extended or unscented Kalman filter, or simulation-based methods.
How much data do I need?
The cited sources give no formal minimum sample size for this model. A figure of about 30 observations is an informal practitioner heuristic with no cited source, so treat it as a rough guide only. With short series, keep the component structure simple, because trend, seasonal and cycle components compete for the same limited information and can be hard to separate.
Related methods
Sources
Harvey, A. C. (1990). Forecasting, Structural Time Series Models and the Kalman Filter. Cambridge University Press.
Open DOI referenceDurbin, J. & Koopman, S. J. (2012). Time Series Analysis by State Space Methods (2nd ed.). Oxford University Press.
Open DOI reference