Multivariate Time Series: Part 4 Cointegration Gerald P. Dwyer Clemson University March 2016
Outline 1 Multivariate Time Series: Part 4 Cointegration Engle-Granger Test for Cointegration Johansen Test for Cointegration Tests on Coefficients when Variables May Have Unit Roots Summary
Cointegration Two variables with one or more unit roots are cointegrated if a linear combination of the two variables has fewer unit roots than the original variables If two variables are cointegrated, they are related by a vector error correction mechanism x t = A 0 + αβ x t 1 + k i=1 A i x t i + u t A vector autoregression in the first differences is a restricted version of this set of equations with α = 0 This set of equations also is a restricted version of a vector autoregression in the levels k+1 x t = A 0 + Ai x t i + u t i=1
Cointegration in general Components of a cointegrating vector can be cointegrated in complex ways Uncommon but not improbable Suppose variables in a vector x have d unit roots A cointegrating vector β x will have d b unit roots where 1 b d Must be b 1 The variables are not cointegrated if b = 0 Since d b 0, d b Hence d b 1
Examples Suppose have 1 unit root in each variable Then the cointegrating vector will not have a unit root Suppose have 2 unit roots in each variable Then the cointegrating vector can have a unit root Cointegrating vector β x can still have a unit root
Engle-Granger test and estimation Engle-Granger test: Two variables x 1,t and x 2,t with unit roots Estimate a regression of x 1,t on x 2,t or a regression of x 2,t on x 1,t x 1,t = a 1 + b 1 x 2,t + e 1,t x 2,t = a 2 + b 2 x 1,t + e 2,t Test whether the residuals e 1,t or e 2,t have unit roots using an augmented Dickey-Fuller test Test statistics have a different distribution than usual Dickey-Fuller distribution
Engle-Granger test and estimation Engle-Granger: Two variables x 1,t and x 2,t with unit roots Estimate a regression of x 1,t on x 2,t or a regression of x 2,t on x 1,t x 1,t = a 1 + b 1 x 2,t + e 1,t x 2,t = a 2 + b 2 x 1,t + e 2,t Test whether the residuals e 1,t or e 2,t have unit roots using an augmented Dickey-Fuller test Not recommended The estimates b 1 and b 2 will differ: b 1 = 1/b 2 unless R 2 = 1 Test results can depend on which way regression is run in finite samples If there are more than two variables Test can only determine whether there is one or more cointegrating vectors No way to estimate more than one cointegrating vector
Engle-Granger test and estimation I The estimates b 1 and b 2 will differ: b 1 = 1/b 2 unless R 2 = 1 Why? b 1 b 2 = R 2 Therefore, b 1 = R 2 /b 2 and b 1 = 1/b 2 only if R 2 = 1 Why b 1 b 2 = R 2? By OLS, b 1 = x 1,tx 2,t x 2 2,t b 2 = x 2,tx 1,t x 2 1,t
Engle-Granger test and estimation II b 1 b 2 = x 1,tx 2,t x 2 2,t x 2,tx 1,t x 2 1,t = ( x 1,tx 2,t ) 2 x 2 1,t x 2,t x 1,t = R 2 R 2 is just the correlation of x 1,t and x 2,t squared
Engle-Granger test and estimation R 2 = 1?
Engle-Granger test and estimation R 2 = 1? In fact R 2 is asymptotically equal to one in this context Asymptotic variances of both x 1,t and x 2,t are infinite (as for a random walk) As the number of observations goes to infinity, the variances of x 1,t and x 2,t go to infinity. If the variances of the residuals are finite, eventually these variances become arbitrarily small relative to the variances of x 1,t and x 2,t and R 2 1 asymptotically
Johansen test and estimate of cointegrating matrix in VAR Multivariate generalization of augmented Dickey-Fuller test Can estimate all cointegrating vectors when more than two variables Start off from VAR in levels (no constant for simplicity) and rewrite as test equation x t = k+1 i=1 x t = Πx t 1 + A i x t i + u t k i=1 Π i x t i + u t If Π = 0, then the variables are not cointegrated How test Π = 0? Test rank (Π) = 0 If cointegrated rank (Π) = 0 and rank (Π) = number of cointegrating vectors
Rank of a matrix Rank of a matrix is the number of linearly independent vectors in the matrix Linearly independent vectors are vectors that are not linear transformations of another Examples [ ] [ ] 2 1 Linearly dependent columns = 2 4 [ ] 2 1 Linearly independent columns = a + b 2 [ ] 2 5 Column rank of a matrix is number of linearly independent columns Row rank of a matrix is number of linearly independent rows
Johansen test and estimate of cointegrating vector Start off from VAR in levels (no constant) x t = k+1 i=1 A i x t i + u t Rewrite as test equation x t = Πx t 1 + k i=1 Π i x t i + u t Why is the rank of Π related to cointegration?
Test equation The vector equation is x t = Πx t 1 + k i=1 Π i x t i + u t Example for two variables f and p with one-lag f t = π 11 f t 1 + π 12 p t 1 + π 11,1 f t 1 + π 12,1 p t 1 + u 1,t p t = π 21 f t 1 + π 22 p t 1 + π 21,1 f t 1 + π 22,1 p t 1 + u 2,t If the variables are cointegrated, there is a cointegrating relationship
Test equation and error correction mechanism Example for two variables f and p with one-lag f t = π 11 f t 1 + π 12 p t 1 + π 11,1 f t 1 + π 12,1 p t 1 + u 1,t p t = π 21 f t 1 + π 22 p t 1 + π 21,1 f t 1 + π 22,1 p t 1 + u 2,t Write the cointegrating relationship which does not have a unit root as f t β 1 p t Let the vector representation of the cointegrating vector with one and β 1 be β = [1, β 1 ] and β x t = f t β 1 p t
Johansen test equation and error correction mechanism The test equation for two variables f and p with one-lag f t = π 11 f t 1 + π 12 p t 1 + π 11,1 f t 1 + π 12,1 p t 1 + u 1,t p t = π 21 f t 1 + π 22 p t 1 + π 21,1 f t 1 + π 22,1 p t 1 + u 2,t The error correction mechanism (ECM) is f t = α 1 (f t 1 β 1 p t 1 ) + π 11,1 f t 1 + π 12,1 p t 1 + u 1,t p t = α 2 (f t 1 β 1 p t 1 ) + π 21,1 f t 1 + π 22,1 p t 1 + u 2,t There is a clear relationship between the test equation and the ECM
Johansen test equation and error correction mechanism The test equation for two variables f and p with one-lag f t = π 11 f t 1 + π 12 p t 1 + π 11,1 f t 1 + π 12,1 p t 1 + u 1,t p t = π 21 f t 1 + π 22 p t 1 + π 21,1 f t 1 + π 22,1 p t 1 + u 2,t The error correction mechanism (ECM) is f t = α 1 (f t 1 β 1 p t 1 ) + π 11,1 f t 1 + π 12,1 p t 1 + u 1,t p t = α 2 (f t 1 β 1 p t 1 ) + π 21,1 f t 1 + π 22,1 p t 1 + u 2,t There is a clear relationship between the test equation and the ECM π 11 = α 1 π 12 = α 1 β 1 π 21 = α 2 π 22 = α 2 β 1 or α 1 = π 11 β 1 = π 12 /π 11 α 2 = π 12 β 1 = π 22 /π 21
Restriction in the ECM The unrestricted test equation f t = π 11 f t 1 + π 12 p t 1 + π 11,1 f t 1 + π 12,1 p t 1 + u 1,t p t = π 21 f t 1 + π 22 p t 1 + π 21,1 f t 1 + π 22,1 p t 1 + u 2,t always can be written (for nonzero coefficients) as f t = π 11 [f t 1 + (π 12 /π 11 )p t 1 ] + π 11,1 f t 1 + π 12,1 p t 1 + u 1,t p t = π 21 [f t 1 + (π 22 /π 21 )p t 1 ] + π 21,1 f t 1 + π 22,1 p t 1 + u 2,t
ECM and normalization The error correction mechanism is f t = α 1 (f t 1 β 1 p t 1 ) + π 11,1 f t 1 + π 12,1 p t 1 + u 1,t p t = α 2 (f t 1 β 1 p t 1 ) + π 21,1 f t 1 + π 22,1 p t 1 + u 2,t There is a normalization implicit in this cointegration vector equal to 1 and β Could have the cointegration vector equal to 1/β 1 and 1 Could have the cointegration vector equal to 2 and 2β 1 Any multiplication is fine Merely changes values of adjustment coefficients If there were constant terms in the ECM, any linear transformation of the cointegration vector would be fine
Johansen test and estimate of cointegrating vector The vector equation is x t = Πx t 1 + k i=1 Π i x t i + u t If the variables are not cointegrated, the relationship between the variables is x t = Want to test whether Π = 0 If Π = 0, then rank(π) = 0 k i=1 Π i x t i + u t
Restriction in the ECM A vector autoregression in the levels between two variables f t = φ 11,1 f t 1 + φ 12,1 p t 1 + φ 11,2 f t 2 + φ 12,2 p t 2 + u 1,t p t = φ 21,1 f t 1 + φ 22,1 p t 1 + φ 21,2 f t 2 + φ 22,2 p t 2 + u 2,t always can be written as the equation f t = π 11 f t 1 + π 12 p t 1 + π 11,1 f t 1 + π 12,1 p t 1 + u 1,t p t = π 21 f t 1 + π 22 p t 1 + π 21,1 f t 1 + π 22,1 p t 1 + u 2,t and this always can be written (for nonzero coefficients) as f t = π 11 [f t 1 + (π 12 /π 11 )p t 1 ] + π 11,1 f t 1 + π 12,1 p t 1 + u 1,t p t = π 21 [f t 1 + (π 22 /π 21 )p t 1 ] + π 21,1 f t 1 + π 22,1 p t 1 + u 2,t All three representations are correct representations whether or not the variables are cointegrated
Johansen test and eigenvalues I Suppose that all variables have one unit root If variables did not have unit roots, rank(π) = n If variables are not cointegrated, then rank(π) = 0 If variables are cointegrated, then 0 < rank(π) < n The rank of Π equals the number of cointegrating vectors How can one test the rank of a matrix? The number of nonzero eigenvalues in a matrix equals the rank of the matrix What are eigenvalues? The set of eigenvalues for the n x n matrix A are given by the n solutions to the polynomial equation det(a λi n ) = 0 where I n is an nth order identity matrix and det(.) denotes the determinant of the matrix A λi n.
Johansen test and eigenvalues II This equation is an nth order polynomial, which has n not necessarily distinct roots The Johansen tests are based on eigenvalues of transformations of the data and represent linear combinations of the variables that have maximum correlation (canonical correlations) The eigenvalues used in Johansen s test are not eigenvalues of the matrix Π directly The eigenvalues in the test can be used to determine the rank of Π and have tractable distributions The eigenvalues are guaranteed to be non-negative real numbers
Eigenvalues and rank of Π I Johansen test looks at eigenvalues to determine the rank of the n x n matrix Π for the n variables Order the n eigenvalues by size so λ 1 λ 2... λ n Recall that λ i 0 for all i If λ 1 = 0, there is no cointegration and rank(π) = 0 If λ 1 = 0, then all other eigenvalues are zero as well and done If λ 1 = 0, then test whether λ 2 = 0 if λ 2 = 0, then the rank of Π is one and there is one cointegrating vector If λ 2 = 0, then test whether λ 3 = 0 if λ 3 = 0, then the rank of Π is two and there are two cointegrating vectors And so forth until testing λ n If λ n = 0 If λ n = 0, then n x n matrix Π has rank (Π) = n This implies that the VAR is correctly specified in the levels
Eigenvalues and rank of Π II The variables do not have unit roots if rank (Π) = n Number of nonzero eigenvalues is the number of cointegrating relations Matrix Π = αβ where α is the matrix of adjustment coefficients and β is the matrix of coefficients in cointegrated relationships
Johansen tests Johansen develops two different tests Both tests are likelihood-ratio tests The maximum eigenvalue test The trace test Evidence suggests that either can be correct when the other is wrong Does not help much when they disagree Common to do both and report both That said, plotting the cointegrating relationships in β x t 1 can be informative about the strength of any relationships estimated Maybe assess how frequently the cointegrating vector returns to its mean Tests differ in terms of the alternative hypothesis For both, the initial test is a test of the null hypothesis of no cointegration against the alternative of cointegration
Johansen maximum eigenvalue test if reject null of no cointegration I Johansen maximum eigenvalue test inconsistent with null that rank (Π) = 0 That is, reject null of no cointegration Second test is a test whether the rank of the matrix Π is one Null hypothesis is that rank (Π) = 1 Alternative hypothesis is that rank (Π) = 2 If null hypothesis not rejected, rank (Π) = 1 If reject null hypothesis, then have decided rank (Π) 2 For further tests Null hypotheses are that rank (Π) = 2, 3.., n 1 Alternative hypotheses are that rank (Π) = 3, 4,..n
Maximum eigenvalue test statistic and distribution Test based on the maximum eigenvalue is a likelihood ratio test Test statistic is LR(r, r + 1) = T ln(1 λ r+1 ) where LR(r, r + 1) is the likelihood ratio test statistic for testing whether rank (Π) = r versus the alternative hypothesis that rank (Π) = r + 1 Likelihood ratio statistic does not have the usual asymptotic χ 2 distribution Similar to the situation for the Dickey-Fuller test Unit roots in the variables generate nonstandard asymptotic distributions
Johansen trace test Trace test differs from maximum eigenvalue test only in terms of the alternative Examines whether the rank of Π is r relative to the alternative that the rank of Π is less than or equal to n First test is a test whether the rank of the matrix Π is zero Null hypothesis is that rank (Π) = 0 Alternative hypothesis is that 1 rank (Π) n If null hypothesis not rejected, rank (Π) = 0 If reject null hypothesis, then have decided rank (Π) 1 And continue on until null hypothesis not rejected
Trace test statistic and distribution Trace test also is a likelihood ratio test Test statistic is LR(r, n) = T n i=r+1 ln(1 λ i ) where LR(r, n) is the likelihood ratio statistic for testing whether rank (Π) = r versus the alternative hypothesis that rank (Π) n Likelihood ratio statistic does not have the usual asymptotic χ 2 distribution Similar to the situation for the Dickey-Fuller test Unit roots in the variables generate nonstandard asymptotic distributions Test based on of the trace of a matrix based on functions of Brownian motion (also known as Wiener processes)
Constant term in Johansen test I VAR in level x t = A 0 + k i=1 A i x t i + u t Constant terms are nonzero if there are nonzero means for some or all variables VAR in first difference x t = A 0 + k i=1 A i x t i + u t Constant terms are nonzero if there are nonzero growth rates for some or all variables
Constant term in Johansen test II Error Correction Mechanism x t = A 0 + αβ x t 1 + k i=1 A i x t i + u t Constant terms are nonzero if Nonzero growth rates for some or all variables the cointegrated variables in x t 1 have cointegrating relationships that involve constant terms Can have both nonzero growth rates and αβ x t 1 = 0 has an expected value of zero only if constant terms are included
Deterministic trends and cointegration Can also have a deterministic trend in the cointegrating vector This possibility generally is ignored as not being very plausible Nonzero constant terms do allow for a deterministic trend in the levels of the series
Which cointegrating vectors? There is an issue that arises when there is more than one cointegrating vector If two or more cointegrating vectors of coefficients exist in β, then any linear combination of those vectors also is a cointegrating vector How decide which are the best or right ones? Have to use economic theory It is an identification question Example might be demand and supply Does arise and then must look at cointegrating coefficients and linear combinations of them
Restrictions on cointegrating vector Suppose that one estimates a cointegrating vector β [ ] 1 The estimated vector is β 1 β 1 might equal 0.9 for example [ 1 The underlying theory says that the vector is 1] This is a restriction of β 1 to the value 1, which is not a normalization In Johansen setup, this restriction can be tested by standard Chi-square likelihood ratio test
Always estimate ECM? If variables have unit roots but coefficients being tested can be written as coefficients on variables that do not have unit roots, then test statistics have standard distributions (Sims, Stock and Watson 1990) If it is a test on more than one coefficient and all coefficients being tested simultaneously can be written as coefficients on variables that do not have unit roots, then test statistics have standard distributions For example, coefficient on x t k might be written as coefficient on x t (k 1) x t k
Summary I Cointegration applies more generally than to just one unit root Variables can be integrated of an order greater than one if the variables have more than one unit root Variables are cointegrated if they variables have unit roots and there are fewer unit roots in linear relationships among the variables If the supposed cointegrating relationship has the same number of unit roots as the variables themselves, the variables are not cointegrated Most common tests for cointegration Engle-Granger test not recommended Johansen easy to do and nice properties Constant in ECM itself can reflect growth of variables I generally include it because there is no reason the variables cannot have positive or negative growth Can have constant in cointegrating relationship
Summary II Can have deterministic trend in levels of variables in addition to trend growth rate