Hi,

I found a possible bug in the garchSim function in the iteration of a GARCH / APARCH model. More specifically, I would say that y[i] should be calculated as:

y[i] = mu  +            sum(ar*y[i-(1:order.ar)]) + sum(ma*eps[i-(1:order.ma)]) + eps[i]

(instead of ... sum(ma*(h[i-(1:order.ma)]**deltainv)) ...)


Secondly, I would like to point out that, for the sake of consistency with the definition of an APARCH model, the sample should be:

# Sample:
data = cbind(
    z = z[(m+1):(n+m)],
    sigma = h[(m+1):(n+m)]^deltainv,
    y = y[(m+1):(n+m)])

and colnames in return values should be:

    colnames(ans) = c("garch", "sigma", "eps")


Finally, I would like to ask why are you using 'rev' in

z = c(rev(spec@presample[, 1]), z)
h = c(rev(spec@presample[, 2])^delta, rep(NA, times = n))
y = c(rev(spec@presample[, 3]), rep(NA, times = n))

Thanks for your answer.

Best regards,

Michal Miklovic
  



      ____________________________________________________________________________________
Never miss a thing.  Make Yahoo your home page. 

	[[alternative HTML version deleted]]

