* * Example 10.3.1 from pp 353-356 * open data e1032.dat data(org=columns) 1 464 dowj * * The GARCH instruction, by default, will estimate the mean of the process along * with the variance parameters. This will give a different estimate of the mean * because it "downweights" the observations with a high variance. * garch(p=1,q=1,hseries=h) / dowj * * Do the stacked graph of the returns with the estimated variances * spgraph(vfields=2,footer="Figure 10.10 Returns and GARCH Estimates of Variance") graph # dowj graph # h spgraph(done) * * If the data are already mean zero (by, for instance, doing a DIFF(CENTER) * instruction), you add the NOMEAN option to the GARCH instruction. * diff(center) dowj / cdow garch(p=1,q=1,nomean) / cdow * * This estimates the GARCH model with a t distribution * garch(p=1,q=1,distrib=t,resids=u,hseries=h) / dowj * * Compute the standardized residuals * set stdu = u/sqrt(h) * * Test them for independence * @bdindtests(number=20) stdu