* * Example 10.3.1 from pp 351-352 * all 1000 compute a0=1.0,a1=0.5 * * This draws the first value from the unconditional distribution (which is mean * 0, variance a0/(1-a1)); the remaining ones are generated recursively using the * previous value. Because this uses random numbers, you'll get somewhat different * results each time you run this (and will also get somewhat different results * from the ones in the book). * set(first=%ran(sqrt(a0/(1-a1)))) arch = %ran(sqrt(a0+a1*arch{1}**2)) * graph(footer="Figure 10-7 A Realization of an ARCH process") # arch * * Do autocorrelations of the series and its square * @acf(number=40) arch set asq = arch**2 @acf(number=40) asq * * Do independence tests * @bdindtests arch