# load data
data("sp500")
sp500 = sp500[1:1000]
# create model specification
spec = MSGARCH::create.spec()
# fit the model on the data with Bayesian estimation
set.seed(123)
fit = MSGARCH::fit.bayes(spec = spec, y = sp500,
ctr = list(N.burn = 500, N.mcmc = 1000, N.thin = 1))
summary(fit)
Run the code above in your browser using DataLab