协整检验步骤.docx
- 文档编号:3570044
- 上传时间:2022-11-24
- 格式:DOCX
- 页数:17
- 大小:401.16KB
协整检验步骤.docx
《协整检验步骤.docx》由会员分享,可在线阅读,更多相关《协整检验步骤.docx(17页珍藏版)》请在冰豆网上搜索。
协整检验步骤
实验三金融数据的平稳性检验实验指导
一、实验目的:
理解经济时间序列存在的不平稳性,掌握ADF检验平稳性的方法。
认识不平稳的序列容易导致伪回归问题,掌握为解决伪回归问题引出的协整检验,协整的概念和具体的协整检验过程。
协整描述了变量之间的长期关系,为了进一步研究变量之间的短期均衡是否存在,掌握误差纠正模型方法。
理解变量之间的因果关系的计量意义,掌握格兰杰因果检验方法。
二、基本概念:
如果一个随机过程的均值和方差在时间过程上都是常数,并且在任何两时期的协方差值仅依赖于该两时期间的距离或滞后,而不依赖于计算这个协方差的实际时间,就称它为平稳的。
强调平稳性是因为将一个随机游走变量(即非平稳数据)对另一个随机游走变量进行回归可能导致荒谬的结果,传统的显著性检验将告知我们变量之间的关系是不存在的。
这种情况就称为“伪回归”(SpuriousRegression)。
有时虽然两个变量都是随机游走的,但它们的某个线形组合却可能是平稳的,在这种情况下,我们称这两个变量是协整的。
因果检验用于确定一个变量的变化是否为另一个变量变化的原因。
三、实验内容及要求:
用Eviews来分析上海证券市场A股成份指数(简记SHA)和深圳证券市场A股成份指数(简记SZA)之间的关系。
内容包括:
1.对数据进行平稳性检验
2.协整检验
3.因果检验
4.误差纠正机制ECM
要求:
在认真理解本章内容的基础上,通过实验掌握ADF检验平稳性的方法,具体的协整检验过程,掌握格兰杰因果检验方法,以及误差纠正模型方法。
四、实验指导:
1、对数据进行平稳性检验:
首先导入数据,将上海证券市场A股成份指数记为SHA,深圳证券市场A股成份指数记为SZA(若已有wf1文件则直接打开该文件)。
在workfile中按住ctrl选择要检验的二变量,右击,选择open—asgroup。
则此时可在弹出的窗口中对选中的变量进行检验。
检验方法有:
1画折线图:
“View”―“graph”—“line”,如图3—1所示。
②画直方图:
在workfile中按住选择要检验的变量,右击,选择open,或双击选中的变量,“view”―“descriptivestatistic”―“histogramandstats”;注意到图中的J.B.统计量,其越趋向于0,则图越符合正态分布,也就说明数据越平稳。
如图3—2和3—3所示。
③用ADF检验:
方法一:
“view”—“unitroottest”;方法二:
点击菜单中的“quick”―“seriesstatistic”―“unitroottest”;分析原则即比较值的大小以及经验法则。
点击ok,如图3—4和3—6所示。
图3—1SHA和SZA原始数值线性图
图3—2SHA原始数值直方图
图3—3SZA原始数值直方图
图3—4单位根检验对话框
ADFTestStatistic
-1.824806
1%CriticalValue*
-3.4369
5%CriticalValue
-2.8636
10%CriticalValue
-2.5679
*MacKinnoncriticalvaluesforrejectionofhypothesisofaunitroot.
AugmentedDickey-FullerTestEquation
DependentVariable:
D(SHA)
Method:
LeastSquares
Date:
10/25/05Time:
00:
50
Sample(adjusted):
1/08/199312/31/1999
Includedobservations:
1821afteradjustingendpoints
Variable
Coefficient
Std.Error
t-Statistic
Prob.
SHA(-1)
-0.003575
0.001959
-1.824806
0.0682
D(SHA(-1))
-0.038736
0.023427
-1.653464
0.0984
D(SHA(-2))
-0.010797
0.023308
-0.463217
0.6433
D(SHA(-3))
0.111127
0.023287
4.772149
0.0000
D(SHA(-4))
0.062380
0.023399
2.665901
0.0077
C
3.943077
2.121673
1.858476
0.0633
R-squared
0.018447
Meandependentvar
0.295316
AdjustedR-squared
0.015743
S.D.dependentvar
27.87568
S.E.ofregression
27.65538
Akaikeinfocriterion
9.480807
Sumsquaredresid
1388148.
Schwarzcriterion
9.498952
Loglikelihood
-8626.275
F-statistic
6.822257
Durbin-Watsonstat
2.001095
Prob(F-statistic)
0.000003
图3—5SHA数值的ADF检验结果
ADFTestStatistic
-1.386897
1%CriticalValue*
-3.4369
5%CriticalValue
-2.8636
10%CriticalValue
-2.5679
*MacKinnoncriticalvaluesforrejectionofhypothesisofaunitroot.
AugmentedDickey-FullerTestEquation
DependentVariable:
D(SZA)
Method:
LeastSquares
Date:
02/14/07Time:
09:
28
Sample(adjusted):
1/08/199312/31/1999
Includedobservations:
1821afteradjustingendpoints
Variable
Coefficient
Std.Error
t-Statistic
Prob.
SZA(-1)
-0.001999
0.001441
-1.386897
0.1656
D(SZA(-1))
-0.028638
0.023396
-1.224056
0.2211
D(SZA(-2))
0.029664
0.023325
1.271755
0.2036
D(SZA(-3))
0.084650
0.023327
3.628817
0.0003
D(SZA(-4))
0.081428
0.023390
3.481380
0.0005
C
0.667786
0.466362
1.431905
0.1523
R-squared
0.015405
Meandependentvar
0.087348
AdjustedR-squared
0.012693
S.D.dependentvar
7.839108
S.E.ofregression
7.789199
Akaikeinfocriterion
6.946643
Sumsquaredresid
110119.0
Schwarzcriterion
6.964788
Loglikelihood
-6318.918
F-statistic
5.679524
Durbin-Watsonstat
1.998663
Prob(F-statistic)
0.000033
图3—6SZA数值的ADF检验结果
粗略观查数据并不平稳。
此时应对数据取对数(取对数的好处在于:
即可以将间距很大的数据转换为间距较小的数据,也便于后面的取差分),再对新变量进行平稳性检验。
点击Eviews中的“quick”―“generateseries”键入logsha=log(sha),同样的方法得到logsza。
此时,logsha和logsza为新变量,对其进行平稳性检验方法如上,发现也是不平稳的。
图3—7SHA和SZA对数值线性图
用ADF方法检验logsha和logsza的平稳性。
通过比较检验值和不同显著性下的关键值来得出结论。
如下图(前者是对SHA检验结果,后者是对SZA检验结果)中所示,检验值小于关键值,则得出数据不平稳,反之平稳。
ADFTestStatistic
-1.795526
1%CriticalValue*
-3.4369
5%CriticalValue
-2.8636
10%CriticalValue
-2.5679
*MacKinnoncriticalvaluesforrejectionofhypothesisofaunitroot.
AugmentedDickey-FullerTestEquation
DependentVariable:
D(LOGSHA)
Method:
LeastSquares
Date:
02/14/07Time:
09:
42
Sample(adjusted):
1/08/199312/31/1999
Includedobservations:
1821afteradjustingendpoints
Variable
Coefficient
Std.Error
t-Statistic
Prob.
LOGSHA(-1)
-0.003583
0.001995
-1.795526
0.0727
D(LOGSHA(-1))
-0.034725
0.023459
-1.480261
0.1390
D(LOGSHA(-2))
0.020525
0.023427
0.876128
0.3811
D(LOGSHA(-3))
0.065236
0.023404
2.787354
0.0054
D(LOGSHA(-4))
0.034323
0.023421
1.465476
0.1430
C
0.024892
0.013751
1.810156
0.0704
R-squared
0.008123
Meandependentvar
0.000254
AdjustedR-squared
0.005391
S.D.dependentvar
0.029001
S.E.ofregression
0.028923
Akaikeinfocriterion
-4.245075
Sumsquaredresid
1.518313
Schwarzcriterion
-4.226929
Loglikelihood
3871.140
F-statistic
2.972845
Durbin-Watsonstat
2.001003
Prob(F-statistic)
0.011179
图3—8SHA对数值的ADF检验结果
ADFTestStatistic
-1.236119
1%CriticalValue*
-3.4369
5%CriticalValue
-2.8636
10%CriticalValue
-2.5679
*MacKinnoncriticalvaluesforrejectionofhypothesisofaunitroot.
AugmentedDickey-FullerTestEquation
DependentVariable:
D(LOGSZA)
Method:
LeastSquares
Date:
02/14/07Time:
09:
43
Sample(adjusted):
1/08/199312/31/1999
Includedobservations:
1821afteradjustingendpoints
Variable
Coefficient
Std.Error
t-Statistic
Prob.
LOGSZA(-1)
-0.001645
0.001331
-1.236119
0.2166
D(LOGSZA(-1))
-0.010639
0.023402
-0.454600
0.6495
D(LOGSZA(-2))
0.043671
0.023391
1.866982
0.0621
D(LOGSZA(-3))
0.033284
0.023393
1.422825
0.1550
D(LOGSZA(-4))
0.078284
0.023392
3.346659
0.0008
C
0.009404
0.007463
1.260037
0.2078
R-squared
0.009984
Meandependentvar
0.000252
AdjustedR-squared
0.007257
S.D.dependentvar
0.027998
S.E.ofregression
0.027897
Akaikeinfocriterion
-4.317335
Sumsquaredresid
1.412468
Schwarzcriterion
-4.299190
Loglikelihood
3936.934
F-statistic
3.660782
Durbin-Watsonstat
2.001713
Prob(F-statistic)
0.002675
图3—9SZA对数值的ADF检验结果
2、协整检验:
首先要提取残差:
点击菜单中的“quick”―“estimateequation”键入“logshaclogsza”,得到结果如下:
DependentVariable:
LOGSHA
Method:
LeastSquares
Date:
02/14/07Time:
09:
52
Sample:
1/01/199312/31/1999
Includedobservations:
1826
Variable
Coefficient
Std.Error
t-Statistic
Prob.
C
3.185265
0.026985
118.0392
0.0000
LOGSZA
0.661851
0.004811
137.5733
0.0000
R-squared
0.912098
Meandependentvar
6.883358
AdjustedR-squared
0.912050
S.D.dependentvar
0.340928
S.E.ofregression
0.101107
Akaikeinfocriterion
-1.744184
Sumsquaredresid
18.64600
Schwarzcriterion
-1.738149
Loglikelihood
1594.440
F-statistic
18926.43
Durbin-Watsonstat
0.041307
Prob(F-statistic)
0.000000
图3—10logsza对logsha的最小二乘法回归
接着在窗口中点击“procs”―“makeresidualseries”来对残差resid01进行提取和保存;然后对残差进行ADF检验(方法同上),得到结果如下图。
你会发现数据通过了检验,残差resid01是平稳的。
所以logsha同logsza有协整关系。
ADFTestStatistic
-4.132316
1%CriticalValue*
-3.4369
5%CriticalValue
-2.8636
10%CriticalValue
-2.5679
*MacKinnoncriticalvaluesforrejectionofhypothesisofaunitroot.
AugmentedDickey-FullerTestEquation
DependentVariable:
D(RESID01)
Method:
LeastSquares
Date:
02/14/07Time:
10:
01
Sample(adjusted):
1/08/199312/31/1999
Includedobservations:
1821afteradjustingendpoints
Variable
Coefficient
Std.Error
t-Statistic
Prob.
RESID01(-1)
-0.019808
0.004793
-4.132316
0.0000
D(RESID01(-1))
-0.089306
0.023497
-3.800810
0.0001
D(RESID01(-2))
-0.020115
0.023563
-0.853691
0.3934
D(RESID01(-3))
0.064304
0.023497
2.736735
0.0063
D(RESID01(-4))
0.022089
0.023396
0.944140
0.3452
C
9.14E-05
0.000476
0.192199
0.8476
R-squared
0.023020
Meandependentvar
8.71E-05
AdjustedR-squared
0.020329
S.D.dependentvar
0.020512
S.E.ofregression
0.020303
Akaikeinfocriterion
-4.952841
Sumsquaredresid
0.748139
Schwarzcriterion
-4.934695
Loglikelihood
4515.561
F-statistic
8.553192
Durbin-Watsonstat
1.996742
Prob(F-statistic)
0.000000
图3—11残差resid01的ADF检验结果
接下来以同样的方法协整logszaclogsha,得到残差resid02,经过检验也是平稳的。
ADFTestStatistic
-3.900100
1%CriticalValue*
-3.4369
5%CriticalValue
-2.8636
10%CriticalValue
-2.5679
*MacKinnoncriticalvaluesforrejectionofhypothesisofaunitroot.
AugmentedDickey-FullerTestEquation
DependentVariable:
D(RESID02)
Method:
LeastSquares
Date:
02/14/07Time:
10:
03
Sample(adjusted):
1/08/199312/31/1999
Includedobservations:
1821afteradjustingendpoints
Variable
Coefficient
Std.Error
t-Statistic
Prob.
RESID02(-1)
-0.017724
0.004544
-3.900100
0.0001
D(RESID02(-1))
-0.095416
0.023495
-4.061081
0.0001
D(RESID02(-2))
-0.024582
0.023577
-1.042621
0.2973
D(RESID02(-3))
0.059774
0.023511
2.542356
0.0111
D(RESID02(-4))
0.022353
0.023395
0.955429
0.3395
C
-0.000105
0.000652
-0.160597
0.8724
R-squared
0.022832
Meandependentvar
-9.79E-05
AdjustedR-squared
0.020140
S.D.dependentvar
0.028126
S.E.ofregression
0.027841
Akaikeinfocriterion
-4.321324
Sumsquaredresid
1.406845
Schwarzcriterion
-4.303179
Loglikelihood
3940.566
F-statistic
8.481765
Durbin-Watsonstat
1.996185
Prob(F-statistic)
0.000000
图3—12残差resid02的ADF检验结果
3、因果检验:
在workfile中同时选中“logsha”和“logsza”,右击,选择“open”―“asgroup”,在弹出的窗口中点击“view”―“grangercausality”并选择滞后阶数(此处我们根据以往的实证检验结果选择滞后值为5),点ok,结果如下:
PairwiseGrangerCausalityTests
Date:
02/14/07Time:
10:
10
Sample:
1/01/199312/31/1999
Lags:
1
NullHypothesis:
Obs
F-Statistic
Probability
LOGSZAdoesnotGrangerCauseLOGSHA
1825
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 检验 步骤