* * Example 4.4 from pp 164 * STAR-ARCH model * open data ch04_3m_m(46-97).txt calendar(m) 1946:2 data(format=free,org=columns) 1946:2 1997:12 date returns * * Estimate ARCH(2) * garch(q=2) / returns * * STAR-ARCH model * nonlin(parm=meanparms) b0 nonlin(parm=garchparms) c a1 a2 nonlin(parm=starparms) sc sa1 linreg returns / u # constant set uu = %seesq set h = %seesq compute b0=%beta(1),c=%seesq,a1=a2=.01,sc=0.0,sa1=0.0 * frml resid = returns-b0 frml hf = (c+a1*uu{1}+a2*uu{2})+(sc+sa1*uu{1})/(1+exp(-1000*u{1})) frml logl = (u=resid),(uu=u**2),(h=hf),%logdensity(h,u) maximize(parmset=meanparms+garchparms+starparms) logl