Matlab code for SVAR using the oil supply surprise series constructed using high-frequency oil price variation around OPEC announcements as an external instrument to identify a structural oil supply news shock, compute the dynamic causal effects as well as the historical decomposition
Reference: Känzig (2021), "The macroeconomic effects of oil supply news: Evidence from OPEC announcements", https://www.aeaweb.org/articles?id=10.1257/aer.20190964&&from=f (article), https://papers.ssrn.com/sol3/papers.cfm?abstract_id=3185839 (working paper+appendix)
Tested in: Matlab 2019b on Windows 10 (64-bit)
mainAnalysisOilSupplyNews.m: Main shell to reproduce all results. For external instruments
estimator, set estType = 'proxy'
; for heteroskedasticity-based set estType = 'hetero'
\subfiles: Subscripts called in mainAnalysisOilSupplyNews.m
- transformAndPlotData.m: script to transform (and plot) raw data
- loadProxy.m: script to read in external instrument
- runProxyVAR.m: script to estimate proxy VAR; bands are computed using bootstrapping techniques
- runRigobonVAR.m: script to estimate heteroskedasticity-based VAR; bands are computed using bootstrapping techniques
\auxfiles: Matlab functions to estimate VARX using OLS, as well as other subroutines
\data: Data for analysis
- OilDataM.mat: raw data used in VAR
- OilSurprisesMLog.mat: oil supply surprise series constructed using high-frequency approach
- OilSurprisesMLogControl.mat: control series
\figures: Stores results from analysis
paper: Pdf containing paper and online appendix