您好,欢迎访问三七文档
当前位置:首页 > 临时分类 > 时间序列分析第五章作业
时间序列分析第五章作业班级:09数学与应用数学学号:姓名:习题5.71、根据数据,做出它的时序图及一阶差分后图形,再用ARIMA模型模拟该序列的发展,得出预测。根据输出的结果,我们知道此为白噪声,为非平稳序列,同时可以得出序列tx模型应该用随机游走模型(0,1,0)模型来模拟,模型为:,并可以预测到下一天的收盘价为296.0898。各代码:dataexample5_1;inputx@@;difx=dif(x);t=_n_;cards;304303307299296293301293301295284286286287284282278281278277279278270268272273279279280275271277278279283284282283279280280279278283278270275273273272275273273272273272273271272271273277274274272280282292295295294290291288288290293288289291293293290288287289292288288285282286286287284283286282287286287292292294291288289;procgplot;plotx*tdifx*t;symbolv=starc=blacki=join;procarimadata=example5_1;identifyVar=x(1)nlag=8minicp=(0:5)q=(0:5);estimatep=0q=0noint;forecastlead=1id=tout=results;run;procgplotdata=results;plotx*t=1forecast*t=2l95*t=3u95*t=3/overlay;symbol1c=blacki=nonev=star;symbol2c=redi=joinv=none;symbol3c=greeni=joinv=nonel=32;run;时序图:一阶差分后图形:预测图:右下图可以判断出此序列为白噪声。下图为判断选用的ARIMA模型。下图为最后的预测结果,即下一天的收盘价为296.0898.2、根据数据,画出时序图,再进行一阶差分后发现有周期性,根据输出结果我们可以得出该模型为非白噪声,再用12阶差分数据,用ARIMA模型模拟该序列的发展。(1)根据下面的输出结果,我们可以判断序列tx的拟合模型为ARIMA(0,1,3)模型,模拟口径为:t)B0.15546-B0.22888-B0.15865-(1x32t。判断模型的结果:输出的结果图:(2)、由下面得到的预测结果可以列出下一年月度婴儿的出生率为:12345627.062026.105828.408026.699027.146026.313078910111229.613030.748030.009029.760027.740028.6450预测的结果:代码为:datah5_2;inputx@@;difx=dif(x);z=dif12(difx);t=_n_;cards;26.66323.59826.93124.74025.80624.36424.47723.90123.17523.22721.67221.87021.43921.08923.70921.66921.75220.76123.47923.82423.10523.11021.75922.07321.93720.03523.59021.67222.22222.12323.95023.50422.23823.14221.05921.57321.54820.00022.42420.61521.76122.87424.10423.74823.26222.90721.51922.02522.60420.89424.67723.67325.32023.58324.67124.45424.12224.25222.08422.99123.28723.04925.07624.03724.43024.66726.45125.61825.01425.11022.96423.98123.79822.27024.77522.64623.98824.73726.27625.81625.21025.19923.16224.70724.36422.64425.56524.06225.43124.63527.00926.60626.26826.46225.24625.18024.65723.30426.98226.19927.21026.12226.70626.87826.15226.37924.71225.68824.99024.23926.72123.47524.76726.21928.36128.59927.91427.78425.69326.88126.21724.21827.91426.97528.52727.13928.98228.16928.05629.13626.29126.98726.58924.84827.54326.89628.87827.39028.06528.14129.04828.48426.63427.73527.13224.92428.96326.58927.93128.00929.22928.75928.40527.94525.91226.61926.07625.28627.66025.95126.39825.56528.86530.00029.26129.01226.99227.897;procgplot;plotx*tdifx*tz*t;symbolv=starc=blacki=join;procarima;identifyvar=x(1,12)nlag=8minicp=(0:5)q=(0:5);estimatep=0q=3noint;forecastlead=12id=tout=results;run;procgplotdata=results;plotx*t=1forecast*t=2l95*t=3u95*t=3/overlay;symbol1c=blacki=nonev=star;symbol2c=redi=joinv=none;symbol3c=greeni=joinv=nonel=32;run;时序图为:一阶差分后图形:12阶差分图:预测图:4、根据数据,画出时序图,再进行一阶差分,根据输出结果我们可以得出该模型为非白噪声,再用ARIMA模型模拟该序列的发展。(1)、先得出该序列的时系图和自相关图,由所得图像可以发现该序列有明显的下降趋势,属于非平稳序列。(2)、右下图输出的结果显示序列tx的拟合模型为ARIMA(2,1,0)模型,模拟口径为:210.514730.34743ttxBB(3)、由下面所得结果,可以预测到1939-1945年英国绵羊的数量为:年份1234567数量1888.6181881.8861844.5061827.6041831.8911839.971842.639预测的结果:各代码如下:dataexample5_1;inputx@@;difx=dif(x);t=_n_;cards;220323602254216520242078221422922207211921192137213219551785174718181909195818921919185318681991211121191991185918561924189219161968192818981850184118241823184318801968202919961933180517131726175217951717164815121338138313441384148415971686170716401611163217751850180916531648166516271791;procgplot;plotx*tdifx*t;symbolv=starc=blacki=join;procarimadata=example5_1;identifyVar=x(1)nlag=8minicp=(0:5)q=(0:5);run;procarima;identifyvar=x(1);estimatep=2noint;forecastlead=7id=tout=results;run;procgplotdata=results;plotx*t=1forecast*t=2l95*t=3u95*t=3/overlay;symbol1c=blacki=nonev=star;symbol2c=redi=joinv=none;symbol3c=greeni=joinv=nonel=32;run;时序图:一阶差分后图形:预测图:判断白噪声图:5、根据数据做出该序列的时序图,再根据结果选用GARCH(1,1)模型作出最终模拟图。(1)、根据下面所得的异方差检验结果显示残差系列具有显著的异方差性,且具有显著的长期相关性。异方差检验结果:(2)、根据下图输出的结果显示序列tx用GARCH(1,1)模型时,整个模型的2R高达0.9969,切正态性检验显著(P0.0001),所以认为该模型拟合成功。最终模拟口径为:121,,210298.0)23892.1(3400.0)35041.0,0(,0810.00754.1358.0tttdiitttttttttthEhNaahuuuutx最终输出的拟合效果图如下:模型最终拟合结果图:各代码如下:dataexample5_3;inputx@@;t=_n_;cards;;procgplotdata=example5_3;plotx*t=1;symbol1c=blacki=joinv=star;procautoregdata=example5_3;modelx=t/nlag=5dwprobarchtest;modelx=t/nlag=2nointgarch=(p=1,q=1);outputout=outp=xp;procgplotdata=out;plotx*t=2xp*t=3/overlay;symbol2v=stari=nonec=black;symbol3v=nonei=joinc=redw=2;run;
本文标题:时间序列分析第五章作业
链接地址:https://www.777doc.com/doc-5264242 .html