# load data
data("sp500")
sp500 = sp500[1:1000]
# create model specification
spec = MSGARCH::create.spec()
# fit the model by MLE
fit = MSGARCH::fit.mle(spec = spec, y = sp500, ctr = list(do.init = FALSE))
# compute AIC
AIC = MSGARCH::AIC(fit)
Run the code above in your browser using DataLab