Skip to content

Inference in SVMA models identified by external instruments/proxies

License

Notifications You must be signed in to change notification settings

mikkelpm/svma_iv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Instrumental variable identification of dynamic variance decompositions

Matlab code for inference on variance decompositions and the degree of invertibility/recoverability in a general Structural Vector Moving Average (SVMA) model identified by external instruments (IVs, also known as proxies)

Reference: Plagborg-Møller, Mikkel and Christian K. Wolf (2022), "Instrumental Variable Identification of Dynamic Variance Decompositions", Journal of Political Economy 130(8), 2164-2202 (also available as arXiv:2011.01380)

Tested in: Matlab R2020a on Windows 10 PC (64-bit)

Other versions: Python code written by João B. Duarte

Contents

functions: Matlab routines

applications: empirical applications

illustration: numerical illustration

  • run_sw.m: SVMA-IV and SVAR-IV analysis of Smets & Wouters (2007) model

simulations: simulation study

Example

addpath('functions');
% Given (T x n_y) data matrix Y with endogenous variables
% and (T x 1) data vector Z with external instrument
[bounds, id_recov, inv_test] = ...
  SVMAIV_estim(Y, Z, ...
               'ic', 'aic', ...   % Select lag length using AIC
               'signif', 0.1, ... % 10% significance level
               'n_boot', 500, ... % 500 bootstrap iterations
               'horiz', 1:24);    % Compute horizons 1-24 of FVR/FVD

Output:

  • bounds structure: partial identification bounds
    • bounds.estim: point estimates of bounds
    • bounds.ci: confidence intervals for identified set
  • id_recov structure: results under additional assumption of recoverability
    • id_recov.estim: point estimates of parameters
    • id_recov.ci: confidence intervals for parameters
  • inv_test structure: pre-test for invertibility, implemented as a Granger casuality test, either in all equations jointly (subfield all) or in each y equation separately (subfield eqns)
    • inv_test.wald_stat: Wald statistics
    • inv_test.df: degrees of freedom
    • inv_test.pval: p-values

Parameter names:

  • alpha: scale parameter
  • R2_inv: degree of invertibility
  • R2_recov: degree of recoverability
  • FVR: forecast variance ratio
  • FVD: forecast variance decomposition

See our empirical applications for concrete examples of how to use the code. Additional optional arguments to SMVAIV_estim.m are listed at the top of the function.

Replication instructions

The figures and tables in our paper and supplement are produced as follows:

Acknowledgements

We are grateful to Diego Känzig for allowing us to reproduce some of the data files used in his 2021 AER paper.

Wolf acknowledges support from the Alfred P. Sloan Foundation and the Macro Financial Modeling Project. Plagborg-Møller acknowledges that this material is based upon work supported by the National Science Foundation under Grant #1851665.