library(tidyverse)
library(tidyMacro)
library(tictoc)
set_theme(fThemeTidyMacro())7 Identification via Heteroskedasticity
Oil Supply News via Regime-Based Variance Shifts (Kaenzig 2021)
7.1 Overview
This chapter identifies the same oil supply news shock as in Känzig (2021), but instead of using the high-frequency instrument as a proxy it exploits the shift in the variance of structural shocks around OPEC announcement months, following Rigobon (2003). OPEC-announcement months serve as the high-variance regime.
7.2 Model and Identification
With two variance regimes indexed by \(z_t \in \{0, 1\}\), the impact vector \(s\) satisfies
\[\Sigma_1 - \Sigma_0 = s s' (\lambda_1 - \lambda_0), \qquad \lambda_j > 0,\]
which identifies \(s\) up to sign and scale without exclusion restrictions.
7.3 Setup
7.4 Data
data("Kaenzig2021")
finaldata <- Kaenzig2021 |>
select(Oil_Price, World_Oil_Prod, World_Oil_Inven, World_IP, US_IP, US_CPI) |>
as.matrix()
# The instrument is used only to build the regime indicator
iv_oil <- Kaenzig2021 |>
select(iv_kanzig_final) |>
drop_na() |>
as.matrix()
varnames <- c("Oil Price", "World Oil Prod.", "World Oil Inven.",
"World IP", "US IP", "US CPI")7.5 VAR Estimation
p <- 12
c <- 1
var_result <- fVAR(finaldata, p, c)
residuals <- var_result$residuals
hor <- 48
adjustu <- c(nrow(residuals) - nrow(iv_oil) + 1, nrow(residuals))7.6 Point Estimate
The regime indicator is 1 in OPEC-announcement months and 0 otherwise.
indsR1 <- as.integer(iv_oil[, 1] != 0)
cat("OPEC announcement months:", sum(indsR1), "of", length(indsR1), "\n")
#> OPEC announcement months: 117 of 417
hetero_pt <- fHeteroIRF(
var_result = var_result,
Z = iv_oil,
adjustu = adjustu,
indsR1 = indsR1,
hor = hor,
nvar = 1,
scale = 1
)7.7 Bootstrap
tic()
boot_hetero <- fBootstrapHetero(
y = finaldata,
var_result = var_result,
Z = iv_oil,
indsR1 = indsR1,
adjustu = adjustu,
nboot = 10000,
blocksize = 0,
hor = hor,
nvar = 1,
scale = 1,
n_threads = 3
)
#> Using 3 thread(s) for heteroskedasticity bootstrap...
toc()
#> 13.193 sec elapsed7.8 Impulse Response Functions
fPlotIRFHetero(
result = boot_hetero,
varnames = varnames,
shockname = "Oil Shock (Hetero)",
scale = 10,
facet_ncol = 3
) +
labs(x = NULL, y = NULL)
References
Känzig, Diego R. 2021. “The Macroeconomic Effects of Oil Supply News: Evidence from OPEC Announcements.” American Economic Review 111 (4): 1092–125. https://doi.org/10.1257/aer.20190964.
Rigobon, Roberto. 2003. “Identification Through Heteroskedasticity.” The Review of Economics and Statistics 85 (4): 777–92. https://doi.org/10.1162/003465303772815727.