[R-SIG-Finance] Question about dccsim

Rods uchiharj at gmail.com
Sun Jul 26 23:58:44 CEST 2015


Hi,

I'm wondering why dccsim is giving a different 1 step ahead H matrix from
dccforecast. Shouldn't these be the same? Running the code below, you can
see that only the diagonal matches. Also, if I remove the rseed argument
I'm getting an error, is it just me? Lastly, if you just run "sim1", you
get an empty summary.

Thanks in advance,
-------------------------------------------------------------------------------------

    data(dji30retw)
    Dat = dji30retw[, 1:3, drop = FALSE]


    cnames = colnames(Dat)
    uspec = ugarchspec(mean.model = list(armaOrder = c(2,1), include.mean =
FALSE), variance.model = list(garchOrder = c(1,1), model = "gjrGARCH"),
distribution.model = "norm")
    spec1 = dccspec(uspec = multispec( replicate(3, uspec) ), dccOrder =
c(1,1),
             distribution = "mvnorm")
    fit1 = dccfit(spec1, data = Dat, out.sample = 100, fit.control = list(
eval.se=FALSE))
    T = dim(Dat)[1]-100


    forc2 = dccforecast(fit1, n.ahead = 1, n.roll = 10)
    presigma = tail( sigma(fit1 ), 2 )
    preresiduals = tail( residuals(fit1), 2 )
    prereturns = tail( as.matrix(Dat[1:T,]), 2 )


    sim1 = dccsim(fitORspec = fit1, n.sim = 2, m.sim = 500, startMethod =
"unconditional",
            presigma = presigma, preresiduals = preresiduals, prereturns =
prereturns,
            preQ = last(rcor(fit1, type = "Q"))[,,1], Qbar = fit1 at mfit$Qbar,

            preZ = tail(fit1 at mfit$stdresid, 1), rseed=c(152))


    sim1 at msim$simH[[1]][,,1]
    forc2 at mforecast$H[[1]]

	[[alternative HTML version deleted]]



More information about the R-SIG-Finance mailing list