CommencerCommencer gratuitement

Comovement between predicted vol and VaR

The value-at-risk plots shows substantial time-variation in the downside risk. This time-variation is mostly driven by the time-variation in the return volatility. In this exercise, you will verify that this is the case for the daily Microsoft returns by plotting in one figure both the 5% value-at-risk and the estimated volatility. The object garchroll holding the output of a rolling GARCH estimation is already available to you in the console.

Cet exercice fait partie du cours

GARCH Models in R

Afficher le cours

Instructions

  • Obtain the data frame with mean and volatility predictions from garchroll.
  • Use the appropriate method method to extract the 5% VaR from garchroll .
  • Extract the volatility from garchpreds.
  • Analyze the comovement in a time series plot.

Exercice interactif pratique

Essayez cet exercice en complétant cet exemple de code.

# Extract the dataframe with predictions from the rolling GARCH estimation
garchpreds <- ___(garchroll)

# Extract the 5% VaR 
garchVaR <- ___(garchroll, ___ = ___)

# Extract the volatility from garchpreds
garchvol <- xts(garchpreds$___, order.by = time(garchVaR))

# Analyze the comovement in a time series plot
garchplot <- plot(garchvol, ylim = c(-0.1, 0.1))
garchplot <- addSeries(garchVaR, on = 1, col = "blue")
plot(garchplot, main = "Daily vol and 5% VaR")
Modifier et exécuter le code