感谢辉的文献吖,刚刚开始学习Copula-DCC-GARCH
模型,及时雨~?
require('rugarch')
require('rmgarch')
require('quantmod')
require('lubridate')
mbase <- getSymbols('JPY=X', from = today() %m-% years(1))
mbase <- cbind(Hi(mbase), Lo(mbase))
speclist <- filter_spec(mbase, .currency = 'JPY=X', .price_type = 'HL')
mspec <- multispec(speclist)
cSpec <- cgarchspec(
mspec, VAR = .VAR, lag = 1,
lag.criterion = c('AIC', 'HQ', 'SC', 'FPE'),
external.regressors = NULL, #external.regressors = VAREXO,
dccOrder = c(1, 1),
distribution.model = list(
copula = .dist.model, method = .model, transformation = .tram),
start.pars = list(), fixed.pars = list())
# question 1: cgarchsim()
fc1 <- cgarchsim(fit, n.sim = ..., m.sim = 1)
# question 2: p=?
fc2 <- varxforecast(X = mbase, Bcoef = fit@mfit$stdresid, p = 2,
out.sample = 0, n.ahead = .ahead, n.roll = 0,
mregfor = NULL)
#Error in Bcoef %*% t(Z) : non-conformable arguments
问题原文:Copula-DCC-GARCH : rmgarch::cgarchsim() and rmgarch::varxforecast()