---
title: "Johansen Cointegration Rank: Formula"
description: "The Johansen procedure tests how many independent long-run equilibrium relationships (the cointegration rank) exist among several non-stationary series. It..."
canonical: https://www.getswoopr.com/indicators/statistical-and-quantitative/johansen-cointegration-rank/
source: "Swoopr Investment: https://www.getswoopr.com"
---

## Direct Answer



> The Johansen procedure tests how many independent long-run equilibrium relationships (the cointegration rank) exist among several non-stationary series. It works on a vector error correction model and tests sequentially using eigenvalues. A rank of 0 means no cointegration, a rank between 1 and n-1 means that many stable linear combinations exist, and each is a candidate spread.





      


# Johansen Cointegration Rank: Formula, Meaning, Signals, Examples and How to Use It



## How Is Johansen Cointegration Rank Calculated?

The Johansen procedure tests how many independent long-run equilibrium relationships (the cointegration rank) exist among several non-stationary series. It works on a vector error correction model and tests sequentially using eigenvalues.

**Formula:** `Trace statistic for rank r: - T * sum over i=r+1..n of ln(1 - lambda_i), where lambda_i are the estimated eigenvalues; the rank is the smallest r not rejected`

**Inputs:**

- Two or more price series
- Number of lags in the VECM
- Deterministic term specification
- Sample size T

**Worked example.** With 200 observations and a single remaining eigenvalue of 0.05, the trace statistic is 10.26. The inputs are illustrative numbers, not market data.

**Reading it.** A rank of 0 means no cointegration, a rank between 1 and n-1 means that many stable linear combinations exist, and each is a candidate spread. The statistic is compared with tabulated critical values that depend on the number of series and the deterministic terms.

**Limits.** Results change with the lag length and deterministic specification, and the test has low power in small samples. Finding rank in one sample does not guarantee the relation continues.


      

## What is Johansen Cointegration Rank?



The Johansen procedure tests how many independent long-run equilibrium relationships (the cointegration rank) exist among several non-stationary series. It works on a vector error correction model and tests sequentially using eigenvalues.




## How to use Johansen Cointegration Rank



A rank of 0 means no cointegration, a rank between 1 and n-1 means that many stable linear combinations exist, and each is a candidate spread. The statistic is compared with tabulated critical values that depend on the number of series and the deterministic terms. A reading alone is never a buy or sell signal; it needs context from price structure, volume, volatility and the broader market regime.




## Strengths



- Handling several series at once lets it find more than one equilibrium relationship, which a pairwise test cannot.
- The sequential eigenvalue test gives a count of relationships directly, rather than a pass-fail on one chosen pair.
- Reproducible when the formula and data convention are fixed.




## Weaknesses and limitations



- The trace statistic has non-standard critical values, so results must be read against tables that depend on the deterministic terms.
- Adding a series to the system changes the eigenvalues and can alter the estimated rank, so the choice of variables matters.
- Correlated indicators can create false confidence by repeating the same underlying information.




## Editorial and risk note



This page is educational content, not individualized investment advice. It should not imply guaranteed prediction, accuracy or outperformance.







## Frequently Asked Questions


        



Is Johansen Cointegration Rank a buy or sell signal?




No. A rank of 0 means no cointegration, a rank between 1 and n-1 means that many stable linear combinations exist, and each is a candidate spread. Results change with the lag length and deterministic specification, and the test has low power in small samples. A trade built on it still needs a trigger, an invalidation rule, a position size and realistic execution assumptions.










What is the best setting for Johansen Cointegration Rank?




Johansen Cointegration Rank is computed from two or more price series; number of lags in the VECM; deterministic term specification, so the choices that matter are the data convention and the window it is read over. Test those across instruments, regimes and out-of-sample periods instead of fitting one historical winner.










Can Johansen Cointegration Rank be used by itself?




Results change with the lag length and deterministic specification, and the test has low power in small samples. Finding rank in one sample does not guarantee the relation continues. For that reason it is read next to measures of direction, participation, valuation, liquidity and risk, not alone.










Does Johansen Cointegration Rank work on every timeframe?




The calculation (Trace statistic for rank r: - T * sum over i=r+1..n of ln(1 - lambda_i), where lambda_i are the estimated eigenvalues; the rank is the smallest r not rejected) can be run on any bar size, but behavior is not portable: a reading on a five-minute chart describes a very different market window from the same reading on a daily chart. Validate the exact timeframe before relying on it.










Why does Johansen Cointegration Rank give false signals?




The trace statistic has non-standard critical values, so results must be read against tables that depend on the deterministic terms. Adding a series to the system changes the eigenvalues and can alter the estimated rank, so the choice of variables matters. Lag, noise and regime changes add to this, because market participants react to new information after the reading is calculated.










How should Johansen Cointegration Rank be backtested?




Rebuild Johansen Cointegration Rank from two or more price series using point-in-time data, write the rules before testing, include delisted securities where relevant, model realistic fills and costs, reserve a validation sample and compare with a simpler baseline.










## References

- [Journal of Economic Dynamics and Control: Statistical analysis of cointegration vectors (1988)](https://doi.org/10.1016/0165-1889(88)90041-3)



S




Swoopr Editorial Team



The Swoopr Editorial Team produces independent investment education, research, and tools for understanding markets, evaluating opportunities, and managing risk. All content is educational only and does not constitute personalized investment advice.



See our [editorial policy](https://www.getswoopr.com/legal/editorial-policy/) and [corrections policy](https://www.getswoopr.com/legal/corrections-policy/).
