Basic Prerequisites: 04 · Volatility Modeling and 05 · Cointegration & Multivariate.
1. Intuition & Practical Objective
Everything so far models observable series with observable dynamics. The advanced toolkit relaxes that in four ways, each answering a question the basic models cannot:
- State-space / Kalman - the true driver (a latent level, a time-varying beta, a hidden alpha) is unobservable, observed only through a noisy signal. The Kalman filter recursively extracts the best estimate of the hidden state as data arrives. This is the workhorse behind dynamic factor/momentum signals.
- Markov switching - the regime the market is in changes randomly (calm ↔ crisis, expansion ↔ contraction). The model alternates between linear regimes with a hidden Markov state.
- Multivariate volatility - risk is a covariance matrix, not a scalar; BEKK/DCC model how correlations move together with the volatilities (needed for portfolio VaR).
- MCMC - when the likelihood is intractable (stochastic volatility, switching GARCH), sample the posterior with Gibbs/Metropolis instead of maximizing it.
The launchpad here is the Kalman filter, because it is both the cleanest state-space object and the foundation for the others (a Markov-switching model is estimated by a filter; a stochastic-volatility model is estimated by Kalman-based MCMC).
2. Mathematical Ground Truth & Derivations
General linear-Gaussian state-space (Tsay eq. 11.26–11.27).
The Kalman filter recursion (Tsay eq. 11.64). Prediction error ; innovation variance ; gain ; ; then
Three distinct objects: filtering , prediction , smoothing (). In steady state become constant, solving an algebraic Riccati equation. Parameters are estimated by ML via the prediction-error decomposition (Tsay eq. 11.25). Diffuse initialization (, Tsay §11.2) handles unknown state start.
Local-level model & its ARIMA equivalence (Tsay eq. 11.1–11.5).
If this is ARIMA(0,1,0); if it is ARIMA(0,1,1), , with the map
This is why a smoothed trend and a differenced IMA(1,1) are the same process seen from two angles. Tsay’s Alcoa log-realized-vol fit (, ) implies - microstructure noise dominates the latent-volatility signal, a classic finding. Time-varying CAPM is a state-space model: with , , observation row (Tsay eq. 11.29).
Markov switching (Tsay Ch 4). A 2-state first-order Markov chain with transition probs , ; expected duration in state is . US real GNP: contraction ≈3.7 quarters, expansion ≈11.3 quarters (McCulloch–Tsay MCMC). Contrast SETAR (deterministic threshold switch) vs MSA (stochastic switch): under SETAR the future is single-regime once is observed; under MSA it is always a mixture - which is exactly what a filter must keep track of. Estimation via EM (Hamilton) or MCMC (McCulloch–Tsay).
Multivariate volatility (Tsay Ch 10). Risk is a matrix . EWMA ; BEKK (pos-def by construction, params not directly interpretable); correlation form , ; DCC (Engle 2002) with , standardized shocks , - scalar dynamics, one persistence for all correlations. Portfolio VaR: (Tsay Ch 7 §7.2.2 / Ch 10 §10.7). Verified example (Cisco+Intel, 57,11757,64858,180$.
MCMC (Tsay Ch 12). Gibbs sampling iterates draws from each full conditional given the others; point estimate after discarding burn-in draws. Metropolis–Hastings accepts a candidate with , accept . Used for stochastic-volatility and switching-GARCH models whose likelihoods are intractable. GARCH tends to understate vol vs implied vol; SV forecasts from the predictive distribution are richer (Tsay §12.10).
3. Computational Implementation - Kalman filter + regime filter
(A) Local-level Kalman filter: simulate a random-walk level plus noise, filter it, and compare against the raw observations. (B) The ARIMA(0,1,1) mapping: from Tsay’s Alcoa , recover - verify the microstructure-noise-dominates result. (C) 2-state Markov-switching Hamilton filter on simulated regimes. Stdlib only.
The Kalman filter cuts the tracking error roughly in half (MAE 0.333 vs 0.744 on raw data) by optimally trading noise against signal - the gain settles near 0.18, the classic steady-state behavior. The state-space ↔ ARIMA(0,1,1) mapping reproduces Tsay’s Alcoa result exactly: , so observed volatility is mostly measurement noise around a slowly-wandering latent level. And the Hamilton filter recovers the correct regime 91% of the time from the observations alone.
4. Failure Modes & First-Principles Breakdowns
- Do not mix the two Kalman recursions. Tsay notes the prediction line can be written either as (contemporaneous-filtered) or (one-step-ahead, canonical eq. 11.64). They are equivalent only if used consistently - mixing them in one pass silently corrupts the filter.
- Diffuse init matters. Starting finite when the true state is unknown biases early filtered estimates; use the diffuse () convention (Tsay §11.2).
- BEKK parameters are not interpretable and carry parameters; DCC’s scalar dynamics (one ) force all correlations to share a single persistence. Don’t read micro-structure into aggregate DCC parameters.
- EWMA notation traps. Tsay’s is the weight on the lagged covariance (), but S-Plus/other software report . Equating the two inverts the persistence.
- MCMC needs burn-in and mixing diagnostics. Point estimates require discarding burn-in and (ideally) multiple chains; near-constant parameters or high correlation between draws mean the chain hasn’t converged (Tsay §12.2). A single short chain’s “posterior” is not trustworthy.
- Multivariate-t form. The estimable multivariate volatility density is the standardized with factor (Tsay eq. 10.42), not the textbook form - using the wrong normalization misprices tail risk (bridge to EVT & Fat Tails).
5. References
- Tsay, Analysis of Financial Time Series
- Hamilton, J.D. (1989), “A New Approach to the Economic Analysis of Nonstationary Time Series and the Business Cycle,” Econometrica
- Durbin & Koopman, Time Series Analysis by State Space Methods
- Engle, R.F. (2002), “Dynamic Conditional Correlation,” J. Business & Econ. Stat.
- Glasserman, Monte Carlo Methods in Financial Engineering