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.
Diese Übung ist Teil des Kurses
GARCH Models in R
Anleitung zur Übung
- 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.
Interaktive Übung
Versuche dich an dieser Übung, indem du diesen Beispielcode vervollständigst.
# 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")