Pairs trading using cointegration for an investment bank

Categories: Financial Services
  • Situation

    An American investment bank pulled out from its physical commodity trading activity due the new regulation. Its proprietary trading desk was given the task of expanding its trading activities to cover commodity futures contracts.

  • Complication
    In the absence of asset-backed trading, commodity price risk can represent a major challenge. Statistical arbitrage strategies are an alternative but they also come with a sizable risk. The client was open to trial new strategies that prove to be profitable with a limited downside risk.
  • Solution
    We designed and implemented a cross-commodity trading strategy that had a well thought-over set of risk management rules. The strategy was thoroughly back-tested on commodity futures contracts spanning the period of 2013-2014. The strategy yielded a Sharpe ratio of 1.54

More details


Pairs trading strategies are market-neutral long/short trading strategies designed to exploit short-term deviations from a long-run equilibrium pricing relationship between two assets. Typical pairs trading strategies include:

  • Fundamentally-driven strategies (e.g. going short overvalued assets and long undervalued ones)
  • Statistical arbitrage convergence/divergence strategies that are based on correlation and other non-parametric decision rules


  • However, these approaches are inferior to co-integration because they do not guarantee mean-reversion.

Why co-integration is more relevant than correlation?

Co-integration is not the same as correlation:

  • Standard correlation estimation methods induce an apparent stability that is purely an artifact of the method, while the true nature of underlying dependency is obscured.
  • Unlike correlation, co-integration refers not to co-movements in returns, but to co-movements in raw asset prices.
  • If spreads are mean reverting, then asset prices are tied together in the long term by some common stochastic trend, and we say the asset prices are co-integrated.

Typical questions which must be answered when developing a pairs trading strategy include:

  • How to identify trading pairs?
  • When has the combined portfolio sufficiently moved from its equilibrium value to open a trading position?
  • How much weight to assign for identified trading pairs in optimal portfolio?
  • When do we close the position?

From a risk management perspective, it is also important to specify maximum
allowable time to maintain open trading positions, maximum allowable Value at Risk (VaR), and further possible risk reducing measures such as stop-loss triggers.

How to select winning pairs using co-integration?

We use the Johansen test for co-integration to select trading pairs:

  • A long-run equilibrium price relationship is estimated for the identified trading pairs
  • The resulting mean-reverting residual spread is modeled as a Vector-Error-Correction model (VECM)
  • Transitory form of VECM:
  • Johansen test is more appropriate than Engle-Granger test
What are the criteria for selecting winning pairs?

We focus on trading pairs exhibiting:

  • A high mean reversion rate to each other, i.e. trading pairs which are “tied together” by a long term common trend
  • A high volatility, i.e. the ability to deviate from this trend from time to time!
How to select the investment space?

  • Fundamental analysis shows that gas, oil, power prices are driven by similar risk factors.
  • Other commodity products may not exhibit an intuitive relationship but are also included in the investment space.
  • We use futures contracts in energy, metal and agricultural products to ensure sufficient liquidity and decrease friction costs.
  • Futures maturities range from 1-month to 3-years ahead
What are the main risks involved?

The main risk exposure to commodity specific events:

  • Fundamental changes that imply prices may never mean-revert again, or at least not within 15 days.
  • In order to control this risk, rules of stop-loss and a maximum holding period are used.
  • This risk is further reduced through diversification, which is obtained by simultaneously investing in several pairs (with a maximum of 10 pairs).
  • There is a risk that the trading game may not last long enough.
  • It might be the case that the strategy is successful in the long run, but that a few short run failures will ruin the overall excess return possibilities.
How to define successful trading rules?

Trading and risk management rules should be defined and adhered to as follows:

  • Open a position when the ratio of two product prices hits a calibrated threshold and close it when the ratio returns to the mean. The position is not opened when the ratio breaks the two-standard-deviations limit for the first time, but rather when it crosses it to revert to the mean again.
  • A maximum number of traded pairs is defined. Portfolio weights are proportional to the mean-reversion coefficient.
  • Maximum holding period is to be calibrated based on mean-reversion rate.
  • If the ratio develops in an unfavorable way, stop-loss is triggered to close the position if loss exceeds a pre-defined amount of the initial size of the position.
How to back-test the strategy?

    Strategies should not only be back-tested against historical data but also through a forward looking approach based on simulations:

  • Simulation should preserve the dynamics of the underlying commodities, namely, mean-reversion, seasonality, auto-correlation.
  • The resulting spread should be comparable to the historical spread.
  • Running the strategy on simulated paths should take into account realistic market frictions : bid-ask spread, transaction costs, public holidays, liquidity and so on.

Does it work?

How we can help



We have the skills and experience to support you in:

  • Designing tailored co-integration trading strategies.
  • Implementing such strategies in various programming languages (e.g. C++, Python, Matlab) and interfacing them with your trading system
  • Designing comprehensive back-testing framework for your trading strategies using both historical and forward looking (simulations) approaches

  • Providing advice in other quantitative trading strategies


What clients said aboutour projects

  • Bron Sharman Senior Oil Trader
    “Unlike many advisers I’ve worked with, Trading Integral Solutions don’t have to pretend to be interested in their clients: they focus on what really matters and strive to add value in an optimal way.” Bron Sharman, Senior Oil Trader at SOCAR Trading
  • Olga Kutuzova IFRS Group Manager
    "Trading Integral Solutions applied high quality standards when they delivered their project to us. We benefited greatly from our interaction with their highly skilled team of experts!" Olga Kutuzova, IFRS Group Manager at Novatek Gas & Power
  • Jaroslaw Wajer Partner
    "I have cooperated with Trading Integral Solutions several times. They supported us during the design and implementation of trading departments and company strategies for our power utilities clients. I appreciate their trading expertise and profound knowledge of risk management. I would truly recommend cooperation with Trading Integral Solutions." Jaroslaw Wajer, Partner Performance Improvement at Ernst & Young

Demonstrative Online Interactive Apps

Explore the online suite of interactive applications. This is a demo reproduction of fully-fledged solutions designed and implemented in different client projects.

Interactive Apps

Welcome to Trading Integral Solutions website! To register an account, please fill out the form below.

First Name
Last Name
Enter your email
Country Of Residence

Signup newsletter?

Password reset

Forgot your username or lost your password? No worries, simply enter your username or email and we'll send you new login details.

Enter your email

Check your email in a few minutes.

Rate the app

Please rate our app here.

First Name
Last Name
Enter your email