实验三-金融数据的平稳性检验实验指导_第1页
实验三-金融数据的平稳性检验实验指导_第2页
实验三-金融数据的平稳性检验实验指导_第3页
实验三-金融数据的平稳性检验实验指导_第4页
实验三-金融数据的平稳性检验实验指导_第5页
已阅读5页,还剩5页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、 一、实验目的:理解经济时间序列存在的不平稳性,掌握 ADF检验平稳性的方法。认识不平稳的序列容易导致伪回归问题,掌握为解决伪回归问题引出的协整检验,协整的概念和具体的协整检验过程。协整描述了变量之间的长期关系,为了进一步研究变量之间的短期均衡是否存在,掌握误差纠正模型方法。理解变量之间的因果关系的计量意义,掌握格兰杰因果检验方法。二、基本概念:如果一个随机过程的均值和方差在时间过程上都是常数,并且在任何两时期的协方差值仅依赖于该两时期间的距离或滞后,而不依赖于计算这个协方差的实际时间,就称它为平稳的。强调平稳性是因为将一个随机游走变量(即非平稳数据)对另一个随机游走变量进行回归可能导致荒谬的

2、结果,传统的显著性检验将告知我们变量之间的关系是不存在的。这种情Spurious Regression有时虽然两个变量都是随机游走的,但它们的某个线形组合却可能是平稳的,在这种情况下,我们称这两个变量是协整的。因果检验用于确定一个变量的变化是否为另一个变量变化的原因。三、实验内容及要求:用 Eviews 来分析上海证券市场 A股成份指数(简记 SHA)和深圳证券市场 A股成份指数(简记 SZA)之间的关系。内容包括:1.对数据进行平稳性检验2.协整检验3.因果检验4.误差纠正机制 ECM要求:在认真理解本章内容的基础上,通过实验掌握 ADF检验平稳性的方法,具体的协整检验过程,掌握格兰杰因果检

3、验方法,以及误差纠正模型方法。四、实验指导:1、对数据进行平稳性检验:首先导入数据,将上海证券市场A股成份指数记为 SHA,深圳证券市场A股成份指数记为 SZA(若已有 wf1 在 workfile中按住 ctrl 选择要检验的二变量,右击,选择 openas group。则此时可在弹出的窗口中对选中的变量进行检验。检验方法有: View”“graph”“ 31 所示。画直方图:在 workfile 中按住选择要检验的变量,右击,选择 open,或双击选中的view”“descriptive statistic”“histogram and stats 统计量,其越趋向于 0,则图越符合正态分

4、布,也就说明数据越平稳。如图 32和 33 所示。用 ADFviewunit root testquick“series statistic”“unit root test ok,如图 34 和 36 所示。图 31 SHA和 SZA 原始数值线性图图 32 SHA原始数值直方图图 33 SZA原始数值直方图图 34 单位根检验对话框ADF Test Statistic-1.8248061%5%Critical Value*Critical Value-3.4369-2.8636-2.567910% Critical Value*MacKinnon critical values for re

5、jection of hypothesis of a unit root.Augmented Dickey-Fuller Test EquationDependent Variable: D(S HA)Method: Least SquaresDate: 10/25/05Time: 00:50Sample(adjusted): 1/08/1993 12/31/1999Included observations: 1821 after adjusting endpointsVariableCoefficientStd. Errort-StatisticProb.SHA(-1)D(SHA(-1)D

6、(SHA(-2)D(SHA(-3)D(SHA(-4)C-0.003575-0.038736-0.0107970.1111270.0623803.9430770.0019590.0234270.0233080.0232870.0233992.121673-1.824806-1.653464-0.4632174.7721492.6659011.8584760.06820.09840.64330.00000.00770.0633R-squared0.0184470.01574327.655381388148.-8626.2752.001095Mean dependent var 0.295316Ad

7、justed R-squaredS.E. of regressionSum squared residLog likelihoodS.D. dependent varAkaike info criterionSchwarz criterionF-statistic27.875689.4808079.4989526.8222570.000003Durbin-Watson statProb(F-statistic)图 35 SHA数值的 ADF检验结果ADF Test Statistic-1.3868971%5%Critical Value* -3.4369Critical Value-2.863

8、6-2.567910% Critical Value*MacKinnon critical values for rejection of hypothesis of a unit root.Augmented Dickey-Fuller Test EquationDependent Variable: D(SZA)Method: Least SquaresDate: 02/14/07Time: 09:28Sample(adjusted): 1/08/1993 12/31/1999Included observations: 1821 after adjusting endpointsVari

9、ableCoefficientStd. Error t-StatisticProb.SZA(-1)D(SZA(-1)D(SZA(-2)D(SZA(-3)D(SZA(-4)C-0.001999-0.0286380.0296640.0846500.0814280.6677860.001441 -1.3868970.023396 -1.2240560.023325 1.2717550.023327 3.6288170.023390 3.4813800.466362 1.4319050.16560.22110.20360.00030.00050.1523R-squared0.0154050.01269

10、37.789199110119.0-6318.9181.998663Mean dependent var 0.087348S.D. dependent var 7.839108Akaike info criterion 6.946643Adjusted R-squaredS.E. of regressionSum squared residLog likelihoodSchwarz criterionF-statistic6.9647885.6795240.000033Durbin-Watson statProb(F-statistic)图 36 SZA数值的 ADF检验结果粗略观查数据并不平

11、稳。此时应对数据取对数(取对数的好处在于:即可以将间距很大的数据转换为间距较小的数据,也便于后面的取差分),再对新变量进行平稳性检验。点击Eviews quick”“generate series”键入logsha=log(sha),同样的方法得到。此时,logsha 和 logsza为新变量,对其进行平稳性检验方法如上,发现也是不平稳的。图 37 SHA和 SZA 对数值线性图用 ADF方法检验 logsha 和 logsza的平稳性。通过比较检验值和不同显著性下的关键值来得出结论。如下图(前者是对SHA检验结果,后者是对SZA 检验结果)中所示,检验值小于关键值,则得出数据不平稳,反之平稳

12、。ADF Test Statistic-1.7955261%5%Critical Value*Critical Value-3.4369-2.8636-2.567910% Critical Value*MacKinnon critical values for rejection of hypothesis of a unit root.Augmented Dickey-Fuller Test EquationDependent Variable: D(LOGSHA)Method: Least SquaresDate: 02/14/07Time: 09:42Sample(adjusted):

13、1/08/1993 12/31/1999Included observations: 1821 after adjusting endpointsVariableCoefficient-0.003583Std. Error t-Statistic0.001995 -1.795526Prob.LOGSHA(-1)0.0727D(LOGSHA(-1)D(LOGSHA(-2)D(LOGSHA(-3)D(LOGSHA(-4)C-0.0347250.0205250.0652360.0343230.0248920.023459 -1.4802610.023427 0.8761280.023404 2.78

14、73540.023421 1.4654760.013751 1.8101560.13900.38110.00540.14300.0704R-squared0.0081230.0053910.0289231.5183133871.1402.001003Mean dependent varS.D. dependent varAkaike info criterionSchwarz criterionF-statistic0.0002540.029001-4.245075-4.2269292.9728450.011179Adjusted R-squaredS.E. of regressionSum

15、squared residLog likelihoodDurbin-Watson statProb(F-statistic)图 38 SHA对数值的 ADF检验结果ADF Test Statistic-1.2361191%5%Critical Value*Critical Value-3.4369-2.8636-2.567910% Critical Value*MacKinnon critical values for rejection of hypothesis of a unit root.Augmented Dickey-Fuller Test EquationDependent Va

16、riable: D(LOGSZA)Method: Least SquaresDate: 02/14/07Time: 09:43Sample(adjusted): 1/08/1993 12/31/1999Included observations: 1821 after adjusting endpointsVariableCoefficientStd. Error t-StatisticProb.LOGSZA(-1)D(LOGSZA(-1)D(LOGSZA(-2)D(LOGSZA(-3)D(LOGSZA(-4)C-0.001645-0.0106390.0436710.0332840.07828

17、40.0094040.001331 -1.2361190.023402 -0.4546000.023391 1.8669820.023393 1.4228250.023392 3.3466590.007463 1.2600370.21660.64950.06210.15500.00080.2078R-squared0.0099840.0072570.0278971.4124683936.9342.001713Mean dependent varS.D. dependent varAkaike info criterionSchwarz criterionF-statistic0.0002520

18、.027998-4.317335-4.2991903.6607820.002675Adjusted R-squaredS.E. of regressionSum squared residLog likelihoodDurbin-Watson statProb(F-statistic)图 39 SZA对数值的 ADF检验结果2、协整检验:quickestimate equationlogsha c logsza得到结果如下:Dependent Variable: LOGSHAMethod: Least SquaresDate: 02/14/07Time: 09:52Sample: 1/01/1

19、993 12/31/1999Included observations: 1826VariableCoefficientStd. Errort-StatisticProb.C3.1852650.6618510.0269850.004811118.0392137.57330.00000.0000LOGSZAR-squared0.9120980.9120500.10110718.646001594.4400.041307Mean dependent varS.D. dependent varAkaike info criterionSchwarz criterionF-statistic6.883

20、3580.340928-1.744184-1.73814918926.430.000000Adjusted R-squaredS.E. of regressionSum squared residLog likelihoodDurbin-Watson statProb(F-statistic)图 310 logsza对 logsha 的最小二乘法回归接着在窗口中点击“procsmake residual series resid01 进行提取和保存;然后对残差进行 ADFresid01 是平稳的。所以 logsha 同 logsza有协整关系。ADF Test Statistic -4.132

21、3161%5%Critical Value*Critical Value-3.4369-2.8636-2.567910% Critical Value*MacKinnon critical values for rejection of hypothesis of a unit root.Augmented Dickey-Fuller Test EquationDependent Variable: D(RESID01)Method: Least SquaresDate: 02/14/07Time: 10:01Sample(adjusted): 1/08/1993 12/31/1999Incl

22、uded observations: 1821 after adjusting endpointsVariableCoefficientStd. Errort-StatisticProb.RESID01(-1)D(RESID01(-1)D(RESID01(-2)D(RESID01(-3)D(RESID01(-4)C-0.019808-0.089306-0.0201150.0643040.0220899.14E-050.0047930.0234970.0235630.0234970.0233960.000476-4.132316-3.800810-0.8536912.7367350.944140

23、0.1921990.00000.00010.39340.00630.34520.8476R-squared0.0230200.0203290.020303Mean dependent varS.D. dependent varAkaike info criterion8.71E-050.020512-4.952841Adjusted R-squaredS.E. of regressionSum squared residLog likelihood0.7481394515.5611.996742Schwarz criterionF-statistic-4.9346958.5531920.000

24、000Durbin-Watson statProb(F-statistic)图 311 残差resid01 的 ADF检验结果接下来以同样的方法协整 logsza c logsha,得到残差resid02,经过检验也是平稳的。ADF Test Statistic-3.9001001%5%Critical Value*Critical Value-3.4369-2.8636-2.567910% Critical Value*MacKinnon critical values for rejection of hypothesis of a unit root.Augmented Dickey-F

25、uller Test EquationDependent Variable: D(RESID02)Method: Least SquaresDate: 02/14/07Time: 10:03Sample(adjusted): 1/08/1993 12/31/1999Included observations: 1821 after adjusting endpointsVariableCoefficient Std. Errort-StatisticProb.RESID02(-1)D(RESID02(-1)D(RESID02(-2)D(RESID02(-3)D(RESID02(-4)C-0.0

26、17724 0.004544-0.095416 0.023495-0.024582 0.0235770.059774 0.0235110.022353 0.023395-0.000105 0.000652-3.900100-4.061081-1.0426212.5423560.955429-0.1605970.00010.00010.29730.01110.33950.8724R-squared0.0228320.0201400.0278411.4068453940.5661.996185Mean dependent var -9.79E-05Adjusted R-squaredS.E. of

27、 regressionSum squared residLog likelihoodS.D. dependent varAkaike info criterionSchwarz criterionF-statistic0.028126-4.321324-4.3031798.4817650.000000Durbin-Watson statProb(F-statistic)图 312 残差resid02的 ADF检验结果3、因果检验:在 workfile中同时选中“logsha”和“open”“as group弹出的窗口中点击“view”“granger causality”并选择滞后阶数(此处我

28、们根据以往的实证检验结果选择滞后值为 5 ok,结果如下:Pairwise Granger Causality TestsDate: 02/14/07Time: 10:10Sample: 1/01/1993 12/31/1999Lags: 1Null Hypothesis:Obs F-Statistic ProbabilityLOGSZA does not Granger Cause LOGSHA 1825 12.83280.000350.22917LOGSHA does not Granger Cause LOGSZAPairwise Granger Causality Tests1.447

29、01Date: 02/14/07Time: 10:11Sample: 1/01/1993 12/31/1999Lags: 2Null Hypothesis:Obs F-Statistic ProbabilityLOGSZA does not Granger Cause LOGSHA 1824 8.314560.000250.40150LOGSHA does not Granger Cause LOGSZA0.91301Pairwise Granger Causality TestsDate: 02/14/07Time: 10:11Sample: 1/01/1993 12/31/1999Lags

30、: 3Null Hypothesis:Obs F-Statistic ProbabilityLOGSZA does not Granger Cause LOGSHA 1823 5.838920.000570.39435LOGSHA does not Granger Cause LOGSZAPairwise Granger Causality Tests0.99468Date: 02/14/07Time: 10:12Sample: 1/01/1993 12/31/1999Lags: 4Null Hypothesis:Obs F-Statistic ProbabilityLOGSZA does n

31、ot Granger Cause LOGSHA 1822 4.392650.001550.52217LOGSHA does not Granger Cause LOGSZAPairwise Granger Causality Tests0.80455Date: 02/14/07Time: 10:09Sample: 1/01/1993 12/31/1999Lags: 5Null Hypothesis:Obs F-Statistic ProbabilityLOGSZA does not Granger Cause LOGSHA 1821 3.601840.003030.62045LOGSHA do

32、es not Granger Cause LOGSZA0.70399图 313 格兰杰因果检验结果先看 F 检验值,如前所述,若 F 值大,则拒绝假设。在本例中即 logsza是 logsha 变化的原因;而 logsha 不影响 。同样的结论也可以从 Probability中得到。4、误差纠正机制 ECM(error correction mechanism)即使两个变量之间有长期均衡关系,但在短期内也会出现失衡(例如收突发事件的影 ECM来对这种短期失衡加以纠正。sha c sza”resid03quick“estimate d(sha) c d(sza) resid03(-1)Resid03(-1)中的(-1)指的是滞后一阶,结果如下:Dependent Vari

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论