library(fGarch) # garch data with normal innovations spec.norm <- garchSpec(model = list(omega = 0.02, alpha = 0.2, beta = 0.7, mu = 0.1), cond.dist="norm", rseed = 2008) garch.norm <- garchSim(spec = spec.norm, n = 2000, n.start = 1000) # garch data with student innovations with degree of freedom = 8 spec.std <- garchSpec(model = list(omega = 0.02, alpha = 0.2, beta = 0.7, mu = 0.1, shape = 8), cond.dist = "std", rseed = 2008) garch.std <- garchSim(spec = spec.std, n = 2000, n.start = 1000) # estimation of the normal garch model.norm.hess <- garchFit(~ garch(1,1), garch.norm, cond.dist = "norm", algorithm = "nlminb", hessian = "rcd") summary(model.norm.hess) model.norm.QMLE <- garchFit(~ garch(1,1), garch.norm, cond.dist = "QMLE", algorithm = "nlminb", hessian = "rcd") summary(model.norm.QMLE) # estimation of the student garch model.std.hess <- garchFit(~ garch(1,1), garch.std, cond.dist = "norm", algorithm = "nlminb", hessian = "rcd") summary(model.std.hess) model.std.QMLE <- garchFit(~ garch(1,1), garch.std, cond.dist = "QMLE", algorithm = "nlminb", hessian = "rcd") summary(model.std.QMLE)