DCC GARCH模型 - 条件相关预测图显示错误

时间:2017-06-09 06:35:17

标签: r time-series forecasting

我有一个使用DCC GARCH fit建模的双变量时间序列(你可以在这里找到data)。当我绘制Conditional Correlation Forecast时,会抛出错误

> head(d_1)
                    x vibration_x     Speed
1 2017-05-16 17:53:00      -0.132  421.4189
2 2017-05-16 17:54:00      -0.296 1296.8882
3 2017-05-16 17:56:00      -0.736 1254.2695
4 2017-05-16 18:00:00      -0.044 1209.6681
5 2017-05-16 18:01:00      -0.516 1212.5668
6 2017-05-16 18:02:00       0.492 1205.6841

garch11.spec.b = ugarchspec(mean.model = list(armaOrder = c(1,1)), 
                          variance.model = list(garchOrder = c(1,1), 
                                                model = "sGARCH"), distribution.model = "norm")
dcc.garch11.spec.b = dccspec(uspec = multispec( replicate(2, garch11.spec.b) ), dccOrder = c(1,1), distribution = "mvnorm")
fit.b = dccfit(dcc.garch11.spec.b, data = d_1[,c(2,3)], fit.control = list(eval.se=T))


#Forecast
dcc.focast.a=dccforecast(fit.b, n.ahead = 100, n.roll = 0) 

> plot(dcc.focast.a)

Make a plot selection (or 0 to exit): 

1:   Conditional Mean Forecast  (vs realized  returns)
2:   Conditional Sigma Forecast (vs realized |returns|)
3:   Conditional Covariance Forecast
4:   Conditional Correlation Forecast
5:   EW Portfolio Plot with forecast conditional density VaR limits

Selection: 4
Error in .plot.dccforecast.4(x, series, ...) : Not a matrix.

此外,Conditional Covariance Forecast图仍然保持不变。这个可以吗?我认为它会捕捉拟合模型的波动性。 1

非常感谢任何帮助

谢谢, d

1 个答案:

答案 0 :(得分:0)

在估算之前为数据尝试as.matrix()