Johansen Cointegration Test

Johansen Test for cointegration tutorial video

In NumXL, the Johansen test combines these two test forms to examine the cointegration assumption:

  • Trace Test for $K_o=0$
  • Maximum Eigenvalue Test for $K_o=m-1$

To establish the existence of cointegration in a set of time series variables, we wish to reject the trace test null hypothesis ($K_o=0$) and not reject the null hypothesis of the maximum eigenvalue test ($K_o=m-1$ ).

Now, let’s go over the steps for conducting a cointegration test in NumXL.

Step 1

Organized your input time series data as adjacent columns. Each column represents one variable and each row corresponds to an observation.

Input data set for johansen test of cointegration

Step 2:

Locate the cointegration test icon in the NumXL menu or toolbar and click on it.

cointegration test menu in NumXL

Step 3:

Using the cointegration wizard, select your input variables. The selection may include column labels.

General tab of NumXL Johansen Cointegration test Wizard or dialog

Note: The “Mask” field is used to exclude variable/columns from the analysis without changing your input data in the worksheet. In our tutorial, we want to include all of them, so we can leave it blank.

After we select the input data, the “Options” and “Missing Values” tabs are enabled.

Step 4: (Optional)

Initially, all Johansen tests are selected and a maximum lag order is calculated from the input data, but you can override any of those options as you see fit.

Options tab of NumXL Johansen test of Cointegration Wizard or dialog

Let’s leave it unchanged.

Step 5: (Optional)

If your input data does not have any missing values, you may skip this step.

Missing values tab of NumXL Johansen test of Cointegration Wizard or dialog

By default, the cointegration wizard will trigger an error if any of the variables has a missing value. This is acceptable for this tutorial.

Click the “OK” button.

Output table of Johansen test of cointegration generated by NumXL Wizard

When examining the output tables, keep this in mind:

  • Under the trace test, we asked whether there’s at least one possible linear combination for the input variables to yield a stationary process. We examined this question under different assumption for the input variable, and they all passed. Thus, we can conclude that the variables are cointegrated.
  • Next, under the maximum eigenvalue test, we want to be sure that the number of linear combinations does not equal the number of input variables. Why? Because if they do, the input variables are stationary to start with, and cointegration is not relevant. Again, we carry on the test under different assumptions for the input variables. In this example, they all failed the test aside from one scenario, which passed marginally.

In conclusion, we would state that the input variables are cointegrated.

Now what? You may use OLS regression for one variable using the other variables without the risk of getting into a spurious regression problem.

Have more questions? Submit a request