Johansen Cointegration Test: Rank, Trace and Max-Eigenvalue
Understand what the Johansen test's cointegration rank counts, how trace and maximum-eigenvalue tests differ, and why lag and deterministic-term choices matter.
In this guideCointegration rank counts independent stationary relations
Short summary
The Johansen procedure tests the rank of the long-run matrix in a multivariate time-series system. Rank \(r\) counts independent stationary combinations under the specified model. It does not by itself identify a tradable portfolio, prove causality, or guarantee that an estimated relationship will persist.
Cointegration rank counts independent stationary relations
Suppose \(y_t\) contains \(k\) variables, each treated as \(I(1)\) under a stated data-generating setup. The cointegration rank \(r\) is the number of linearly independent combinations of their levels that are stationary. If \(r=0\), the model finds no such combination under that specification. If \(0<r<k\), there are \(r\) independent long-run relations and, under the usual \(I(1)\) system conditions, \(k-r\) common stochastic trends. A rank of one is one relation across the system; it does not necessarily mean one obvious pair of assets.
This is a system question. The two-step Engle–Granger procedure estimates one normalized long-run equation and tests its fitted residual. Johansen's likelihood method instead estimates and tests the dimension of the cointegrating space in a vector autoregression, so it can represent more than one independent relation. The methods answer related but different questions and can disagree in finite samples or under different lag and deterministic specifications.
The VECM makes the rank visible
A VAR in levels can be rearranged into a simplified vector error-correction form, omitting deterministic terms here:
\[ \Delta y_t = \Pi y_{t-1} + \sum_{j=1}^{p-1}\Gamma_j\Delta y_{t-j}+\varepsilon_t, \qquad \Pi=\alpha\beta^{\mathsf T}. \]
Here \(p\) is the VAR lag order in levels. The columns of \(\beta\) describe long-run combinations, while \(\alpha\) contains the adjustment loadings that connect prior disequilibrium to current changes. When \(\Pi\) has rank \(r\), it can be factored into \(k\times r\) matrices \(\alpha\) and \(\beta\). The rank, rather than the number of variables alone, determines how many error-correction terms enter the system.
If all \(k\) series are genuinely \(I(1)\), the usual cointegrated cases have \(r<k\). A full-rank result points toward levels that are stationary around the deterministic terms allowed by the fitted specification and should prompt a check of the original integration-order premise. Rank zero does not prove that the variables have no connection of any kind; it says the selected model did not find a stationary level combination at the tested rank.

Trace and maximum-eigenvalue tests use different alternatives
Let the estimated eigenvalues be ordered \(1>\hat\lambda_1\ge\hat\lambda_2\ge\cdots\ge\hat\lambda_k\ge0\). These come from the likelihood procedure's reduced-rank problem. They are not ordinary percentages of variance explained. For a candidate rank \(r\), the trace statistic is
\[ \operatorname{LR}_{\mathrm{trace}}(r)=-T\sum_{i=r+1}^{k}\ln(1-\hat\lambda_i), \]
and tests \(H_0:\operatorname{rank}(\Pi)\le r\) against \(H_A:\operatorname{rank}(\Pi)>r\). It accumulates evidence from the remaining eigenvalues. The maximum-eigenvalue statistic is
\[ \operatorname{LR}_{\max}(r,r+1)=-T\ln(1-\hat\lambda_{r+1}), \]
and tests rank \(r\) against the next rank \(r+1\). Thus the trace test asks whether there are more than \(r\) relations in total, while the maximum test asks whether the data support adding the next relation. Neither statistic has the usual chi-square reference distribution for this rank null.
A hypothetical eigenvalue output shows the arithmetic
Imagine a three-variable system with 200 usable observations and sorted estimated eigenvalues \(0.16\), \(0.05\), and \(0.01\). These are invented teaching inputs, not market estimates. At \(r=0\), the trace statistic sums all three terms and is about \(47.14\), while the maximum-eigenvalue statistic uses only the first and is about \(34.87\). At \(r=1\), the corresponding values are about \(12.27\) and \(10.26\); at \(r=2\), both use the last eigenvalue and equal about \(2.01\).
The arithmetic produces test statistics, not a rank decision. To make that decision, compare each statistic with critical values or p-values for the exact deterministic case and test sequence. For example, a software table's “reject at \(r=0\)” is evidence against rank zero only under that table's assumptions and chosen level; it is not a direct probability that a particular asset spread is stationary. A p-value above the cutoff means failure to reject that rank null, not proof that it is true.
Lag order and deterministic terms define the tested system
Choose a defensible VAR lag order before interpreting rank. A level VAR with order \(p\) corresponds to \(p-1\) lagged differences in the VECM. Too few lags can leave serial correlation in residuals; too many consume degrees of freedom and can make finite-sample inference unstable. Information criteria can help organize candidate orders, but residual diagnostics, sample size, and the economic timing also matter. State how the order was selected and check reasonable alternatives.
Decide where intercepts and trends belong: outside the cointegrating relation, restricted within it, or absent under the maintained model. These cases imply different long-run behavior and different rank-test distributions. Select a specification based on the question and data, not by searching for the most favorable p-value. Use critical values matching the exact deterministic case, number of variables, and implementation. Johansen rank statistics have nonstandard distributions; MacKinnon, Haug, and Michelis calculate response-surface distributions for specified Johansen-type likelihood-ratio tests, including an extension that allows exogenous \(I(1)\) variables. Their values should not be carried over to every rank-test setup.
The location of a deterministic term is not a cosmetic software option. In common parameterizations, a constant restricted to the cointegrating relation allows that equilibrium combination to have a nonzero mean; an unrestricted constant outside it can permit a different deterministic drift in levels. Trend restrictions also change the maintained long-run path. A table that reports only “constant included” is incomplete if it does not say where the constant enters. Read the model equation and report each restriction.
The estimated vectors need normalization and economic interpretation
The cointegration space is the central estimate. In a rank-one model, multiplying a vector \(\beta\) by a nonzero constant does not change which level combination is stationary, so an analyst chooses a normalization such as setting one coefficient to one. In higher rank, many bases span the same space; software's displayed vectors are not automatically unique economic relationships. Restrictions or additional theory are needed to interpret a particular vector, and the normalization should be reported.
The adjustment matrix \(\alpha\) addresses which variables respond to disequilibrium in the fitted system. Its sign depends on the chosen normalization, and its entries are conditional system coefficients rather than standalone causal effects. A small or zero loading may motivate a weak-exogeneity hypothesis, but that conclusion requires the corresponding formal restrictions and maintained model. Cointegration rank alone does not say which variable “leads,” which relation is economically meaningful, or how a shock will affect future prices.
The nonuniqueness is a property of the factorization, not just a display quirk. For nonsingular \(H\), \(\beta H\) and \(\alpha(H^{-1})^{\mathsf T}\) produce the same long-run matrix \(\Pi\). The estimated space can therefore be identified even when a particular set of displayed vectors is not. Selecting one vector as a tradable spread requires an explicit normalization or economic restriction, and its units and risk still need separate analysis.
Sequential decisions and model uncertainty limit the rank claim
Rank is commonly assessed by testing candidate values in sequence, starting at zero and moving upward until the first null is not rejected. The selected rank is a model choice under the selected significance level and specification. If trace and maximum-eigenvalue results differ, report both and investigate lag length, deterministic terms, weak power, structural breaks, and sample sensitivity rather than hiding the disagreement.
Likelihood-ratio critical values are nonstandard and depend on the system specification. Near-unit-root behavior, short samples, outliers, regime changes, \(I(2)\) variables, or exogenous integrated regressors can make the simple \(I(1)\) setup inappropriate. A standard rank table does not automatically cover these cases. The original Johansen work develops likelihood inference under Gaussian VAR assumptions; later response-surface calculations provide reference distributions for specified test setups, not for every possible data problem.
For example, if the trace test rejects \(r=0\) and \(r=1\) but does not reject \(r=2\), the conventional sequence selects rank two under that specification and significance level. It does not mean the probability that rank two is true equals one. The maximum-eigenvalue sequence compares adjacent-rank nulls, so its decisions should also be shown. Do not apply one test's critical value to the other statistic.
The selected rank also belongs to the sample period. A break in the economic relation, market structure, or variable definitions can make early- and late-sample estimates differ. Sensitivity analysis can reveal that instability, but searching many endpoints creates another multiple-testing problem. Explain which windows were planned and treat unplanned splits as exploratory evidence.
A cointegrating rank is not a pairs-trading signal
For a trading study, the estimated \(\beta\) vector may be one candidate definition of a spread, but rank does not supply entry and exit levels, position sizes, or expected returns. With multiple cointegrating vectors, choosing one combination can involve normalization, constraints, and data selection. Weights may imply short positions, leverage, or poor liquidity even when a statistical relation is estimated.
Estimate the system using only information available at each decision date and test the full selection and re-estimation process chronologically. Check whether the relation remains stable out of sample and include dividends, contract rolls, currency conversion, financing, borrow availability, bid–ask spreads, market impact, and execution timing as appropriate. A rank rejection is evidence about a specified model, not a profitability claim. The guide to Engle–Granger testing and error correction covers the single-equation alternative; cointegration versus correlation in pairs trading explains why correlation is not the same property.
Report enough detail to reproduce the rank test
Identify the \(k\) variables, transformations, observation frequency, sample dates, and integration-order evidence. Report the level VAR lag order, deterministic-term placement, effective sample size, trace and maximum-eigenvalue statistics, matching critical values or p-values, significance level, and sequential rank decisions. State whether the two tests agreed, which rank was carried forward, and what sensitivity checks changed the result.
When presenting vectors, give the normalization, restrictions, and corresponding adjustment loadings. For a trading application, disclose the data available at each rebalance, vector-selection rule, out-of-sample design, costs, and failure handling. Johansen's 1988 analysis of cointegration vectors90041-3) develops the likelihood approach to the cointegration space and rank. His 1991 Gaussian VAR treatment discusses rank inference and hypotheses about the vectors. MacKinnon, Haug, and Michelis provide response-surface distributions for cointegration likelihood-ratio tests. Related guides explain stationarity and unit roots.
Common questions
Q1Does rank one mean that exactly two assets form a pair?
No. It means one independent stationary combination in the full system. That relation may involve several variables and needs an interpretable normalization.
Q2Do trace and maximum-eigenvalue tests have to select the same rank?
No. They use different alternatives and can disagree. Report both outcomes and examine the model, lag, deterministic terms, and sample sensitivity.
Q3Does rejecting rank zero prove that a spread will be profitable?
No. It is evidence against a no-cointegration null under a specified model. It does not provide trade rules, stable out-of-sample behavior, or net returns after execution costs. ---
Sources and further reading
Report an issue
We’ll prepare an email with this article link. Mark receives the report only after you send it
Quick check
Read the guide? Check yourself with 3 questions
Question 01
In a three-variable system treated as I(1), what does a cointegration rank of one mean?
Choose an answer to see the explanation
Options glossary
The existence of a stationary linear combination among nonstationary series, implying a shared long-run equilibrium restriction under a specified model.
Read the deeper guideMean reversionA model-dependent tendency for a variable to move back toward a fixed or changing reference; it does not automatically imply stationarity or tradability.
Read the deeper guideAt the moneyA call or put whose strike is near the underlying price; it has little intrinsic value and often substantial sensitivity to time and volatility.
Read the deeper guide