The simplest approach for understanding implication of the results would be to simulate a set of series and use it as an input for Johansens' test. The output of the result can then be checked to help get an inuiton of how it is able to backtrack the original simulation.

Following are some example scenarios and their output in each case:

Scenario 1 : 5 simple stationary series

Model : Generate 5 simple stationary series. This is actually a wrong input, because the pre requirement for Johansen's test is that the input series should be I(1). Nevertheless, we do it for fun to see what happens.

Input code for simulation

n=1000;
x=randn(n,5);
save "c:\\octave_files\\xmat.txt" x;

The resulting saved matrix is then pasted into input tab of the spreadhseet

So, what do we conclude by looking at the output? We start going down one row at a time, and compare the test statistic with the critical values. 118.26 is more than the critical values 31.2379, 33.8777,39.3693 which means that we are not able to say whether there is 0 cointegration vector. It could still be that there is more than 1 cointegrating vector. So, lets move on to the 2nd row. 114.8 is above the critical values 25.1236,27.5858,32.7172 so we cannot conclude that there is 1 cointegrating vector. But it could be possible that there are 2 or more cointegrating vectors. We move on to the 3rd row now, and get rejected again.

Then 4 and 5th row are also rejected. This means that there is no conclusion.

Scenario 2 : 5 random walks with no cointegration relation

Model : Generate 5 random walks. We should expect that Johansens' test tells us that there is no cointegrating vector

So, what do we conclude by looking at the output? Remember, we start going down one row at a time as we are getting rejected, and compare the test statistic with the critical values. So let's start in the above result. 27.17 is compared to critical values in the row, and it is less than all the critical values. We are not rejected, and don't need to go further down. It means that the null hypothesis of 0 cointgerating vector cannot be rejected at 90, 95 and 99% level. Which concludes that there is no cointegration!

Also, it is interesting to look at eigen values. None of them is significant.Eigen values output:

So, what do we conclude by looking at the output. Remember, we start going down one row at a time as we are getting rejected, and compare the test statistic with the critical values. So let's start in the above result. 408.61 is compared to critical values in the row. It is more than all critical values in the row, which means that r=0 is rejected. We next move on the 2nd row. The test statistic 21.68 is less than all critial values, which means that null hypothesis of r=1 cannot be rejected i.e., there is a single cointegrating vector. We stop going down and all done for now.

Also, it is interesting to look at eigen values. Only one of them is significant.Eigen values output:

If you remember the simulation code for cointegration, it wasy(4) = 0.5*y(1) + etwhich means thaty(4) - 0.5*y(1) should be stationary

Now let us look at the 1st eigenvector and see if this information can be extracted.The eigen vector is :

-0.451106535
-0.000117708
0.002076156
0.892443971
-0.006506092

Dividing by 0.892443971, we get:

-0.505473228
-0.000131894
0.002326371
1
-0.007290196

This means that:-0.505*y(1) - 0.00*y(2) + 0.002 * y(3) + 1*y(4) - 0.0072 should be stationaryIgnoring the insignificant coefficient, the result is pretty much able to extract our

simulation input of the 0.5 coefficient.

Scenario 4 : 5 random walks with two cointegration relations

Model : Generate 5 random walks. Make 4th series depend 1st series. Make 5th series depend on 1st, 2nd and 3rd series. We would expect that Johansens' test tells us that there are 2 cointegrating vectors.

Input code for simulation

n=1000;
x=randn(n,5);
y=zeros(n,5);
for i=2:n,
y(i,:)=y(i-1,:)+x(i-1,:);
y(i,4)=0.5*y(i,1)+x(i-1,4); %4th series depends on 1st series
y(i,5)=1*y(i,1)+ 2*y(i,2)+ 3*y(i,3)+ x(i-1,5); %5th series depends on 1st, 2nd and 3rd
series
end
save "c:\\octave_files\\outmat.txt" y;

So let's start navigating in the above result. 410.59 is compared to critical values in the 1st row, we get rejected because it is higher than all. We go to 2nd row, and get rejected again. But 3rd row value 14.29 is less than all critical values, which tells us that there are 2 coinegrating vectors.

Also, it is interesting to look at eigen values. Only two of them are significant.Eigen values output:

If you remember the simulation code for cointegration, it wasy(4) = 0.5*y(1) + etwhich means thaty(4) - 0.5*y(1) should be stationary

And there is also one more cointration we had simulated:y(5) = 1*y(1) + 2*y(2) + 3*y(3) + etimplyingy(5) - 1*y(1) - 2*y(2) - 3*y(3) should be stationary

Now since there are 2 cointegration vectors, we are not sure which information is embedded in which vector. Let's try to make a guesslet us look at the 1st eigenvectorThe eigen vector is :

-0.135174448
0.696093715
1.05089023
0.964622081
-0.34873143

I think it is the y(4)y(1) relation, which should indicate in the above vector that 4th value should be double the 1st value and of an opposite sign. Well, not exactly and they are way off. I wish I could extract that info. But hey wait, I can fiddle with lag remember? I chose 1 earlier. Now I will try with lag of 2 and rerun the test. eignevalues and test statistics are sligtly different but do not change the conclusion.

This means that:-1.011*y(1) - 2.0*y(2) - 3.0 * y(3) + 0.02*y(4) + y(5) should be stationaryIgnoring the insignificant coefficient of y(4), the result is pretty much able to extract

our our inputs when we created the 5 series.

let's now look at the second eigen vector:

-0.384611124
0.139167334
0.215003677
0.908489472
-0.070376161

Dividing by 0.908, we get:

-0.423352319
0.153185412
0.236660615
1
-0.077465026

This means that:-0.423*y(1) + 0.15*y(2) + 0.23 * y(3) + 1*y(4) + -0.077*y(5) should be stationaryIf we ignore the coefficients of y(2),y(3) and y(5), y(1) and y(4) coefficients pretty much match the values when we created the 4th series.

Scenario 5 : 5 random walks with two cointegration relations. The spread of the 2 coinetgrated series have different life cycles or mean reversion speeds

Model : Generate 5 random walks. Make 4th series depend on 1st series with a cointegrating spread having mean reversion speed of 0.5. Make 5th series depend on 2nd series with a cointegrating spread having mean reversion speed of 0.25. We would expect that Johansens' test tells us that there are 2 cointegrating vectors, and also indicate that eigen values are proportional to the speed. Also, the proper eigen value matches the correct eigen vector.

If you remember the simulation code for cointegration, y(4) was created using 2*y(1) + a series which had theta=0.5. The other series y(5) was created using 4*y(2) + a series which had theta=0.25.

Since eigen values are supposed to increase with theta, we can assume that the higher eigen value corresponds to the cointegrating vector y(4)y(1).

Following is the first eigen vector:

-0.894595844
0.014204241
-0.000231447
-0.44663461
0.003740024

It seems that 1st series is double the 4th series, and the others are insignificant - it matches our simulation

Now let us look at the next eigen vector corresponding to the smaller eigen value 0.212614677

-0.004031033
0.970165955
-2.5606E-05
-0.00329971
0.243190732

2nd series coeff (0.97) is around 4 times the 5th series (0.24) while the others are insignificant - it thus seems to match our original simulation of y(5)y(2)

Since the theta parameter or eigen helps to determine the strength of the relation and how fast or often the relationship converges, studying eigen values is an important indicator of life cycle of the pair trade

Discuss or give feedback? Just enter your message and click on submit. No registration is required.
Note: A copy of this message will also be emailed to the submitter of this link

The comments are owned by the poster. We aren't responsible for their content.

Poster

Thread

Anonymous

Posted: 2011/1/31 10:08 Updated: 2011/1/31 10:08

How do I interpret Johansens' test results?

thanks for posting this. it has made me understand it now, i can move forward with confidence in using johansen method for my trading strategies. keep up the good work!

Poster

Thread

Anonymous

Posted: 2011/2/4 3:58 Updated: 2011/2/4 3:58

How do I interpret Johansens' test results?

Thank you for this answer. However, i do have an additional question:What happenes if I don't have any cointegration relation for 1 lag, but I find there is a cointegration relation for more lags, 3 for example? How do I interpret this result? Furthermore, how do I find the "equilibrium" relation between the series? I want to use this for something similar with pairs trading.Thank you

Poster

Thread

Anonymous

Posted: 2011/2/8 9:20 Updated: 2011/2/8 9:20

How do I interpret Johansens' test results?

Hi,The result with more lags will be considered more reliable. For example, result in scenario 4 above had an experiment of using 1 lag which did not give accurate eigen vector. it became more accurate as it increased. Optmial lag is ideallly chosen by AIC

Poster

Thread

Anonymous

Posted: 2011/2/8 15:37 Updated: 2011/2/8 15:37

How do I interpret Johansens' test results?

be careful johansen test is not stable given numerical methods used in background...

Poster

Thread

Anonymous

Posted: 2011/3/3 12:42 Updated: 2011/3/3 12:42

How do I interpret Johansens' test results?

"be careful johansen test is not stable given numerical methods used in background..."can you please elaborate? is it something like convergence problem?

Poster

Thread

Anonymous

Posted: 2011/6/15 11:49 Updated: 2011/6/15 11:49

How do I interpret Johansens' test results?

At the conclusion of Scenario 4, where you say "if we ignore y(2), y(3),...", I think what is really going on here is that this solution is really some combination of both relationships. If you play with the linear combinations a bit, I think you'll see what I mean.

Poster

Thread

Anonymous

Posted: 2012/1/2 23:09 Updated: 2012/1/28 18:49

How do I interpret Johansens' test results?

I'll try to put this to good use immeidaetly.

Poster

Thread

Anonymous

Posted: 2012/3/20 11:53 Updated: 2012/5/6 19:25

How do I interpret Johansens' test results?

Hi, Can you please explain the rationale on dividing eigen vector with its own element. What is the rule followed here ? Thank you.

S.

Discuss or give feedback? Just enter your message and click on submit. No registration is required.
Note: A copy of this message will also be emailed to the submitter of this link