Skip to main content

Cookies on Macro by Mark.We use essential cookies for sign-in, locale, and security. With your permission, we also use optional cookies for preferences, for analytics, and for advertising measurement with the Meta (Facebook) Pixel. Read our cookie policy.

Macro by MarkMacro by Mark
  • Home
Loading…
Loading…
← Models
MacroConceptsPolicyModels

Unobserved components model

State-space decomposition that separates a macro series into latent trend, cycle, seasonal, and irregular components.

OverviewGraphMathReferences

How do you decompose a macroeconomic time series into trend, cycle, seasonal, and irregular components when none of them are directly observed?

Background

Andrew Harvey introduced the structural time-series model in a 1985 Journal of Business & Economic Statistics paper and gave it a full textbook treatment in 'Forecasting, Structural Time Series Models and the Kalman Filter' (1989). The central idea: every component of a time series - trend, cycle, seasonal, irregular - gets its own explicit stochastic law of motion, rather than being recovered as a residual from an ad-hoc filter. Harvey's framework unified earlier work by Nerlove, Grether, and Carvalho (1979) on signal extraction with the state-space machinery of Kalman (1960). The result was a model-based alternative to mechanical filters like X-11, the Hodrick-Prescott filter, and Census methods that had dominated decomposition practice since the 1960s.

The UCM works by writing the observed series yty_tyt​ as a sum of latent components: yt=μt+ψt+γt+εty_t = \mu_t + \psi_t + \gamma_t + \varepsilon_tyt​=μt​+ψt​+γt​+εt​, where μt\mu_tμt​ is trend, ψt\psi_tψt​ is cycle, γt\gamma_tγt​ is seasonal, and εt\varepsilon_tεt​ is the irregular (white noise measurement error). Each component follows its own transition equation. The local linear trend has a stochastic level and slope. The cycle is a damped stochastic sinusoid with frequency λc\lambda_cλc​. The seasonal uses trigonometric terms at the fundamental and harmonic frequencies. Because every component has a disturbance, the model nests deterministic components as special cases (set the relevant disturbance variance to zero). Estimation stacks all components into a single state vector and runs the Kalman filter to evaluate the innovation (prediction-error) likelihood.

Central banks and statistical agencies adopted UCMs for two reasons. First, the decomposition is interpretable: each component maps to a concept economists actually discuss (underlying trend growth, business-cycle position, seasonal adjustment). Second, the framework handles missing data, mixed frequencies, and multiple series naturally through the state-space representation. The Bank of England's output-gap estimates, the ECB's trend-inflation measures, and Statistics Netherlands' seasonal adjustment system (SEATS/TRAMO via Gomez and Maravall) all rest on UCM principles. The U.S. Congressional Budget Office uses a variant to estimate potential GDP.

The model has a close relationship to ARIMA models through a result Harvey called the 'reduced form.' Every UCM implies a specific ARIMA representation for yty_tyt​, but the mapping is many-to-one: multiple UCM specifications can yield the same ARIMA process. The UCM adds structure by assigning economic meaning to each component. This structural interpretation comes at a cost: if the component specification is wrong (e.g., the cycle is not well-described by a single damped sinusoid), the decomposition inherits the misspecification. Model selection typically involves comparing nested UCMs via likelihood-ratio tests or information criteria, plus diagnostic checks on the standardized innovations.

Connections to explore

Math ↗The structure and its conditions, step by step.References ↗Academic sources and guidance for using the model.

How the Parts Fit Together

μt\mu_tμt​

Trend (local linear)

Stochastic level plus slope: μt=μt−1+βt−1+ηt,βt=βt−1+ζt\mu_t = \mu_{t-1} + \beta_{t-1} + \eta_t, \beta_t = \beta_{t-1} + \zeta_tμt​=μt−1​+βt−1​+ηt​,βt​=βt−1​+ζt​. Captures the slowly-moving underlying trajectory of the series.

The UCM requires a single observed series yty_tyt​ (or a vector of series in the multivariate case) and a specification of which components to include: local level or local linear trend, stochastic cycle, trigonometric seasonal, and irregular. Each component's disturbance variance is a free parameter. The cycle adds two parameters (damping factor ρ\rhoρ and frequency λc\lambda_cλc​). The seasonal requires a choice of period sss (e.g., s=4s = 4s=4 for quarterly, s=12s = 12s=12 for monthly). All parameters are collected into a vector θ\thetaθ and estimated by maximizing the innovation likelihood produced by the Kalman filter.

The state vector αt\alpha_tαt​ stacks the internal states of all components. For a local linear trend, αt\alpha_tαt​ includes the level μt\mu_tμt​ and slope βt\beta_tβt​. The stochastic cycle contributes a two-dimensional state (ψt,ψt∗)(\psi_t, \psi_t^*)(ψt​,ψt​∗) that generates damped sinusoidal dynamics. Trigonometric seasonals add s−1s - 1s−1 state elements: harmonics j=1,…,⌊s/2⌋j = 1, \ldots, \lfloor s/2 \rfloorj=1,…,⌊s/2⌋ each contribute a pair (γjt,γjt∗)(\gamma_{jt}, \gamma_{jt}^*)(γjt​,γjt∗​), except that for even sss the Nyquist harmonic (j=s/2)(j = s/2)(j=s/2) contributes only one state. The irregular εt\varepsilon_tεt​ enters only through the measurement equation. The full state dimension can range from 1 (local level + irregular) to 15+ (local linear trend + cycle + monthly trigonometric seasonal).

The Kalman filter runs the prediction and update recursions on this stacked state-space system. At each step, the filter produces the one-step-ahead prediction error vtv_tvt​ and its variance StS_tSt​. The log-likelihood is L(θ)=−(T/2)log⁡(2π)−(1/2)∑t[log⁡∣St∣+vt′St−1vt]L(\theta) = -(T/2) \log(2 \pi) - (1/2) \sum_t [\log |S_t| + v_t' S_t^{-1} v_t]L(θ)=−(T/2)log(2π)−(1/2)∑t​[log∣St​∣+vt′​St−1​vt​]. Numerical optimization (typically quasi-Newton or EM) finds the θ\thetaθ that maximizes LLL. After estimation, the Kalman smoother (Rauch-Tung-Striebel backward pass) produces smoothed estimates of each component using the full sample, yielding the final decomposition.

Identification requires that the disturbance variances be non-negative and that the model not be over-parameterized relative to the data. A common pitfall: including both a stochastic slope and a stochastic cycle can create near-collinearity in the state-space, leading to flat likelihood surfaces. Practitioners often fix one component to be deterministic (e.g., fixed slope) and let the data determine whether the remaining variances are significantly different from zero.

Assumptions

Maintained

Additive decomposition

The observed series is the sum of latent components: yt=μt+ψt+γt+εty_t = \mu_t + \psi_t + \gamma_t + \varepsilon_tyt​=μt​+ψt​+γt​+εt​. No interaction terms.

If violated:Multiplicative or nonlinear component interactions (common in series with level-dependent volatility) require log-transformation or a multiplicative UCM variant.

Testable

Gaussian disturbances

All component disturbances (ηt,ζt,κt,κt∗,ωjt,εt)(\eta_t, \zeta_t, \kappa_t, \kappa_t^*, \omega_{jt}, \varepsilon_t)(ηt​,ζt​,κt​,κt∗​,ωjt​,εt​) are mutually independent Gaussian white noise.

If violated:Non-Gaussianity does not bias the point estimates (the Kalman filter remains best linear), but confidence intervals, likelihood-based inference, and model selection are unreliable. Use robust standard errors or bootstrap.

Testable

Mutual independence of component disturbances

Cov⁡(ηt,κt)=Cov⁡(ζt,εt)=…=0\operatorname{Cov}(\eta_t, \kappa_t) = \operatorname{Cov}(\zeta_t, \varepsilon_t) = \ldots = 0Cov(ηt​,κt​)=Cov(ζt​,εt​)=…=0 for all component pairs.

If violated:Correlated disturbances make components unidentifiable without additional restrictions. The decomposition becomes sensitive to which correlation structure is imposed.

Testable

Correct component specification

The number and type of components (trend order, cycle count, seasonal period) correctly describe the data-generating process.

If violated:Omitting a genuine component (e.g., leaving out the cycle) forces its dynamics into the trend or irregular, distorting the decomposition. Innovation diagnostics and information criteria help detect this.

Testable

Time-invariant parameters

Disturbance variances, damping factor ρ\rhoρ, and cycle frequency λc\lambda_cλc​ are constant over the sample.

If violated:Parameter instability (e.g., a shift in trend volatility after the Great Moderation) produces a decomposition that averages across regimes. Use a TVP extension or split-sample estimation.

Testable

Cycle stationarity

The damping factor satisfies 0<ρ<10 < \rho < 10<ρ<1, ensuring the cycle component is stationary.

If violated:If ρ=1\rho = 1ρ=1, the cycle becomes a unit-root process indistinguishable from the trend. The optimizer may push ρ\rhoρ toward the boundary, signaling that trend and cycle are not separately identified.

Applications

The Bank of England estimates the UK output gap using a bivariate UCM where GDP and inflation are jointly decomposed into trend and cycle components. The Phillips-curve link between the inflation cycle and the output gap provides cross-equation identifying information. The European Central Bank's trend-inflation estimates follow a similar logic: a UCM decomposes HICP inflation into trend, energy-price cycle, and irregular, with the smoothed trend feeding into medium-term inflation projections.

Statistical agencies use UCM-based seasonal adjustment as an alternative to X-13ARIMA-SEATS. The SEATS method (Gomez and Maravall 1996) is essentially a signal-extraction procedure derived from the UCM representation of an ARIMA model. Statistics Netherlands and Eurostat have adopted TRAMO-SEATS for official seasonal adjustment of employment, industrial production, and GDP series. The advantage over X-11-type methods: the seasonal pattern is allowed to evolve stochastically, and the decomposition comes with model-based standard errors.

The UCM breaks down when the data do not support the assumed component structure. If the series is too short (T<40T < 40T<40 for quarterly data), the likelihood surface is flat and component variances are poorly identified. If the true data-generating process involves regime switches (recessions versus expansions), the UCM's fixed-parameter cycle cannot capture the asymmetric dynamics. If multiple cycles operate at different frequencies (e.g., business cycle plus financial cycle), a single-cycle UCM conflates them. In each case, extensions exist (Markov-switching UCM, multi-cycle UCM) but at the cost of additional parameters and potential over-fitting.

Clark (1987) used the UCM to decompose U.S. real GDP into permanent (random walk with drift) and transitory (AR(2) cycle) components, providing an early model-based estimate of the output gap. This specification became a workhorse in central banking. Morley, Nelson, and Zivot (2003) showed that allowing correlated trend and cycle disturbances dramatically changes the decomposition, attributing most GDP variation to the permanent component - a finding that challenged the conventional view of large transitory business-cycle fluctuations.

Extensions and open questions

Variants

  • Correlated-components UCM - allows non-zero covariance between trend and cycle disturbances (Morley, Nelson, Zivot 2003)
  • Multivariate UCM - jointly decomposes multiple series with shared and series-specific components
  • Markov-switching UCM - cycle dynamics switch between expansion and recession regimes
  • Multi-cycle UCM - includes business cycle and financial cycle at different frequencies
  • UCM with explanatory variables - adds regression effects (interventions, outliers, calendar effects) to the measurement equation
  • Non-Gaussian UCM - replaces Gaussian disturbances with Student-t or mixture distributions for outlier robustness

Open questions

  • Identification of trend versus cycle remains fundamentally fragile. The data alone often cannot distinguish a slowly-varying cycle from a stochastic trend, and the decomposition can flip depending on whether trend-cycle disturbance correlation is allowed.
  • Optimal selection of the number of cycles, the cycle frequency range, and the seasonal harmonic count lacks a single accepted procedure. Information criteria help but are not definitive when the likelihood surface has multiple local maxima.
  • Extending UCMs to handle time-varying volatility (stochastic volatility in the component disturbances) is an active area. The SV-UCM requires particle filtering or MCMC, and computational cost limits practical sample sizes.

Keep going

Read next

Continue with a related concept, model, or example.

Theory model

IS-LM Model

a well-connected theoretical model two steps from here

New angle: theoretical model →
Macro by Mark
Help
Privacy PolicyTerms of UseEthics and Compliance

© 2026 Mark Jayson Nation LLC