<p>Cointegration testing usually goes in this way:</p>

<ol>
<li><p>Have very clear which is the "long-run" relationship among variables your theory predicts. The point about cointegration is that there is at least one <strong>common trend</strong> among the variables. In your case, you would expect that the price of the three stocks move in tandem, based on some underlying market phenomena like economic growth, volatility, etc. In this case, the long run relationship between variables  in likely to be in <strong>levels</strong> (price of stocks).</p></li>
<li><p>Test for unit root on each variable in levels. There are plenty of tests here (ADF, KPSS, etc). You <em>want to find</em> that these variables are I(1) or maybe I(2). </p></li>
<li><p>Perform the Johansen cointegration test. If you reject the null hypothesis of cointegration ($r=0$), then <strong>there is not a common trend</strong> among the variables, and they are not cointegrated. Do not run regressions with them in levels, as any result will be spurious. If you do happen to find cointegration ($0&lt;r\leq n$), then estimate the VECM, from where you can get the cointegration vector(s) that define the common trend(s).</p></li>
</ol>

CC BY-SA 3.0
2017-08-25T14:55:03.160Z
Thank you for the answer. Could you also refer to my other post regarding the interpretation of the VECM? https://economics.stackexchange.com/questions/17978/vecm-interpretation-in-matlab
Adrian
CC BY-SA 3.0
2017-08-25T15:24:18.487Z
To add to the good points already made, in general there may be one or more common trends, so there does not have to be a single common trend. As long as there are fewer trends than series, there is cointegration. Also, formally speaking we reject a null hypothesis of a test, not the test itself.
Richard Hardy
CC BY-SA 3.0
2017-08-25T17:03:59.947Z
@RichardHardy Thanks for the comments. You are right in both points.
luchonacho
CC BY-SA 3.0
2017-08-28T12:08:30.930Z
@RichardHardy  In my analysis I found no cointegrating vectors. I have performed the Johansen test both in pairs and the multivariate case. Since there is no error correction representation, should I conclude my finding here? Or is there anything else I could do?
Adrian
CC BY-SA 3.0
2017-08-28T12:12:37.323Z
@Adrian, you can still model and analyze the data for predictive, explanatory or descriptive purposes if you wish to. Instead of a vector error correction model you would use e.g. a vector autoregression on first-differenced data.
Richard Hardy
CC BY-SA 3.0
2017-08-28T12:17:44.480Z
@RichardHardy Thank you. I have seen that approach in different papers, where variance decomposition and impulse responses for VAR in differences have been used. But since there is no long-run relationship very low R^2 is found, making this procedure a bit useless. Do you have any other suggestions about how I should proceed? Or what I should look at? Outside of cointegration and VECM I am a bit lost know.
Adrian
CC BY-SA 3.0
2017-08-28T12:28:28.333Z
@Adrian, you should not expect high $R^2$ when it comes to forecasting stock returns. Even a low $R^2$ can mean you can make money by betting on the "right" stock more often than on a "wrong" one. But what is the actual goal of your analysis? My suggestions would depend on that.
Richard Hardy
CC BY-SA 3.0
2017-09-01T10:32:15.130Z
@Adrian let me know if my answer here is not satisfactory.
luchonacho
CC BY-SA 3.0
2017-08-25T09:41:58.263Z
2017-08-25T17:17:09.387Z
2017-08-25T17:17:09.387Z
luchonacho
<p>Use log price indices to test for their degree of integration, should be <em>I(1)</em> - try ADF unit root test. Once you determine the cointegration rank among log price indices, proceed with VECM model where you data will autamatically be differenced. Log difference is an approximation of growth rate, here stock returns.</p>

<p>What software package are you using?</p>

CC BY-SA 3.0
2017-08-24T19:20:22.017Z
I am using Matlab.
Adrian
CC BY-SA 3.0
2017-08-24T19:22:07.213Z
I already did ADF test and they are all I(1). But I was confused on which data to run the Johansen test, the return data which is I(0) or the actual prices which are I(1).
Adrian
CC BY-SA 3.0
2017-08-24T19:25:34.640Z
You will run Johansen on log levels. Then, using the information about the cointegration rank use log differenced data in VECM for further analysis.
london
CC BY-SA 3.0
2017-08-24T19:29:33.647Z
Thank you very much. Now it makes sense. Do you have experience with Matlab? I am having a hard time interpreting the results from the VECM parameter estimation.
Adrian
CC BY-SA 3.0
2017-08-24T19:30:20.370Z
r = 2
------
A =
    2.1476    0.2474
   -0.0912    1.7987
   -1.4632   -0.1902
B =
   -0.5945   -0.1346
    0.0406   -0.5229
    0.3220   -0.0206
B1 =
    0.3856   -0.1649   -0.5012
    0.2845    0.0736    0.2642
   -0.8338   -0.0111   -0.2509

B2 =
    0.2544   -0.2351   -0.4455
   -0.1098    0.0671   -0.2807
   -0.7106   -0.0183   -0.2341
B3 =
    0.1469   -0.0098   -0.5516
   -0.0946   -0.1013   -0.0383
   -0.3842    0.0355   -0.0482
B4 =
   -0.1270   -0.0533   -0.1685
   -0.1375   -0.1209    0.2782
   -0.3731    0.0702    0.0847

c0 =
    0.0591
    0.7101
Adrian
CC BY-SA 3.0
2017-08-24T19:31:03.223Z
you should start a new thread for this. post the output in formatted form. Me or someone else will then be able to help.
london
CC BY-SA 3.0
2017-08-24T19:56:24.753Z
https://economics.stackexchange.com/questions/17978/vecm-interpretation-in-matlab just posted it
Adrian
CC BY-SA 3.0
2017-08-24T19:15:19.940Z
2017-08-24T19:15:19.940Z
london
<p>I am confused about how to proceed about testing for cointegration. I am interested in testing for cointegration between 3 stock indices. </p>

<p>I was instructed to use returns and not prices. So my question is how do I proceed about identifying a cointegrating relationship since the definition is finding a combination of I(1) variables that is I(0). Since returns are I(0) because they are the first differences, can I still use the Johansen test?   </p>

<econometrics><time-series>
Johansen cointegration and VECM?
Adrian
# Johansen cointegration and VECM?

(Asked by: username_0 on 2017-08-24)

I am confused about how to proceed about testing for cointegration. I am interested in testing for cointegration between 3 stock indices.

I was instructed to use returns and not prices. So my question is how do I proceed about identifying a cointegrating relationship since the definition is finding a combination of I(1) variables that is I(0). Since returns are I(0) because they are the first differences, can I still use the Johansen test?

**Tags:** econometrics, time-series

---

## 2 answers

### Answer by username_1 on 2017-08-25. Score: 1

Cointegration testing usually goes in this way:

1. Have very clear which is the "long-run" relationship among variables your theory predicts. The point about cointegration is that there is at least one **common trend** among the variables. In your case, you would expect that the price of the three stocks move in tandem, based on some underlying market phenomena like economic growth, volatility, etc. In this case, the long run relationship between variables in likely to be in **levels** (price of stocks).
2. Test for unit root on each variable in levels. There are plenty of tests here (ADF, KPSS, etc). You *want to find* that these variables are I(1) or maybe I(2).
3. Perform the Johansen cointegration test. If you reject the null hypothesis of cointegration ($r=0$), then **there is not a common trend** among the variables, and they are not cointegrated. Do not run regressions with them in levels, as any result will be spurious. If you do happen to find cointegration ($0

> **Comments:**
> **username_0**: Thank you for the answer. Could you also refer to my other post regarding the interpretation of the VECM? https://economics.stackexchange.com/questions/17978/vecm-interpretation-in-matlab  
> **username_2**: To add to the good points already made, in general there may be one or more common trends, so there does not have to be a single common trend. As long as there are fewer trends than series, there is cointegration. Also, formally speaking we reject a null hypothesis of a test, not the test itself.  
> **username_1**: @RichardHardy Thanks for the comments. You are right in both points.  
> **username_0**: @RichardHardy  In my analysis I found no cointegrating vectors. I have performed the Johansen test both in pairs and the multivariate case. Since there is no error correction representation, should I conclude my finding here? Or is there anything else I could do?  
> **username_2**: @Adrian, you can still model and analyze the data for predictive, explanatory or descriptive purposes if you wish to. Instead of a vector error correction model you would use e.g. a vector autoregression on first-differenced data.  
> **username_0**: @RichardHardy Thank you. I have seen that approach in different papers, where variance decomposition and impulse responses for VAR in differences have been used. But since there is no long-run relationship very low R^2 is found, making this procedure a bit useless. Do you have any other suggestions about how I should proceed? Or what I should look at? Outside of cointegration and VECM I am a bit lost know.  
> **username_2**: @Adrian, you should not expect high $R^2$ when it comes to forecasting stock returns. Even a low $R^2$ can mean you can make money by betting on the "right" stock more often than on a "wrong" one. But what is the actual goal of your analysis? My suggestions would depend on that.  
> **username_1**: @Adrian let me know if my answer here is not satisfactory.  

---

### Answer by username_3 on 2017-08-24. Score: 0

Use log price indices to test for their degree of integration, should be *I(1)* - try ADF unit root test. Once you determine the cointegration rank among log price indices, proceed with VECM model where you data will autamatically be differenced. Log difference is an approximation of growth rate, here stock returns.

What software package are you using?

> **Comments:**
> **username_0**: I am using Matlab.  
> **username_0**: I already did ADF test and they are all I(1). But I was confused on which data to run the Johansen test, the return data which is I(0) or the actual prices which are I(1).  
> **username_3**: You will run Johansen on log levels. Then, using the information about the cointegration rank use log differenced data in VECM for further analysis.  
> **username_0**: Thank you very much. Now it makes sense. Do you have experience with Matlab? I am having a hard time interpreting the results from the VECM parameter estimation.  
> **username_0**: r = 2 ------ A =     2.1476    0.2474    -0.0912    1.7987    -1.4632   -0.1902 B =    -0.5945   -0.1346     0.0406   -0.5229     0.3220   -0.0206 B1 =     0.3856   -0.1649   -0.5012     0.2845    0.0736    0.2642    -0.8338   -0.0111   -0.2509  B2 =     0.2544   -0.2351   -0.4455    -0.1098    0.0671   -0.2807    -0.7106   -0.0183   -0.2341 B3 =     0.1469   -0.0098   -0.5516    -0.0946   -0.1013   -0.0383    -0.3842    0.0355   -0.0482 B4 =    -0.1270   -0.0533   -0.1685    -0.1375   -0.1209    0.2782    -0.3731    0.0702    0.0847  c0 =     0.0591     0.7101  
> **username_3**: you should start a new thread for this. post the output in formatted form. Me or someone else will then be able to help.  
> **username_0**: https://economics.stackexchange.com/questions/17978/vecm-interpretation-in-matlab just posted it  

---

