Exercise

# Out-of-sample forecasting

The `garchvol`

series is the series of predicted volatilities for each of the returns in the observed time series `sp500ret`

. For decision making, **it is the volatility of the future** (not yet observed) **return that matters**. You get it by applying the `ugarchforecast()`

function to the output from `ugarchfit()`

In forecasting, we call this the out-of-sample volatility forecasts, as they involve predictions of returns that have not been used when estimating the GARCH model.

This exercise uses the `garchfit`

and `garchvol`

objects that you created in the previous exercise. If you need to check which arguments a function takes, you can use `?name_of_function`

in the Console to access the documentation.

Instructions

**100 XP**

- Compute the unconditional volatility using the method
`uncvariance()`

. - Print the estimated volatilities for the ten last returns in the
`sp500ret`

sample. - Use
`ugarchforecast()`

to forecast the volatility for the next five days. - Use
`sigma()`

to obtain the predicted volatilities for the next five days and print them.