最新VAR案例分析.docx
Four short words sum up what has lifted most successful individuals above the crowd: a little bit more.-author-dateVAR案例分析VAR案例分析 VAR模型的应用举例1 案例分析的目的 股市对居民储蓄存款存在分流的作用。一般来说,若股市出现牛市,资金会从存款性金融机构流向股市,居民储蓄存款下降或者增速会减缓。从当前我国经济发展趋势来看,居民储蓄存款与股市交易额均呈上升趋势。那么两者是否存在相互影响呢?本案例将分析居民储蓄与股市之间的这种联动效应。2 实验数据本实验选取从1996年到2008年4月的月度数据。整理如下。表1 股市交易额与居民存款余额 单位:亿元日期沪深股市交易总额居民储蓄存款余额日期沪深股市交易总额居民储蓄存款余额1996.1143.493230356.542002.43114.39279728.21996.263.9416432026.252002.51924.59480394.31996.3217.75633296.482002.64303.07681711.791996.4873.422134018.532002.73227.30582527.91996.51163.7434622.12002.81946.36683275.971996.61812.86235457.912002.91460.39184139.051996.72718.6236048.672002.101181.98984725.131996.81685.59136705.82002.111908.61785693.491996.91862.16437085.172002.121781.22886910.651996.104012.437671.422003.13060.93390677.631996.113818.9737917.262003.21666.80292824.211996.124238.9238520.82003.32120.63794567.841997.11829.17939038.182003.45848.29795194.121997.21493.92540869.122003.53209.4596351.671997.34263.841580.972003.62557.1597674.571997.45127.9242112.162003.72351.91798590.91997.54640.9642295.162003.81519.42799255.581997.63080.9542771.162003.91661.203100888.61997.72415.7343312.52003.101615.799101381.91997.81858.37843914.922003.112824.502102235.41997.91625.71344139.452003.124359.423103617.71997.102081.67344720.332004.13649.76109232.71997.111586.9545068.432004.27215.755110646.41997.121570.19546279.82004.35792.181111872.21998.11716.977464832004.45270.107112175.41998.21171.90648537.542004.51823.421112610.21998.31703.31248686.482004.62627.057113792.51998.43624.4448984.62004.72548.009114253.21998.53322.3497002004.81880.649114489.61998.62593.349949.892004.93978.274115458.71998.71761.80550749.822004.102893.0651160011998.81497.88250900.912004.113045.002117617.91998.92149.00851580.742004.122094.784119555.41998.101861.7952247.772005.11754.347122237.31998.112194.2452952.322005.22021.07127823.41998.121040.05853407.52005.33047.432129259.41999.11138.81954293.672005.43036.061129816.81999.2334.019656767.452005.51497.376130577.41999.31757.27757814.652005.63177.354132339.11999.42063.44558369.072005.72243.73133656.41999.52719.5958967.842005.84776.3331345051999.69562.5959173.482005.94132.053136316.31999.75538.0259147.552005.102097.632136827.11999.83665.4759187.262005.112301.058138504.31999.92705.1259364.312005.122350.0861410511999.101250.08759269.92006.13635.936148008.41999.111558.04959185.382006.23726.141151179.61999.121482.01359621.82006.34074.6251528192000.14443.45860241.82006.47308.7261534012000.26621.81962270.32006.510926.12153523.42000.38877.35562492.292006.69159.456154996.92000.45960.92662536.122006.78197.536155131.92000.54298.7162195.392006.85526.955156282.12000.66251.17762842.382006.96705.497158108.92000.75436.68662841.52006.106793.858158033.42000.86650.38762861.112006.1110586.65159716.72000.93167.35963243.272006.1215861.8161587.32000.102706.93163122.342007.126191.65161968.62000.115235.81863492.062007.217845.01171042.62000.123985.7964332.382007.332526.3172607.72001.13161.01666547.312007.449865.94170932.72001.22055.59167343.362007.559864.231680402001.35368.46568365.132007.655444.85169651.62001.45845.64668618.462007.733764.63169567.22001.54752.868393.542007.855638.96169171.52001.65190.08669628.582007.947008.27169038.12001.73344.07469677.772007.1035870.9163957.62001.82677.71170558.482007.1125750.72166561.12001.102147.89271818.812007.1229632.95172616.12001.122193.07173762.432008.147340.36174347.92002.12072.05674953.712008.221457.51183960.22002.21341.43378114.332008.329058.96187414.92002.34917.91578728.32008.427832.14188389.14.3 VAR模型的构建4.3.1 数据平稳性检验考虑到本例中的数据是宏观经济月度数据,先消除季节性特征后再进行分析。另外数据变动趋势过大,本例还对数据进行了对数平滑处理。下图是两个变量经过季节性调整并取对数后的新序列,其中lsa表示居民储蓄额,ltr表示股市交易总额。在主窗口命令行中输入:genr lsa=log(savingsa)genr ltr=log(tradingsa)图1 居民储蓄额与股市交易额对数值的对比图根据图形特征选取同时存在截距项和趋势项进行单位根检验。分别在lsa和ltr窗口中点击view/unit root test/。Lsa单位根检验的结果:Null Hypothesis: LSA has a unit rootExogenous: Constant, Linear TrendLag Length: 0 (Automatic based on SIC, MAXLAG=13)t-Statistic Prob.*Augmented Dickey-Fuller test statistic-3.295765 0.0711Test critical values:1% level-4.0225865% level-3.44111110% level-3.145082*MacKinnon (1996) one-sided p-values.Ltr单位根检验的结果:Null Hypothesis: LTR has a unit rootExogenous: Constant, Linear TrendLag Length: 0 (Automatic based on SIC, MAXLAG=13)t-Statistic Prob.*Augmented Dickey-Fuller test statistic-4.102597 0.0078Test critical values:1% level-4.0225865% level-3.44111110% level-3.145082*MacKinnon (1996) one-sided p-values.从而lsa和ltr在10的显著性水平上均是平稳序列。3.2 VAR模型滞后阶数的选择选取view/lag structure/lag length criteria。由于总共有146个月度样本,选取最大的可能滞后阶数为12。不同判断标准下滞后阶数的选取:VAR Lag Order Selection CriteriaEndogenous variables: LSA LTR Exogenous variables: C Sample: 1 146Included observations: 134 LagLogLLRFPEAICSCHQ0-241.1002NA 0.129071 3.628361 3.671612 3.6459361 325.2560 1107.353 2.92e-05* -4.765015* -4.635261* -4.712287*2 327.8788 5.049985 2.98e-05-4.744460-4.528203-4.6565803 329.2750 2.646384 3.10e-05-4.705596-4.402837-4.5825654 332.5300 6.072830 3.14e-05-4.694478-4.305215-4.5362945 336.7587 7.763083 3.13e-05-4.697891-4.222126-4.5045556 337.4164 1.187934 3.29e-05-4.648007-4.085739-4.4195197 341.9924 8.127393 3.26e-05-4.656603-4.007832-4.3929638 342.9109 1.603927 3.42e-05-4.610610-3.875337-4.3118199 349.2137 10.81825* 3.31e-05-4.644980-3.823205-4.31103710 349.8590 1.088389 3.48e-05-4.594910-3.686632-4.22581611 353.2477 5.614172 3.52e-05-4.585787-3.591006-4.18154012 355.3351 3.395945 3.63e-05-4.557241-3.475958-4.117842从以上分析结果可以看出,FPE、AIC、SC和HQ都得出滞后阶数为1时VAR模型时最优的。因此选取的最优滞后阶数为1,即k=1。3.3 VAR模型的估计下表是滞后阶数为1时VAR模型的估计结果。VAR(1)的估计结果: Sample (adjusted): 2 146 Included observations: 145 after adjustments Standard errors in ( ) & t-statistics in LSALTRLSA(-1) 1.001170 0.228703 (0.00255) (0.09860) 393.219 2.31943LTR(-1)-0.004083 0.808610 (0.00119) (0.04622)-3.42147 17.4964C 0.032687-0.987968 (0.02389) (0.92510) 1.36837-1.06795 R-squared 0.999440 0.808826 Adj. R-squared 0.999432 0.806134 Sum sq. resids 0.020346 30.51501 S.E. equation 0.011970 0.463567 F-statistic 126697.4 300.3900 Log likelihood 437.4447-92.75374 Akaike AIC-5.992341 1.320741 Schwarz SC-5.930754 1.382329 Mean dependent 11.31129 8.194037 S.D. dependent 0.502269 1.052838 Determinant resid covariance (dof adj.) 3.01E-05 Determinant resid covariance 2.89E-05 Log likelihood 346.2668 Akaike information criterion-4.693335 Schwarz criterion-4.570159从表中可以看出VAR模型的参数估计大多显著。3.4 VAR模型的检验VAR模型的检验包括VAR模型的平稳性检验,以及残差的独立性检验。选择view/lag structure/AR roots table 或者AR roots graph可以得到平稳性检验的结果。Roots of Characteristic PolynomialEndogenous variables: LSA LTR Exogenous variables: C Lag specification: 1 1 RootModulus 0.996192 0.996192 0.813588 0.813588 No root lies outside the unit circle. VAR satisfies the stability condition.因此VAR模型满足平稳性的条件。选择view/residual tests/correlograms,得到各方程残差项的自相关图。所以残差不存在自相关性,满足独立性假设。3.5 VAR模型的预测前文介绍,与ARMA模型不同,在VAR估计结果的窗口中没有直接预测的选项,此时需要建立model进行预测。命令:make model Assign all f上述命令表示建立模型进行预测,预测序列名称后缀名为f。下图是动态预测结果。4 VAR模型的应用4.1 格兰杰因果检验将lsa与ltr建立group,点击view/granger causality。根据VAR模型的滞后阶数来决定滞后阶数,本例中选择滞后阶数为1。Pairwise Granger Causality TestsSample: 1 146Lags: 1 Null Hypothesis:ObsF-StatisticProb. LTR does not Granger Cause LSA 145 11.70640.0008 LSA does not Granger Cause LTR 5.379780.0218从中可以看出,ltr与lsa之间互为格兰杰原因。这说明居民储蓄与股票交易变动之间相互影响。4.2 脉冲响应脉冲响应函数受到变量顺序的影响,因此其结果与分析的的主观因素有关。在VAR模型输出窗口中,选择view/impulse response观察第二个图形,股市交易量对居民储蓄是负向影响关系,这验证了股市的分流效应。从时间长短来看,股市交易对居民储蓄的长期影响要大于短期影响,而居民储蓄对股市交易的短期影响要显著些。4.3 方差分解在VAR输出窗口中,选择view/variance decomposition Variance Decomposition of LSA: PeriodS.E.LSALTR 1 0.011970 100.0000 0.000000 2 0.017238 98.82020 1.179795 3 0.021555 96.77410 3.225902 4 0.025422 94.38567 5.614334 5 0.029009 91.95391 8.046090 6 0.032386 89.63370 10.36630 7 0.035591 87.49525 12.50475 8 0.038644 85.56194 14.43806 9 0.041559 83.83266 16.16734 10 0.044348 82.29449 17.70551 11 0.047020 80.92963 19.07037 12 0.049581 79.71909 20.28091 13 0.052040 78.64447 21.35553 14 0.054404 77.68891 22.31109 15 0.056677 76.83729 23.16271 16 0.058867 76.07633 23.92367 17 0.060979 75.39447 24.60553 18 0.063018 74.78169 25.21831 19 0.064987 74.22934 25.77066 20 0.066893 73.72997 26.27003 21 0.068738 73.27715 26.72285 22 0.070526 72.86532 27.13468 23 0.072261 72.48970 27.51030 24 0.073946 72.14614 27.85386 25 0.075583 71.83105 28.16895 26 0.077175 71.54130 28.45870 27 0.078725 71.27418 28.72582 28 0.080235 71.02731 28.97269 29 0.081707 70.79862 29.20138 30 0.083142 70.58628 29.41372 31 0.084544 70.38870 29.61130 32 0.085912 70.20446 29.79554 33 0.087250 70.03232 29.96768 34 0.088557 69.87117 30.12883 35 0.089836 69.72003 30.27997 36 0.091088 69.57804 30.42196 Variance Decomposition of LTR: PeriodS.E.LSALTR 1 0.463567 2.150008 97.84999 2 0.595911 2.069152 97.93085 3 0.668060 1.994640 98.00536 4 0.710903 1.928151 98.07185 5 0.737206 1.870888 98.12911 6 0.753584 1.823541 98.17646 7 0.763826 1.786309 98.21369 8 0.770220 1.758971 98.24103 9 0.774190 1.740977 98.25902 10 0.776635 1.731557 98.26844 11 0.778125 1.729813 98.27019 12 0.779025 1.734800 98.26520 13 0.779568 1.745586 98.25441 14 0.779901 1.761289 98.23871 15 0.780114 1.781109 98.21889 16 0.780266 1.804331 98.19567 17 0.780390 1.830333 98.16967 18 0.780506 1.858581 98.14142 19 0.780625 1.888624 98.11138 20 0.780754 1.920080 98.07992 21 0.780894 1.952636 98.04736 22 0.781045 1.986028 98.01397 23 0.781208 2.020043 97.97996 24 0.781381 2.054505 97.94550 25 0.781562 2.089270 97.91073 26 0.781751 2.124222 97.87578 27 0.781945 2.159267 97.84073 28 0.782144 2.194327 97.80567 29 0.782346 2.229344 97.77066 30 0.782552 2.264266 97.73573 31 0.782759 2.299055 97.70095 32 0.782967 2.333679 97.66632 33 0.783176 2.368113 97.63189 34 0.783386 2.402339 97.59766 35 0.783595 2.436341 97.56366 36 0.783804 2.470106 97.52989 Cholesky Ordering: LSA LTR从方差分解的结果来看,居民储蓄波动的部分原因源自于股市交易量的变动,而股市交易量的变动更多是源于自身的影响。这与脉冲响应的结果一致。-