if (FALSE) {
data(sp500ret)
spec = ugarchspec(variance.model=list(model="gjrGARCH", garchOrder=c(1,1)),
mean.model=list(armaOrder=c(1,1), arfima=FALSE, include.mean=TRUE,
archm = FALSE, archpow = 1), distribution.model="std")
fit = ugarchfit(data=sp500ret[, 1, drop = FALSE], out.sample = 0,
spec = spec, solver = "solnp")
dist = ugarchdistribution(fit, n.sim = 2000, n.start = 50, m.sim = 5)
}
Run the code above in your browser using DataLab