我目前正在使用软件包rugarch
来使用样本数据来预测未来的波动,并继续获取错误:
使用规格时:
ugarchforecast(ug_spec, n.ahead = 1, n.roll = 499, data = ForeRFTSE[1:758, , drop = FALSE], out.sample = 500)
错误:
ugarchforecast-->error: parameters names do not match specification
Expected Parameters are: mu ar1 ma1 omega alpha1 beta1
或使用适合的参数时:
ugarchforecast(RFTSE_GARCH, n.ahead = 1, n.roll = 499, data = ForeRFTSE[1:758, , drop = FALSE], out.sample = 500)
错误:
Error in .sgarchforecast(fitORspec = fitORspec, data = data, n.ahead = n.ahead, :
ugarchforecast-->error: n.roll must not be greater than out.sample!
这是我的ug_spec代码
ug_spec <- ugarchspec(variance.model = list(model = "sGARCH",
garchOrder = c(1,1)),
mean.model = list(armaOrder=c(1,1),
include.mean=TRUE),
distribution.model = "norm" )
这是我的RFTSE_GARCH
RFTSE_GARCH = ugarchfit(spec = ug_spec,solver = 'hybrid', data = RFTSE)