tidyMacro
  • Home
  • FAQ
  1. Heteroskedasticity
  • Main
  • Short-run restrictions
  • Long-run restrictions
  • Mixed restrictions
  • External Instruments and Weak IV
  • Noninvertible shocks
  • Sign restrictions
  • Narrative restrictions
  • Sign restrictions and External instruments
  • Internal instruments
  • Heteroskedasticity
  • LP Primer
  • LP Syntax Primer
  • LP with Exogenous Shocks and IV
  • LP Panel
  • LP DID

On this page

  • 1 Overview
  • 2 Model and Identification
  • 3 Setup
  • 4 Data
  • 5 VAR Estimation
  • 6 Point Estimate
  • 7 Bootstrap
  • 8 Impulse Response Functions
  • References
  • Edit this page
  • Report an issue

Identification via Heteroskedasticity

Oil Supply News via Regime-Based Variance Shifts (Kaenzig 2021)

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.

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.


3 Setup

library(tidyverse)
library(tidyMacro)
library(tictoc)

set_theme(fThemeTidyMacro())

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")

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))

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 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()
#> 11.476 sec elapsed

8 Impulse Response Functions

fPlotIRFHetero(
    result     = boot_hetero,
    varnames   = varnames,
    shockname  = "Oil Shock (Hetero)",
    scale      = 10,
    facet_ncol = 3
) +
  labs(x = NULL, y = NULL)
Figure 1: IRFs identified via heteroskedasticity — OPEC-announcement months as the high-variance regime (68% and 90% confidence bands)
Back to top

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.
Internal instruments
LP Primer

© 2025 Muhsin Ciftci · Goethe University Frankfurt

 
  • Edit this page
  • Report an issue

This page is built with Quarto.