- Introduced by
- Andrew C. Harvey
- Year
- 1990
- Type
- State-space (unobserved components) time series model
What does it do?
The Structural Time Series Model, in its Basic Structural Model (BSM) form, is a state-space approach introduced by Andrew C. Harvey that decomposes a series into unobserved trend, seasonal and irregular components, with an optional cyclical component.
Because each component is estimated in its own right, the fitted model gives estimated trend and seasonal paths directly, not only a forecast. It is the natural choice when that decomposition is the goal, whereas ARIMA describes the same series through autoregressive and moving-average terms that do not map onto separate components.
The intuition behind the method
Instead of treating a time series as one undifferentiated process, the BSM treats it as the sum of unobserved building blocks that each evolve in their own way: a drifting trend, a repeating seasonal pattern, optionally a longer wave-like cycle, and random noise. Each block follows its own equation and is allowed to change over time, and the data are used to infer how large each block is at every point. The result is a forecast that can also be read as a decomposition, separating the long-run direction from the seasonal swings.
History
Andrew C. Harvey set out the framework in his book Forecasting, Structural Time Series Models and the Kalman Filter, which placed unobserved-components modelling on a state-space footing. Harvey and Shephard's chapter in the Handbook of Statistics, Vol. 11, surveyed the approach, including the Basic Structural Model estimated through the Kalman filter.
When to use it
Choose the BSM for a continuous series with roughly 30 or more observations as a rough guide, when the aim is a decomposition into trend, seasonal and, where relevant, cyclical parts, or when you need to read off the underlying trend. It also suits series with missing observations, since the state-space formulation can carry the state across gaps. The model is additive: it assumes the observed series is the sum of the components in the formula, each following its state equation, with the cycle included only when it is specified. Do not use it when the series is too short to identify the components you include, or when a forecast alone is the goal and a fitted ARIMA model would serve equally well.
Limitations and considerations
- The analyst must decide which components (trend, seasonal, and any cycle) to include, and the decomposition is only as meaningful as that choice.
- The component variances are estimated by maximum likelihood, so results can depend on starting values and the optimisation routine, and the fit can land on boundary solutions.
- Reliable component estimates need a reasonable run of data. As a rough guide, about 30 observations is a minimum, and more are needed when several components are included; the requirement depends on the variance structure rather than on a fixed count.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- Each component is a separate state with its own equation and variance, so the trend, seasonal and any cycle can be read as estimated paths rather than inferred from abstract coefficients.
- The variances that govern drift are estimated from the data, so the fitted model determines how quickly the trend or seasonal pattern changes instead of imposing a fixed degree of smoothness.
- The Kalman filter processes observations one at a time, so estimates can be updated as new data arrive, and missing periods can be handled without discarding the remaining observations.
Applications
- Forecasting a series with an evolving trend while keeping the seasonal pattern as a separate component that can be inspected.
- Extracting an estimated trend path from a noisy series to separate longer-run movement from short-term fluctuation.
- Modelling a series with missing observations, where the Kalman filter carries the state across the unobserved periods.
How it works
How it works
The observed series y_t is written as the sum of an unobserved trend μ_t, a seasonal component γ_t and an irregular error ε_t. A cyclical component ψ_t can be added as an optional extension, and the general form above includes it for that case. Each component has its own state equation: the trend is a local linear trend, with level and slope both allowed to drift; the seasonal component is constructed to sum to roughly zero over a full period; and a cycle, where included, is a damped sinusoid with its own frequency. Stacking these equations gives the state-space form on which the estimator operates.
Formula
y_t = \mu_t + \gamma_t + \psi_t + \varepsilon_t
Once the model is in state-space form, the Kalman filter updates the state recursively. The predicted state α̂_{t|t-1} is corrected by the gain K_t multiplied by the prediction error y_t − Zα̂_{t|t-1}, which gives the filtered estimate α̂_{t|t} shown in the formula. Because this update uses only observations up to time t, a filtered estimate is a real-time estimate based on past data. The component values at the end of the sample are therefore filtered values, not a full-sample decomposition. A decomposition of the whole sample uses smoothing, which combines all observations to give the smoothed estimate α̂_{t|T}. The unknown variances that govern how quickly each component drifts are chosen by maximising the likelihood produced by the filter.
Formula
\hat{\alpha}_{t\mid t} = \hat{\alpha}_{t\mid t-1} + K_t\,(y_t - Z\hat{\alpha}_{t\mid t-1})Common pitfalls
- Including a seasonal or cycle term that the data cannot identify often produces a variance estimate at or near zero, which removes that component; this can be mistaken for evidence that the component is absent. When a variance sits near the boundary, the relative weights of the remaining components are highly uncertain, so the split should be reported with that uncertainty rather than as a precise decomposition.
- Treating the extracted components as unique: the decomposition depends on the variance structure, so each component should be checked for a plausible interpretation before it is reported.
- Over-interpreting a trend or cycle extracted from a short series, where the estimated component may reflect noise rather than structure.
- Reading the end-of-sample filtered trend as the full-sample decomposition. Full-sample components come from smoothed estimates that use all observations.
Frequently asked questions
How does the BSM differ from ARIMA?
ARIMA describes a series through autoregressive and moving-average terms, usually after differencing, which can fit well but do not correspond to separate economic or physical components. The BSM models explicit trend, seasonal and irregular components, and can add a cyclical component, so each part can be read directly. If decomposition is the goal, the BSM is the more suitable choice; if only forecasting matters, the two should be compared empirically on held-out data, since forecast accuracy can favour either model.
What role does the Kalman filter play?
The model is written in state-space form, and the Kalman filter recursively estimates the unobserved components as each observation arrives, correcting its prediction by an amount proportional to the prediction error. It also produces the likelihood used to estimate the component variances. Filtered estimates use only past data, so full-sample decompositions require smoothing.
What does the 'local linear trend' mean?
It is a trend with both a level and a slope that are each allowed to drift stochastically over time, so the trend can change its direction gradually rather than being fixed. It is the trend specification used in the Basic Structural Model.
How much data do I need?
As a rough guide, a few dozen observations at minimum, around 30 or more. Seasonal components need several full cycles of data, and any cyclical component needs a span long enough to show the cycle. Identification depends on the variance structure, so a fixed count is only a starting point; with too little data, variances can become unstable or collapse to zero.
Related methods
Sources
Harvey, A. C. (1990). Forecasting, Structural Time Series Models and the Kalman Filter. Cambridge University Press.
ISBN: 978-0521405737Harvey, A. C. & Shephard, N. (1993). Structural Time Series Models. In G. S. Maddala, C. R. Rao & H. D. Vinod (Eds.), Handbook of Statistics, Vol. 11 (pp. 261-302). Elsevier.
Open DOI referenceBayesian Econometrics (Advances in Econometrics), p. 332