Matlab code for large-scale simulation studies of impulse response estimators, including Local Projections (LPs), Vector Autoregressions (VARs), and several variants of these
Reference: Li, Dake, Mikkel Plagborg-Møller, and Christian K. Wolf (2022), "Local Projections vs. VARs: Lessons From Thousands of DGPs" (:page_facing_up:paper, 📊supplement)
Tested in: Matlab R2020a on Windows 10 PC (64-bit)
Documents: Paper, supplement, and documentation
- lp_var_simul.pdf: Main paper
- lp_var_simul_supplement.pdf: Online supplement
- lp_var_simul_companion.pdf: Technical documentation
Analytical_Illustration: Plots for simple analytical illustration
- plot_tradeoff.m: Figure 1 in the paper
- plot_indiff.m: Figure 2 in the paper
Estimation_Routines: General-purpose impulse response estimation functions
- BVAR_est.m: Bayesian VAR
- LP_est.m: Least-squares LP
- LP_shrink_est.m: Penalized LP (Barnichon & Brownlees, 2019)
- SVAR_est.m: Least-squares VAR (can also do bias correction)
- SVAR_IV_est.m: Least-squares SVAR-IV
- VAR_avg_est.m: VAR model averaging (Hansen, 2016)
DFM: Simulation study based on encompassing Dynamic Factor Model (DFM)
- run_dfm.m: Main file for executing simulations
- Reporting: Folder with files that produces results figures and tables
- run_plot_dgp.m: Plots and tables of DGP summary statistics (Table 1 and Figure 3 in the paper)
- run_plot_loss.m: Plots of bias, standard deviation, median bias, and interquartile range (Figures 4-5 and 10-11 in the paper)
- run_plot_tradeoff.m: Plots of head-to-head loss function comparisons and best method (Figures 6-9 and 12 in the paper)
- settings_shared.m: Shared settings for plotting functions
- Settings: Folder with simulation settings
- Subroutines: Folder with data for calibrating the DFM and various functions for simulation and computing summary statistics
- SW_DFM_Estimation: DFM code and data from Lazarus, Lewis, Stock & Watson (2018)
We rely on penalized LP code by Regis Barnichon & Christian Brownless, as well as VAR model averaging code by Bruce Hansen. We have slightly modified both of these sets of codes to improve their run-time without affecting their numerical output. We also use Dynamic Factor Model code and data by Eben Lazarus, Daniel Lewis, Jim Stock & Mark Watson.
Plagborg-Møller acknowledges that this material is based upon work supported by the National Science Foundation under Grant #1851665.