Time-Varying-Parameter VAR with Stochastic Volatility

Python · R · Part 5 of the VAR arc — the capstone

Overview

Part 5 of the VAR arc — the capstone. Part 4 let the shock variances move but held the VAR coefficients fixed: the economy's turbulence changed while its dynamics were assumed constant. That is still strong. Did the way a monetary-policy shock propagates to output and inflation really stay the same from the Great Inflation, through the Volcker disinflation, into the Great Moderation and 2008 — or did the transmission mechanism itself drift as the Fed's conduct changed and expectations re-anchored? Primiceri's (2005) time-varying-parameter VAR with stochastic volatility answers by letting everything drift — the autoregressive coefficients, the contemporaneous relations, and the volatilities all evolve as random walks. It is the canonical tool of empirical macro for structural change, and it nests every earlier model in this series: freeze the coefficients and it is Part 4's BVAR-SV; freeze the coefficients and the volatilities and it is Part 3's constant-Σ\Sigma BVAR; identify the shocks and it delivers Part 2's structural responses — now allowed to change through time. Built from scratch in NumPyro.

θt=θt1+ut,  at=at1+ζt,  ht=ht1+ηt(ut,ζt,ηt)N(0,Q,S,W)\theta_t=\theta_{t-1}+u_t,\ \ a_t=a_{t-1}+\zeta_t,\ \ h_t=h_{t-1}+\eta_t \qquad (u_t,\zeta_t,\eta_t)\sim\mathcal N(0,\,Q,S,W)

Letting everything drift — without hallucinating drift

Every parameter is dated: yt=ct+B1,tyt1++Bp,tytp+εty_t = c_t + B_{1,t}y_{t-1} + \dots + B_{p,t}y_{t-p} + \varepsilon_t with εt=At1Σt1/2zt\varepsilon_t = A_t^{-1}\Sigma_t^{1/2}z_t, and the coefficient vector θt\theta_t, the contemporaneous elements ata_t, and the log-volatilities hth_t each follow a driftless random walk. The crucial discipline is tight, calibrated drift: a TVP-VAR has hundreds of drifting states and will happily fit noise as "structural change" if the walks move freely. Following Primiceri, a pre-sample OLS calibration (first T0=40T_0=40 quarters) centres the initial states at θ^OLS\hat\theta_{\text{OLS}} and sets each per-coefficient drift standard deviation to a tiny fraction of the coefficient scale — global tightness kQk_Q centred at Primiceri's benchmark 0.010.01, so a coefficient may move only ~1% of its estimation uncertainty per quarter — though here the data lift the estimate to kQ0.03k_Q\approx0.03, ~3× the benchmark but still small. Crucially kQ,kSk_Q, k_S are estimated, not fixed — the data decide how much time-variation there is, while the tight priors stop it hallucinating drift. All T×(dimθ+dima+m)T\times(\dim\theta+\dim a+m) latent states plus hyperparameters are sampled jointly by NUTS, every walk written non-centred to defuse the drift-variance funnel that makes TVP models notoriously hard to sample.

Results

The deliverable is the time-varying impulse response. The drifting coefficients are individually uninterpretable — but freezing the parameters at their date-tt values gives a fully specified structural VAR, from which we read the response to a recursively-identified (+1pp) monetary-policy shock, computed separately at four dates. The real effect of monetary policy was large in the 1970s–80s and much smaller by the Great Moderation. The peak output response to a tightening is −0.72 in 1975 and −0.49 in 1981, versus just −0.15 in 1996 — before deepening again to −0.50 in the 2008 crisis: monetary transmission to real activity weakened sharply as inflation became anchored, then re-intensified in the crisis — the central Primiceri / Boivin–Giannoni finding, reproduced from scratch. This is structural change a constant-coefficient VAR simply cannot see; Parts 3–4 would fit one average response across all four dates. The Great-Moderation volatility collapse persists even with the coefficients free to move, so it was not an artefact of holding the dynamics fixed in Part 4. (A caveat from Part 2 carries over: recursive identification produces a price puzzle in the early sample — an identification artefact, not a failure of the time-variation; the informative content is how the response magnitudes drift.) Cross-checked in R against a rolling-window OLS VAR — the classical foil Primiceri's model was built to improve on — which finds the same shrinking real transmission, only noisier, showing Bayesian shrinkage buys the smoothness.

Notebooks

Downloads

References