for (i in 1:n) { tmp = ugarchroll(spec[[i]], R, n.ahead = 1, forecast.length = 1500, refit.every = 50, refit.window = 'moving', windows.size = 1500, solver = 'hybrid', calculate.VaR = FALSE, cluster = cluster, keep.coef = FALSE) while(!is.null(tmp@model$noncidx)){ tmp = resume(tmp, solver = 'gosolnp', fit.control = list(scale = 1), solver.control = list(tol = 1e-07, delta = 1e-06), cluster = cluster) } fitlist[[i]] = as.data.frame(tmp, which = 'density') print(i) }]]>

fitlist[[i]] = as.data.frame(tmp, which = ‘density’)

should return 64 data frames (since we have 64 models), however when I use the same code I only get 14 of them with no error messages. Can you think of anything that might be the cause? Thanks! ]]>

I don’t understand line :

VaR1cc = apply(q1, 2, function(x) VaRTest(0.01, actual = fitlist[[1]][, ‘Realized’], VaR = x)$cc.LRp)

why actual = fitlist[[1]][, ‘Realized’] why 1 ?

What I see from loops fitlist[[1]] is one of the models : sGARCH(1,1) -N

The same question for line :

LossV5 = apply(q5, 2, function(x) rugarch:::.varloss(0.05, fitlist[[1]][, ‘Realized’], x))

vmodel = fit@model$modeldesc$vmodel zseries = as.numeric(residuals(fit, standardize=TRUE)) distribution = fit@model$modeldesc$distribution idx = fit@model$pidx pars = fit@fit$ipars[,1] skew = pars[idx["skew",1]] shape = pars[idx["shape",1]] if(distribution == "ghst") ghlambda = -shape/2 else ghlambda = pars[idx["ghlambda",1]] rugarch:::.qqDist(y = zseries, dist = distribution, lambda = ghlambda, skew = skew, shape = shape)

The main functionality can be found in the ‘rugarch:::.qqDist’ function.

]]>http://unstarched.net/r-downloads/ ]]>