Good day Sir,

I was trying to select the best asymmetric GARCH model by Monte Carlo
simulation, but I'm having some difficulties running the code.

Below is the code that I tried, but I'm getting error messages:

library(rugach)

spec = ugarchspec(mean.model = list(armaOrder = c(0,0), include.mean =
TRUE),
                  variance.model = list(model = "gjrGARCH"),
                  distribution.model = "norm",
                  fixed.pars = list("mu" =0, "omega" = 0.2, "alpha1" = 0.1,
                                    "beta1" = 0.7, "gamma1" = 0.2))
par(mfrow = c(2, 2))
x_obj <- ugarchpath(spec, n.sim = 1000, n.start = 1000, rseed = 12345)
show(x_obj)
for (i in 1:4) {
  plot(x_obj, which = i)
}
##The actual series
x1 <- x_obj@path$seriesSim
plot.ts(x1)
# Fit GARCH (1, 1)
fit <- ugarchfit(spec = spec, data = x1, out.sample = out.sample,)
show(fit).

Kind regards

        [[alternative HTML version deleted]]

_______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should 
go.

Reply via email to