*
* Enders, Applied Econometric Time Series, 4th edition
* Example from Section 3.4, page 136
* ARCH/GARCH Models on real GDP growth
*
cal(q) 1947:1
open data rgdp.xls
data(format=xls,org=obs)
*
* Create the annualized growth rate of GDP
*
set dly = log(rgdp/rgdp{1})
set dlya = 400.0*dly
*
graph(footer="Figure 3.2 Annualized Growth Rate of Real GDP",$
vlabels="Percent per year") 1
# dlya
*
* Estimate an AR(1)
*
linreg dly
# constant dly{1}
*
* Test for ARCH
*
@archtest(lags=4) %resids
*
* Create a dummy variable for 1984:1 on
*
set break = t>=1984:1
*
* Estimate an AR(1)-ARCH(1) including the break as an "X" regressor
*
garch(regressors,xregressors,q=1,hseries=ht,resids=resids) / dly
# constant dly{1}
# break
*
* Note that there is only a minimal ARCH effect. The significant test
* statistic on the @ARCHTEST was mainly due to clustering based upon
* time alone.
*
graph(footer="Volatility Estimate with Break",grid=t==1984:1) 1
# ht