ugarchforecast(fitORspec, data = NULL, n.ahead = 10, n.roll = 0, out.sample = 0,
external.forecasts = list(mregfor = NULL, vregfor = NULL), ...)
uGARCHfit
or
alternatively a univariate GARCH specification object of class
uGARCHspec
with valid fixed parameters.uGARCHforecast
object containing details of the GARCH
forecast. See the class for details on the returned object and methods for
accessing it and performing some tests.n.roll
argument which controls how many times to roll the n.ahead
forecast. The default argument of n.roll = 0 denotes no rolling and returns the
standard n.ahead forecast. Critically, since n.roll depends on data being
available from which to base the rolling forecast, the ugarchfit
function needs to be called with the argument out.sample
being at least
as large as the n.roll argument, or in the case of a specification being used
instead of a fit object, the out.sample
argument directly in the forecast
function.ugarchfilter
,simulation ugarchsim
,
rolling forecast and estimation ugarchroll
, parameter distribution
and uncertainty ugarchdistribution
, bootstrap forecast
ugarchboot
.# Basic GARCH(1,1) Spec
data(dmbp)
spec = ugarchspec()
fit = ugarchfit(data = dmbp[,1], spec = spec)
forc = ugarchforecast(fit, n.ahead=20)
forc
head(as.data.frame(forc))
#plot(forc,which="all")
Run the code above in your browser using DataLab