时间序列分析及VAR模型.docx_第1页
时间序列分析及VAR模型.docx_第2页
时间序列分析及VAR模型.docx_第3页
时间序列分析及VAR模型.docx_第4页
时间序列分析及VAR模型.docx_第5页
已阅读5页,还剩10页未读 继续免费阅读

下载本文档

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

文档简介

Page | 15Lecture 66. Time series analysis: Multivariate models 6.1 Learning outcomes Vector autoregression (VAR) Cointegration Vector error correction model (VECM) Application: pairs trading6.2 Vector autoregression (VAR) 向量自回归The classical linear regression model assumes strict exogeneity; hence, there is no serial correlation between error terms and any realisation of any independent variable (lead or lag). As we discovered, serial correlation (or autocorrelation) is very common in financial time series and panel data. Furthermore, we assumed a pre-defined relation of causality: explanatory variable 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 time series analysis. VAR模型可以当作是在一般的自回归过程中加入时间序列。Lets look at a standard AR(p) process for two variables (yt and xt).(1) yt=1+i=1p1iyt-i+1t(2) xt=2+i=1p2ixt-i+2tThe next step is to allow that lagged values of xt can affect yt and vice versa. This means that we obtain a system of equations for two dependent variables (yt and xt). Both dependent variables are influenced by past realisations of yt and xt. By doing that, we violate strict exogeneity (see Lecture 2); however, we can use a more relaxed concept, namely weak exogeneity. As we use lagged values of both dependent variables, we can argue that 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 be uncorrelated with the contemporaneous error term in t. We can still use OLS to estimate the following system of equations, which is called a VAR in reduced form.(3) yt=1+i=1p11iyt-i+i=1p12ixt-i+1t(4) xt=2+i=1p21iyt-i+i=1p22ixt-i+2tThe beauty of this model is that we dont need to predefine whether x or y are endogenous (the dependent variable). In 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 influence current observations but not vice versa. So the idea is rather simple: the past affects the present, and the present does not affect the past. STATA provides Granger causality tests after conducting a VAR 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 clear 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 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). The 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 the 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 (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. The coefficient matrix of the reduced form VAR has to ensure that the iteration sequence converges to a long-term value. STATA will help you in checking stability.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 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 impact 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 functions are very useful in illustrating the short-term dynamics in a model.Lets 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 (similar) 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 gold and silver prices, indexed, 1900-2010We 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 Figure 1 that gold and silver prices are not stationary. However, after taking a first-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 the varsoc command.Table 1: Determining the optimal lag length using information criteriaBased on the AIC and HQIC, two lags are optimal; however, the (S)BIC prefers only one lag. I would prefer HQIC and try two lags first. If the second 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 and silver. Table 2 provides the OLS estimates.Table 2: VAR model with two lagsWe see that 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 testsHence, 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 need to show that the VAR is stable (see Table 4).Table 4: Stability condition of the VARFinally, we can illustrate the impact of silver price changes on future gold 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 significant decline in gold prices in two years by 0.2%.Figure 2: Impulse response function6.3 CointegrationWhen we explore Figure 1 a bit more carefully, we can see that silver and gold prices exhibit a certain degree 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 series to ensure stationarity. First-differencing eliminates 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). Moreover, 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 if two (or more) time series are non-stationary and hence have stochastic trends, they might be still driven by the same underlying factors that lead to their stochastic behaviour. Therefore, we analyse the time series in levels and see whether we can find a long-term equilibrium a so-called cointegrating vector. Before we explore the Johansen procedure, lets look at the gold-silver ratio over time shown in Figure 3.Figure 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 very simple cointegrating vector in fact we assume a one-to-one relationship. Before we can use the Johansen procedure, 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 of the Johansen test for cointegration. In line with the VAR model, we use two lags.Table 5: Johansen testThe null hypothesis that there is no cointegration (r=0) can be rejected if we use the trace statistic. However, the null hypothesis that we have one cointegrating vector (r=1) cannot be rejected. The problem is that the max-lambda statistic does not support cointegration. I also tried log-prices instead, which is common in analysing gold-silver ratios; however, I dont obtain clear results.Given the extreme increase in volatility 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 log-price ratios are stationary time series. If they are stationary, then the two underlying time series are cointegrated and the ratio indicates the cointegration vector. Again Dickey-Fuller tests cannot reject the null hypothesis; hence, both ratios dont seem to be stationary.6.4 Vector error-correction model (VECM)The VECM combines VAR and cointegration into one framework. The VAR is extended by including deviations from the long-term equilibrium defined by the cointegration vector. The coefficient of the deviation from the long-term equilibrium indicates the speed of adjustment back into equilibrium.The VECM capture the long-term relationship and the short-term dynamics of two or more time series. Lets 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 long-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 pricesThe speed of adjustment is not significant, which undermines the idea of a long-run equilibrium 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.Figure 4: Predicted long-term equilibrium based on VECMIt is 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-1980, we obtain a very strong result that underlines 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-term trading.6.5 Pairs trading - APPLICATION The 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 US steel industry and try to identify a trading strategy based on United States Steel Corporation and Titan International.First we need to modify the time dimension, as NASDAQ reports the latest share 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 chart twoway (line us_steel t) (line titan t)Lets have a quick look at a line chart combining both share prices. Obviously both share prices are non-stationary, which we should confirm first using Dickey-Fuller tests. We 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 try to 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.*Returnsgen r_us=ln(us_steel)-ln(l.us_steel)gen r_titan=ln(titan)-ln(l.titan)*Dickey-Fullerdfuller us_steeldfuller titandfuller r_usdfuller r_titanWe cannot establish any VAR lag structure, which shows that there is hardly any

温馨提示

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

评论

0/150

提交评论