当前位置:文档之家› 广义异方差模型例题

广义异方差模型例题

广义异方差模型例题:例:1969年1月至1994年9月澳大利亚储备银行2年期有价证券月度利率数据如表所示(行数据)4.99 55.03 5.03 5.25 5.26 5.3 5.45 5.49 5.52 5.75.68 5.65 5.86.5 6.45 6.48 6.45 6.35 6.4 6.43 6.436.44 6.45 6.48 6.4 6.35 6.4 6.3 6.32 6.35 6.13 5.75.58 5.18 5.18 5.17 5.15 5.21 5.23 5.05 4.65 4.65 4.64.67 4.69 4.68 4.62 4.63 4.95.44 5.566.04 6.06 6.068.07 8.07 8.1 8.05 8.06 8.07 8.06 8.11 8.6 10.8 1111 11 9.48 9.18 8.62 8.3 8.47 8.44 8.44 8.46 8.498.54 8.54 8.5 8.44 8.49 8.4 8.46 8.5 8.5 8.47 8.478.47 8.48 8.48 8.54 8.56 8.39 8.89 9.91 9.89 9.91 9.919.9 9.88 9.86 9.86 9.74 9.42 9.27 9.26 8.99 8.83 8.838.83 8.82 8.83 8.83 8.79 8.79 8.69 8.66 8.67 8.72 8.779 9.61 9.7 9.94 9.94 9.94 9.95 9.94 9.96 9.97 10.8310.75 11.2 11.4 11.54 11.5 11.34 11.5 11.5 11.58 12.42 12.8513.1 13.12 13.1 13.15 13.1 13.2 14.2 14.75 14.6 14.6 14.4514.5 14.8 15.85 16.2 16.5 16.4 16.4 16.35 16.1 13.7 13.514 12.3 12 14.35 14.6 12.5 12.75 13.7 13.45 13.55 12.612 11 11.6 12.05 12.35 12.7 12.45 12.55 12.2 12.1 11.1511.85 12.1 12.5 12.9 12.5 13.2 13.65 13.65 13.5 13.45 13.3514.45 14.3 15.05 15.55 15.65 14.65 14.15 13.3 12.65 12.7 12.814.5 15.1 15.15 14.3 14.25 14.05 14.7 15.05 14.05 13.8 13.2513 12.85 12.6 11.8 13 12.35 11.45 11.35 11.55 10.85 10.912.3 11.7 12.05 12.3 12.9 13.05 13.3 13.85 14.65 15.05 15.1514.85 15.7 15.4 15.1 14.8 15.8 15.8 15 14.4 13.8 14.314.15 14.45 14.1 14.05 13.75 13.3 13 12.55 12.25 11.85 11.511.1 11.15 10.7 10.25 10.55 10.25 10.3 9.6 8.4 8.2 7.258.35 8.25 8.3 7.4 7.15 6.35 5.65 7.4 7.2 7.05 7.16.85 6.5 6.25 5.95 5.65 5.85 5.45 5.3 5.2 5.55 5.155.4 5.35 5.1 5.86.35 6.5 6.95 8.057.85 7.758.6(1)考察该序列的方差齐性。

(2)选择适当的模型拟合该序列的发展解答:(1)1、时序图:时序图显示序列存在曲线趋势,我们对原序列进行差分得到残差序列的图。

差分后的残差图整均值平稳,但伴随大小不等的随机波动。

我们对残差序列进行自回归,再考察自回归残差序列的方差齐性。

2、用AUTOREG过程建立序列{Xt}关于一阶滞后项lagx的回归模型,并检验残差序列的自相关性和异方差性。

检验显示Dh统计量为1.8550,Dh统计量的P值为0.0318小于0.05,结果显示残差序列具有显著的自相关性。

显示回归模型常数截距项不显著(0.0736>0.05)。

显示残差序列具有显著的异方差性。

3、arch的定阶proc autoreg data=hh;model x=lagx /lagdep=lagx archtest;model x=lagx/nlag=4backstep garch=(p=1,q=1); output out=res cev=v;run;参数检验显示除AR5参数不显著外,其它参数显著。

综合考虑残差序列自相关性和异方差性检验结果,尝试拟合无回归常数项的广义异方差模型,nlag=4,garch=(p=1,q=1)。

4、异方差模型:拟合效果很理想。

⎪⎪⎩⎪⎪⎨⎧-+==+=+=---15123173.62700.01272.09997.0t t t t t t t t t t t h E h e h u u x x εεε(其中e^t~n(0,0.26999))附程序:data hh;input x@@;difx=dif(x);lagx=lag(x);year=intnx("month","01jan1969"d ,_n_-1);format year monyy7.;cards ;4.99 55.03 5.03 5.25 5.26 5.3 5.45 5.49 5.52 5.75.68 5.65 5.86.5 6.45 6.48 6.45 6.35 6.4 6.43 6.436.44 6.45 6.48 6.4 6.35 6.4 6.3 6.32 6.35 6.13 5.75.58 5.18 5.18 5.17 5.15 5.21 5.23 5.05 4.65 4.65 4.64.67 4.69 4.68 4.62 4.63 4.95.44 5.566.04 6.06 6.068.07 8.07 8.1 8.05 8.06 8.07 8.06 8.11 8.6 10.8 1111 11 9.48 9.18 8.62 8.3 8.47 8.44 8.44 8.46 8.498.54 8.54 8.5 8.44 8.49 8.4 8.46 8.5 8.5 8.47 8.478.47 8.48 8.48 8.54 8.56 8.39 8.89 9.91 9.89 9.91 9.919.9 9.88 9.86 9.86 9.74 9.42 9.27 9.26 8.99 8.83 8.838.83 8.82 8.83 8.83 8.79 8.79 8.69 8.66 8.67 8.72 8.779 9.61 9.7 9.94 9.94 9.94 9.95 9.94 9.96 9.97 10.8310.75 11.2 11.4 11.54 11.5 11.34 11.5 11.5 11.58 12.42 12.8513.1 13.12 13.1 13.15 13.1 13.2 14.2 14.75 14.6 14.6 14.4514.5 14.8 15.85 16.2 16.5 16.4 16.4 16.35 16.1 13.7 13.514 12.3 12 14.35 14.6 12.5 12.75 13.7 13.45 13.55 12.612 11 11.6 12.05 12.35 12.7 12.45 12.55 12.2 12.1 11.15 11.85 12.1 12.5 12.9 12.5 13.2 13.65 13.65 13.5 13.45 13.35 14.45 14.3 15.05 15.55 15.65 14.65 14.15 13.3 12.65 12.7 12.8 14.5 15.1 15.15 14.3 14.25 14.05 14.7 15.05 14.05 13.8 13.25 13 12.85 12.6 11.8 13 12.35 11.45 11.35 11.55 10.85 10.9 12.3 11.7 12.05 12.3 12.9 13.05 13.3 13.85 14.65 15.05 15.15 14.85 15.7 15.4 15.1 14.8 15.8 15.8 15 14.4 13.8 14.314.15 14.45 14.1 14.05 13.75 13.3 13 12.55 12.25 11.85 11.5 11.1 11.15 10.7 10.25 10.55 10.25 10.3 9.6 8.4 8.2 7.258.35 8.25 8.3 7.4 7.15 6.35 5.65 7.4 7.2 7.05 7.16.85 6.5 6.25 5.95 5.65 5.85 5.45 5.3 5.2 5.55 5.155.4 5.35 5.1 5.86.35 6.5 6.95 8.057.85 7.758.6;run;proc gplot data=hh;plot (x difx)*year;symbol i=line;run;proc autoreg data=hh;model x=lagx /lagdep=lagx archtest;model x=lagx /nlag=4backstep garch=(p=1,q=1) noint; output out=out p=p pm=pm r=r rm=rm ucl=ucl lcl=lcl cev=cev; run;data out;set out;uclr=1.96*sqrt(0.26747);lclr=-1.96*sqrt(0.26747);cuclr=1.96*sqrt(cev);clclr=-1.96*sqrt(cev);cuclp=p+1.96*sqrt(cev);clclp=p-1.96*sqrt(cev);run;proc gplot data=out;plot x*year=1 p*year=2 cuclp*year=3 clclp*year=3 lcl*year=4 ucl*year=4/overlay; symbol1c=black i=none v=star;symbol2c=red i=line v=none;symbol3c=blue i=lnie;symbol4c=green i=join v=star;run;proc gplot data=out;plot r*year=1 uclr*year=2 lclr*year=2 clclr*year=3 cuclr*year=3 /overlay; symbol1c=black i=none v=star;symbol2c=red i=line v=none;symbol3c=blue i=lnie;run;proc arima data=out;identify var=r nlag=24;run;。

相关主题