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


1 Answer 1


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!.

  • $\begingroup$ hi..yes in the end I used ugarchforecast(). Thanks for linking the last updated vignette in rugarch package though $\endgroup$
    – Luigi87
    Mar 11, 2021 at 8:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.