Big-Data VARs — Factor Augmentation & Large-Scale Stochastic Volatility
Python · R · Part 9 of the VAR arc — shrink vs compress
Overview
Part 9 of the VAR arc: letting a VAR see the whole economy. Two strands of the series have run separately — Part 3 built a large VAR disciplined by Minnesota shrinkage but with a constant shock covariance; Parts 4–5 added stochastic volatility and drifting coefficients, but only on a tiny 3-variable system. Real applications need both at once, and there are two complementary routes to big data: shrink or compress. This example builds each from scratch. 9a — the large SV-VAR keeps all the variables and shrinks (Carriero–Clark–Marcellino 2019): stochastic volatility on a 10-variable BVAR, feasible because the triangular factorization splits the covariance into univariate SV problems. 9b — the Factor-Augmented VAR (Bernanke–Boivin–Eliasz 2005) takes the opposite route: summarise a 169-series macro panel by a handful of principal-component factors, put those in a small VAR, and recover the impulse response of every underlying series through its factor loadings.
Two routes to big data — shrink (9a) and compress (9b)
9a — large BVAR-SV. A 10-variable VAR(2) in stationary macro series carries the triangular SV structure of Part 4 to all ten equations: a constant unit-lower-triangular orthogonalises the shocks into ten independent components, each with its own random-walk log-volatility . The key to feasibility is that conditional on , the equations' volatilities separate into univariate stochastic-volatility problems — the Carriero–Clark–Marcellino insight — so the whole coefficient block (Minnesota prior), , and the volatility surface sample jointly by NUTS in minutes. 9b — FAVAR. A large panel of informational series is driven by latent factors plus the policy rate ; the Bernanke–Boivin–Eliasz two-step extracts as principal components, fits a small VAR on , and identifies the monetary shock recursively with the rate ordered last — cleaned by the slow–fast correction (factors from the slow-moving real/price block are purged of contemporaneous rate response). The response of any series is then reconstructed from its loading, .
Results
9a — a common macro-uncertainty factor. Every one of the ten macro shock volatilities collapses at the Great Moderation (~1984) and spikes around the 2008 crisis (most sharply in the real-activity shocks); the constant-variance VAR sits uselessly in the middle, and the log-likelihood rises ~510 moving to SV. The by-product only a large SV system can deliver: the first principal component of the ten volatilities explains 73% of their comovement — the macro system has essentially one common volatility factor that rises in every recession and falls through the Great Moderation, a model-based macroeconomic-uncertainty index (à la Jurado–Ludvigson–Ng). A 3-variable VAR cannot tell common from idiosyncratic volatility. 9b — one VAR, the response of everything. A tightening contracts output, consumption, investment, industrial production and employment (troughs ~−0.1 std), raises unemployment, and cools housing — a coherent economy-wide contraction recovered from a single four-factor VAR, the response of dozens of series rather than the three or ten a VAR can hold directly. Consumer prices show a mild, transient price puzzle that the slow–fast identification tames but does not fully remove (as in BBE's own results) — the richer information set shrinks the puzzle a small VAR would show. Two answers to one problem: shrinkage preserves every series as a modelled object with its own volatility; the factor route buys a far larger information set and a comprehensive impulse-response picture at the cost of treating series as loadings on a few factors. Each is cross-checked in R (vars; stochvol).
Notebooks
Downloads
favar.py The from-scratch FAVAR module — factor extraction, slow–fast identification, and loading-based impulse-response reconstruction (new self-contained module) bvar.py The Minnesota / steady-state BVAR helpers (shared with the Bayesian VAR example) — supplies the Minnesota prior for the large SV-VAR largesv_data.csv 10 stationary FRED-QD macro series, quarterly 1960–2019 — the large SV-VAR (9a) favar_data.csv 169 FRED-QD series transformed to stationarity and standardised, plus the funds rate, quarterly 1960–2019 — the FAVAR panel (9b) References
- Carriero, A., Clark, T. E. & Marcellino, M. (2019). Large Bayesian vector autoregressions with stochastic volatility and non-conjugate priors. Journal of Econometrics 212(1), 137–154. — the large SV-VAR of 9a and its equation-by-equation feasibility
- Bernanke, B. S., Boivin, J. & Eliasz, P. (2005). Measuring the effects of monetary policy: a factor-augmented vector autoregressive (FAVAR) approach. Quarterly Journal of Economics 120(1), 387–422. — the FAVAR of 9b, slow–fast identification, and loading-based IRFs
- Stock, J. H. & Watson, M. W. (2002). Macroeconomic forecasting using diffusion indexes. Journal of Business & Economic Statistics 20(2), 147–162. — principal-component factor extraction from large panels
- Jurado, K., Ludvigson, S. C. & Ng, S. (2015). Measuring uncertainty. American Economic Review 105(3), 1177–1216. — the common macroeconomic-uncertainty factor of 9a
- Primiceri, G. E. (2005). Time varying structural vector autoregressions and monetary policy. Review of Economic Studies 72(3), 821–852. — the triangular time-varying-covariance factorization
- Kim, S., Shephard, N. & Chib, S. (1998). Stochastic volatility: likelihood inference and comparison with ARCH models. Review of Economic Studies 65(3), 361–393. — the stochastic-volatility component and the R
stochvolcross-check - McCracken, M. W. & Ng, S. (2020). FRED-QD: a quarterly database for macroeconomic research. Federal Reserve Bank of St. Louis Review 103(1), 1–44. — the FRED-QD data panel for both notebooks