【问题标题】:DCC GARCH model - Conditional Correlation Forecast Plot shows errorDCC GARCH 模型 - 条件相关预测图显示错误
【发布时间】:2017-11-11 01:30:09
【问题描述】:

我有一个使用 DCC GARCH 拟合建模的双变量时间序列(您可以在此处找到 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 情节保持不变。这个可以吗?我认为它会捕捉拟合模型的波动性。

非常感谢任何帮助

谢谢, D

【问题讨论】:

  • 我建议在您的问题中添加一个最小数据集,这是重现错误所必需的。帮助你会更容易。
  • @MarcoSandri 我已添加我的数据集供您参考。谢谢。

标签: r time-series forecasting


【解决方案1】:

在估计之前尝试 as.matrix() 为您的数据

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-09-24
    • 1970-01-01
    • 1970-01-01
    • 2019-06-14
    相关资源
    最近更新 更多