Forecasting for DCC Copula GARCH model in R

2019-08-11 01:32发布

I'm trying to forecast the Copula Garch Model. I have tried to use the dccforecast function with the cGARCHfit but it turns out to be error saying that there is no applicable method for 'dccforecast' applied to an object of class cGARCHfit. So how do actually we forecast the dcc copula garch model?

I have the following reproducible code.

library(zoo)
library(rugarch)
library(rmgarch)
data("EuStockMarkets")
EuStockLevel <- as.zoo(EuStockMarkets)[,c("DAX","CAC","FTSE")]
EuStockRet <- diff(log(EuStockLevel))

# DCC timecopula MVN

  uspec = ugarchspec(mean.model = list(armaOrder = c(0,0)), variance.model = list(garchOrder = c(1,1), model = "sGARCH", variance.targeting=FALSE), distribution.model = "norm")
  spec1 = cgarchspec(uspec = multispec( replicate(3, uspec) ), asymmetric = TRUE,  distribution.model = list(copula = "mvnorm", method = "Kendall", time.varying = TRUE, transformation = "parametric"))
  fit1 = cgarchfit(spec1, data = EuStockRet, cluster = NULL, solver.control=list(trace=1))
  print(fit1)  

 > fit.copula = cgarchfit(spec1, data = EuStockRet, out.sample = 120, solver = "solnp", solver.control =list(),fit.control = list(eval.se = TRUE, stationarity = TRUE, scale = FALSE),cluster = NULL, fit =NULL, VAR.fit = NULL)
 > dcc.copula.focast=dccforecast(fit.copula, n.ahead = 1, n.roll = 0) 
   Error in UseMethod("dccforecast") : no applicable method for 'dccforecast' applied to an object of class "c('cGARCHfit', 'mGARCHfit', 'GARCHfit', 'rGARCH')"

Appreciate your kind assistance.

Thanks

1条回答
来,给爷笑一个
2楼-- · 2019-08-11 02:09

DCC forecasts only work with dccfits. You can try the function cGARCHsim or let go of the Kendall method and go for a dccfit. Though forecasting using cGARCHsim can be a pain if you want to forecast for a longer period ahead.

See:

??cGARCHsim

Details

Since there is no explicit forecasting routine, the user should use this method >for incrementally building up n-ahead forecasts by simulating 1-ahead, >obtaining the means of the returns, sigma, Rho etc and feeding them to the next >round of simulation as starting values. The ‘rmgarch.tests’ folder contains >specific examples which illustrate this particular point.

查看更多
登录 后发表回答