Skip to content
All library documents

How ugarchroll Forecast Length Differs from Future GARCH Forecasts

Article Quant Q&A · Author: Luigi87

Summary

The document discusses a user’s attempt to obtain a 21-observation-ahead volatility forecast with the R package function ugarchroll. The user sets a forecast length and expects results dated after the final observation, but the returned data still end on the sample’s last date. A reply explains that forecast.length appears to reserve the final observations for an out-of-sample evaluation, producing forecasts over existing data rather than extending the series into the future.

The reply contrasts this with ugarchforecast, which is described as producing forecasts for the requested horizon beyond the data. It suggests writing a loop for the desired workflow, but gives no implementation, package documentation, or empirical check. The explanation is anecdotal and should be verified against the relevant package version and settings; the document does not detail how to construct or validate the proposed loop.

Key ideas

  • The question concerns extending volatility forecasts beyond the final observation with ugarchroll.
  • The reply describes forecast.length as targeting held-out observations within the supplied sample.
  • The reply distinguishes ugarchroll’s rolling evaluation from ugarchforecast’s future horizon forecasts.
  • A custom loop is suggested, but its design and validation are not supplied.

Tags

Full text
# Use of ugarchroll vs ugarchforecast: setting parameters


# Use of ugarchroll vs ugarchforecast: setting parameters












I would like to generate 21 day ahead forecast volatility with ugarchroll. I know it is similar to ugarchforecast with the exception that ugarchroll is a rolling average which considers initially the last n.start points to generate one sample ahead. While ugarchforecast is not rolling. I tried to coded as follows:

```
ugfit_roll <- ugarchroll(ug_spec, EURUSD, n.start = 3000, refit.every = 1000, refit.window = "moving", forecast.length = 21)
garchpreds <- as.data.frame(ugfit_roll)
```

however, I am not able to see the 21 points in the future..my data are 5600 samples ending 24/07/2020, afetr running the above function I was expecting to see from "View(garchpreds)" the data ending 17/08/2020..but it is not like that and I still see 24/07/2020. What is it going wrong? thanks for helping. Luigi

## Answer by Francisco Javier Jara Ávila (score 2)

https://quant.stackexchange.com/a/61613

It seems to me like the package does not work that way. I have been wondering around with the same problem and with the parameter `forecast.length` it forecasts the last 21 observations from your data trying to do a "cross validation".

With `ugarchforecast()` it actually forecasts the amount of times ahead you ask. It seems to me very weird what this function does, since I naively used the function as well.

I suggest you coding the loop yourself and reading this!.

Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.