Skip to content
Prev 13933 / 15274 Next

How are errors terms calculated in GARCH model by rugarch package?

1. The initialization of the recursion (and options for doing so) is
described in the vignette...please READ IT.

The default it to use the mean of the squared residuals.

Many questions have already been answered over the years on this mailing
list regarding
the estimation and related issues so you might also like to search the
archives.

2. For some reason you are multiplying alpha1 by the value of X1 rather
than X1^2.
Have you pre-squared X1 somewhere and I missed it?

Here is the code to get exactly the same values:
#########################
z2 = rep(0,(N-1000))
sighat1 = rep(0,(N-1000))
sighat1[1] = sqrt(mean(X1^2))
z2[1] = X1[1]/sighat1[1]
for(i in 2:length(X1)){
  sighat1[i] = sqrt(omega1 + alpha1 * X1[i-1]^2 + beta1 * sighat1[i-1]^2)
  z2[i] = X1[i]/sighat1[i]
}
all.equal(z1, z2)
#########################

3. You may want to revisit your use of "rt". This is not the
standardized distribution
and hence you will not have a st.deviation of 1.

In rugarch, rdist("std",mu,sigma,shape,skew) is the standardized student
distribution
i.e. rt(1, df=nu)/(sqrt(nu/(nu-2)))


-Alexios
On 08/06/2016 17:58, Xie Yijun wrote: