1 / 10
文档名称:

模拟滑动平均MA模型及自回归AR模型上机目的熟悉滑动平均.docx

格式:docx   大小:132KB   页数:10页
下载后只包含 1 个 DOCX 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

分享

预览

模拟滑动平均MA模型及自回归AR模型上机目的熟悉滑动平均.docx

上传人:guoxiachuanyue015 2021/4/14 文件大小:132 KB

下载得到文件列表

模拟滑动平均MA模型及自回归AR模型上机目的熟悉滑动平均.docx

相关文档

文档介绍

文档介绍:模拟滑动平均(MA )模型及自回归(AR)模型
上机目的:熟悉滑动平均(MA )模型及自回归(AR)模型的自相 关系数的特点;随机模拟各种上述模型及了解其样本自相关系数的特 点,为理论学****提供直观的印象。
上机软件:matlab、SAS
上机要求:随机模拟各种滑动平均(MA )模型及自回归(AR)模型。
给出理论自相关系数值及图;
随机产生100、500个模型数据及图;
计算随机数据的样本自相关系数估计,与理论值进行分
析比较。
上机内容及步骤:
Matlab
内容1 第28页信号的滤波,与时间序列的分解中的方法四:逐 步平均法相类似;
t=1:100;
epslon(t)=randn(1,100);
U=rand(1,1);
x(t)=*cos(pi/7*t+2*pi*U)+epslon(t);
plot(x);
hold on
t=4:97; y(t)=1/7*(x(t-3)+x(t-2)+x(t-1)+x(t)+x(t+1)+x(t+2)+x(t+3));
plot(t,y(t)+3)
内容2 滑动平均(MA)模型及自回归(AR)模型的自相关系数
的理论计算
(1) MA 模型 例 Xt = t -* ;t4 * y t ~WN(0,22)
利用公式计算自协方差系数及自相关系数
gamma=[4*(1++) 4*(--*) 4*]; rho=[1 gamma(2)/gamma(1) gamma(3)/gamma(1)]; rho1=[rho zeros(1,9)];
自相关系数图
t=0:佃;
stem(t,rho1(t+1))
1




- 、
-
0
6 8 10
12
(2) AR 模型
例 Xt =*Xt4 *XtQ ;t,;t 〜WN (0,1)
利用公式计算自协方差系数及自相关系数
(以后介绍)
利用garchma语句计算自协方差系数及自相关系数
If you write this model equalien as
f $讥-1+ ■+0flJf-j? + E^&lEr-l+ -"届-jtf
you can specify the garchna input coefficienl vectors, AR and exactly as you read them from the model. In general, lhe/h elements of AR and MA are the caefficienls of the」h lag of the relurn series and innovations processes -j and £r-j . respectively, garchaa assumes that the curremt-time-index coefficients of ^'r and Er are 1 and are not p^rt of AR and HA.
In theory, you can use the 屮 weights r