[R-SIG-Finance] garchFit and garchSim

Andrey Riabushenko cdome at bk.ru
Sat May 17 11:33:16 CEST 2008


Thanks a lot. I am making progress, but still some problems left
I am running

returns = as.vector(returns)
model = garchFit(~garch(1,1), data=returns)

params = model at fit$matcoef[,1]
mu = params[1]
omega = params[2]
alpha = params[3]
beta = params[4]

presample = cbind(returns, residuals(model, standardize =TRUE), model at h.t)

sim = mu + garchSim(list(alpha = alpha, beta = beta, omega = omega), 
n=n.ahead, n.start = length(returns), presample=presample)

But what I get is
head(sim) 
NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN 

What it is wrong?


Also it is not clear why arima simulation is wrong  if n.ahead > 1, I need 
more than 1 for my study?

> The modeled series is readily available - in your case it is 'returns'. h.t
> can be obtained by m at h.t and starting values for the innovations, i.e. the
> standardised residuals, can be obtained by residuals(m, standardize =
> TRUE).
>
> Hope this helps.
>
> Michal
>
>
>
>



More information about the R-SIG-Finance mailing list