版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、实用文档Lecture 66. Time series analysis: Multivariate models6.1 Learning outcomes? Vector autoregression (VAR)? Cointegration? Vector error correction model (VECM)? Application: pairs tradinghence,serialseries6.2 Vector autoregression (VAR)向量自回归The classical linear regression model assumes strict exoge
2、neity; there is no serial correlation between error terms and any realisation of any independent variable (lead or lag). As we discovered, correlation (or autocorrelation) is very commonin financial time and panel data. Furthermore, we assumed a pre-defined relation of causality: explanatory variabl
3、e affect the dependent variable.传统的线性回归模型假设严格的外生性,误差项与可实现的独立变量之间没有序列相 关性。金融时间序列及面板数据往往都有很强的自相关性,假定解释变量影响因变量。We now relax both assumptions using a VAR model. VAR models can be regarded as a generalisation of AR(p) processes by adding additional time series. Hence, we enter the field of multivariate t
4、ime series analysis. VAR模型可t and x t).以当作是在一般的自回归过程中加入时间序列。Let' s look at a standard AR(p) process for two variables (y???=?+ E?=1?-??移???=?+手才?-?1?2?The next step is to allow thatlagged values of x t can affect y t and viceversa. This means that we obtain a system of equations for two dependent
5、 variables (y t and xt). Both dependent variables are influenced by past realisations of y t and x t. By doing that, we violate strict exogeneity (seeLecture 2); however, we can use a more relaxed concept, namely weak exogeneity . As we use lagged values of both dependent variables, we can argue tha
6、t these lagged values are known to us, as we observed them in the previous period. We call these variables predetermined . Predetermined (lagged) variables fulfil weak exogeneity in the sense that they have to beuncorrelated with the contemporaneous error term in t. We can still use OLS to estimate
7、the following system of equations, which is called a VAR in reduced form . ?= ? + r? 9? ? + r? 9? ? + ?0 ?/. ? 1?=1 - 11 ? ? ? 2?=1 - 12 ? ? ?. 1?(4)?= ?+ E?=i?i?-?+ 或才奥?-?/ ?2?The beauty of this model is that we don ' t need to predefine whether x or y are endogenous (the dependent variable). I
8、n fact, we can test whether x (y) is endogenous or exogenous using Granger causality tests . The idea of Granger causality is that past observations (lagged dependent variables) can influencecurrent observations -but not vice versa.So the idea israther simple:the past affectsthepresent, and theprese
9、nt doesnotaffect the past. STATA provides Granger causality tests after conducting aVAR analysis, which is based on testing the joint hypothesis that past realisations do not Granger cause the present realisation of the dependent variable.In many applications, VAR models make a lot of sense, as a cl
10、ear direction of causality cannot be predefined. For instance, there is a substantial literature on the benefits of internationalisation (e.g. entering foreign market through cross-border M&A). There is evidence that multinationals outperform local peers due to the benefits of operating in many
11、countries.At the same time, we know that high-performing companies are more likely to enter foreign markets due to their ownership specific advantages. This argument is based on the Resource-based View and the OLS framework developed by Dunning and Rugman (Reading School of International Business).T
12、he VAR model allows you to incorporate both effects: in fact you can test whether performance drives internationalisation or internationalisation drives performance.Before you start using a VAR model, you have to make sure that the time series are stationary. So the first step is to check whether th
13、e time series is stationary using Dickey-Fuller tests and KPSS tests. The second step is to specify the optimal lag length (p) of the model. This is done by comparing different model specifications using information criteria. Apart from using Akaike (AIC) and Bayesian Schwarz (BIC), the Hannan-Quinn
14、 (HQIC)is commonly used. Most applied econometricians favour the Hannan-Quinn (HQIC) criterion. STATA will help you to make a good choice. After specifying your model, you need to check stability conditions. Thecoefficient matrix of the reduced form VAR has to ensure that the iteration sequence conv
15、erges to a long-term value. STATA willhelp you in checkingstability.To be precise, you need to show that the eigenvalues of the coefficient matrix lie within the unit circle. The reason behind it can be only understood when you understand the method of diagonalizing a matrix.VAR models offer another
16、 nice feature: impulse response functions . VAR models capture the dynamics of two (or more) stationary time series; hence, we can assess the dynamic impact of a marginal change of one variable on another. The standard OLS regression provides coefficients, and coefficients refer to the partial impac
17、t of an explanatory variable on the dependent variable. In the case of VAR models, the relationship becomes dynamic, as a change of one variable (say x) in t can affect x and y in t+1.The impact on x and y in t+1 in turn affects x and y in t+2 and so on until the impact dies out. Impulse response fu
18、nctions are very useful in illustrating the short-term dynamics in a model.Let s look at an example to see how VAR modelling works. In Lecture 5, we tried very hard to understand gold prices. We extend our univariate model by exploring the relationships between gold and silver prices. Linking two (s
19、imilar) assets or securities is a very common trading strategy, which is called pairs-trading .Before we do any sophisticated modelling, it is always beneficial to look at some line charts. Figure 1 shows the indexed time series of nominal gold and silver prices from 1900 to 2010.Figure 1: Nominal g
20、old and silver prices, indexed, 1900-2010yearindex_s index_gnwu5 On52 nwun2 On51 ooolWe can see that there is a certain degree of co-movement, which we might be able to exploit for our trading strategy. Before we can use VAR, we need to ensure that both time series are stationary. It is obvious from
21、 Figure 1 that gold and silver prices are not stationary.However, aftertaking afirst-difference we can show that price changes are stationary. So both time series are I(1).The next step is to determine the optimal lag length using information criteria. Table 1 shows different specifications using th
22、evarsoc command.lag LLLR df p FPE AIC HQIC SBIC()104.118.00049 -1.94511 -1.92463 -1.89456113.551 18.866 4 0.001 .000442 -2.0486 -1.98714 -1.89694*120.015 12.927 4 0.012 .000422* -2.09552* -1.9931* -1.842763 120.819 1.6086 4 0.807 .000448 -2.03465 -1.89126 -1.6807941 124.826 8.0136 4 0.091 .000448 -2
23、.03478 -1.85042 -1.5798255 130.126 10.599* 4 0.031 .000438 -2.05954 -1.83421 -1.50347Table 1: Determining the optimal lag length using information criteriaSelection-order criteria Sample: 1906 - 2010Number of obs =105Endogenous: return_g return_s Exogenous: _consBased on the AIC and HQIC, two lags a
24、re optimal; however, the (S)BIC prefers only one lag. I would prefer HQIC and try two lags first. If thesecond lag does not exhibit significant coefficient, we could try to reduce the lag length in line with (S)BIC.We run a VAR with two lags to explain current price changes in gold andsilver. Table
25、2 provides the OLS estimates.Table 2: VAR model with two lagsVector autoregressionSample: 1903 - 2010Log likelihood = 126.0166FPE =.0004Det(Sigma_ml) = .0003323Equation Parms RMSENo. of obs =108AIC = -2.148455HQIC = -2.04776SBIC = -1.90011R-sq chi2 P>chi2return_g5 .126927 0.2425 34.5786 0.0000ret
26、urn s5.196569 0.1306 16.22763 0.0027Coef. Std. Err. zP>|z|95%Conf. Intervalreturn_greturn_gL1.4864107.12298563.960.000.2453633 .7274581L2.-.0139809.122817-0.110.909-.2546979 .2267361return_sL1.-.0068126.0805903-0.080.933-.1647668 .1511415L2.-.207786.0807151-2.570.010-.3659847 -.0495874_cons.02772
27、1.01248572.220.026.0032497 .0521929return_sreturn_gL1.3143786.19046481.650.099-.0589257 .6876828L2.1085011.19020380.570.568-.2642915 .4812937return_sL1.1094293.12480830.880.381-.1351905.354049L2.-.3201805.1250015-2.560.010-.5651789 -.0751821_cons.024511.01933631.270.205-.0133875 .0624095We see that
28、silver prices (lag 2) affect current gold prices, and we can establish autocorrelation in both time series. To test whether gold Granger causes silver or vice versa, we run Granger causality tests reported in Table 3.Table 3: Granger causality testsGranger causality Wald testsEquationExcludedchi2df
29、Prob > chi2return_greturn_s6.7652 0.034return_gALL6.7652 0.034return_sreturn_g3.96152 0.138return_sALL3.96152 0.138Hence, we confirm that past changes in silver prices can predict future gold price changes. This is very interesting, as it can be used to develop a trading strategy. Finally, we nee
30、d to show that the VAR is stable (seeTable 4:Table 4: Stability condition of the VAREigenvalue stability conditionEigenvalueModulus2367286+ .362415i.432882367286 - .362415i.4328806119136 + .3747777i.3797406119136 - .3747777i.37974All the eigenvalues lie inside the unit circle. VAR satisfies stabilit
31、y condition.Finally, we can 川ustratethe impact of silver price changes on futuregold price changes using an impulse response function. Figure 2 shows the impulse response function and confidence intervals derived from bootstrapping. If silver prices increase today by 1%, we should expect a significa
32、nt decline in gold prices in two years by 0.2%.Figure 2: Impulse response function95% CIimpulse response function (irf)Graphs by irfname, impulse variable, and response variable6.3 CointegrationWhen we explore Figure 1 a bit more carefully, we can see that silver and gold prices exhibit a certain de
33、gree of co-movement. We could almost argue that they share a common stochastic trend . The limitation of ARIMA and VAR models is that they can be only used if the time series are stationary. In our case, we had to first-difference your time seriesto ensurestationarity. First-differencing eliminates
34、a lot of information in the time series. Is there no better way to analyse gold and silver prices.Long before the development of multivariate time series econometrics, people realised that gold and silver seem to have a common movement around a long-term equilibrium (gold-silver price ratio). Moreov
35、er, the idea of equilibrium conditions in economics and the availability of macroeconomic time series led to the development of cointegration analysis.The idea is very simple. Even iftwo(ormore)time series are non-stationary and hence have stochastic trends, they might be still driven by the same un
36、derlying factors thatleadtotheirstochasticbehaviour.Therefore, we analyse the time series in levels and see whether we can find a long-term equilibrium - a so-called cointegrating vectorBefore we explore the Johansen procedure , let s look at the gold-silver ratio over time shown in Figure 3.Figure
37、3: The gold-silver ratio, 1900-2010The ratio looks like a mean-reverting process; thus, in the long run it tends to go back to its long-term equilibrium (mean). Based on the ratio, we could argue that gold seems to be overvalued compared to silver at the moment.Of course, taking the ratio suggests a
38、 very simplecointegrating vector -in fact we assume a one-to-one relationship. Before we can use theJohansenprocedure , we have to make sure that the time series have the same order of integration I(p). We already know that gold and silver prices are both I(1) time series. Table 5 shows the results
39、of the Johansen test for cointegration. In line with the VAR model, we use two lags.Table 5: Johansen test标准文案.johans price_g price_s, lags(2)Johansen-Juselius cointegration rank testSample: 1901 to 2010Number of obs = 109H1:H0:Max-lambda TraEigenvalues rank<=(r) statistics s (lambda) r (rank<
40、=(r+1) (rancetatisticsk<=(p=2).11763126013.6408312.0758622118.599456582.240287.5994565Osterwald-Lenum Critical values (95% interval):Table/Case: 1* (assumption: intercept in CE)H0:Max-lambda Trace015.6719.9619.249.24Table/Case: 1(assumption: intercept in VAR)H0:Max-lambda Trace014.0715.4113.763.7
41、6Normalized Beta' price_g price_s vec1 -1.549e-07 .0000176 vec2 4.183e-07 -.00001694Normalized Alpha vec1 vec2 price_g 69248.321 447701.12 price_s -5468.4015 14662.554The null hypothesis that there is no cointegration (r=0) can be rejected if we use the trace statistic. However, the null hypothe
42、sis that we have one cointegrating vector (r=1) cannot be rejected. The problem is that the maxlambda statistic does not support cointegration. I also tried log-prices instead, which is common in analysing gold-silver ratios; however, I don' tobtain clear results.Given the extreme increase in vo
43、latility in prices, it might be likely that there are structural breaks in an alleged cointegration vector. Structural breaks are difficult to handle.Another way to look at this problem is to test whether price ratios or logprice ratios are stationary time series. If they are stationary, then the tw
44、o underlying time series are cointegrated and the ratio indicates the cointegration vector. Again Dickey-Fuller tests cannot reject the null hypothesis; hence, both ratios don ' t seem to be stationary.6.4 Vector error-correction model (VECM)The VECMcombines VAR and cointegration into one framew
45、ork. The VAR is extended by including deviations from the long-term equilibrium defined by the cointegration vector. The coefficient of the deviation from the longterm equilibrium indicates the speed of adjustment back into equilibrium.The VECM capture the long-term relationship and the short-term d
46、ynamics of two or more time series. Let ' s see how it works in the case of gold and silver prices. Table 6 reports the VECM specification, which resembles the VAR with two lags. It also contains the CE component; the co-called error- correction component that captures the deviation from the lon
47、g-term equilibrium in the previous period. So the CE is a lagged and hence predetermined variable, as required by OLS and the VAR framework.Table 6: VECM based on gold and silver pricesVector error-correction model Sample: 1903 - 2010No. of obs =108AIC = 54.15731 Log likelihood = -2911.494HQIC = 54.
48、28821Det(Sigma_ml) = 8.93e+20SBIC = 54.48015Equation Parms RMSE R-sq chi2 P>chi2D_price_g6 1.5e+06 0.2949 42.66373 0.0000D_price_s6 49748.2 0.2598 35.79424 0.0000Coef.Std.Err. zP>|z|95%Conf. IntervalD_price_g ce1 11.-.0048672.0135324-0.360.719-.0313903.0216559price_g LD.2714343.23846821.140.25
49、5-.1959548.7388233L2D.8565381.23517553.640.000.39560261.317474price_s LD.56377846.5867810.090.932-12.3460713.47363L2D.-26.234715.670113-4.630.000-37.34793-15.1215_cons2813.244472046.20.010.995-922380.4928006.9D_price_s ce1 11.0005916.00043921.350.178-.0002693.0014524price_g LD.-.007626i3.0077399-0.9
50、90.324-.0227962.0075436L2D.0357519.0076334.680.000.0207914.0507123price_s LD.2898047.21378551.360.175-.1292072.7088166L2D.-1.064965.1840335-5.790.000-1.425664-.7042665_cons231462915321.091.510.131-6882.48753175.08The speed of adjustment is not significant, which undermines the idea of a long-run equ
51、ilibrium in gold and silver prices as suggested by the literature.We can explore structural changes, when we plot the predicted long-term equilibrium over time.70+eonu970+eQM-7n¥ eQM«7n¥ eon«_8n¥ eon1-_8n¥eQ/-1-Figure 4: Predicted long-term equilibrium based on VECMIt i
52、s very obvious that the long-term equilibrium undergoes structural breaks. We could split the time period into a stable and unstable period.Yet the main issue with structural breaks is that they appear to be obvious ex post - but nearly impossible to predict ex ante.For instance, if we focus on 1900
53、-1980, we obtain a very strong result thatunderlines cointegration and adjustments into the long-term equilibrium. Hence, we conclude that the gold-silver ratio is no longer a reliable phenomenon that we could rely on. Nevertheless, we can use the short-term dynamics captured in the VAR to do short-
54、term trading.6.5 Pairs trading - APPLICATIONThe idea of pairs trading is that we trade two similar shares that are driven by similar macroeconomic factors. In our example, we focus on the USsteelindustry and tryto identify a trading strategy based on UnitedStates Steel Corporation and Titan Internat
55、ional.Firstwe need to modify the time dimension, as NASDAQeports the latestshare prices first. We selected 5-years of daily closing prices for our analysis.*Time dimension needs to be modifiedgen t=_nreplace t=1264-ttsset t*Line charttwoway (line us_steel t) (line titan t)Let ' s have a quick lo
56、ok at a line chart combining both share prices. Obviously both share prices are non-stationary, which we should confirm first using Dickey-Fuller tests.US steelTitanWe run Dickey-Fuller tests based on share prices and first-differenced time series. The tests confirm that both time series are I(1). Hence, we can tryto find a cointegration relation following the Johansen procedure. Before we do that, I suggest that we explore a VAR model and determine the optimal lag structure.*Returns gen r_us=ln(us_steel)-ln(l.us_steel)gen r_titan=ln(titan)-ln(l.titan)*Dick
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 木制家具工管理应用知识考核试卷含答案
- 供排水泵站运行工安全教育强化考核试卷含答案
- 液氯气化处理工安全实践考核试卷含答案
- 重冶备料工岗位水平考核试卷含答案
- 2026年容器化数据库的加密存储配置
- 昆明春节消防安全指南
- 人工智能应用场景大全
- 企业管理年终总结
- 风管防潮层铺设验收记录
- 停车场管理系统安装施工方案
- 晚期肿瘤病人护理
- 汽车维修厂安全生产教育培训内容
- 咳嗽与咳痰讲课件
- 退休医生劳务合同协议
- 除氟药剂采购合同协议
- 设备移机合同协议
- 2022调度自动化主站远方操作一体化防误技术规范
- GB/T 16439-2024交流伺服系统通用技术规范
- 《中国噬血细胞综合征诊断与治疗指南(2022年版)》解读
- 消防设施自查报告
- 中医养生学教学大纲
评论
0/150
提交评论