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
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: