Pairs Trading Strategy

Pairs Trading Strategy – Backtest and Statistics

Pairs Trading Strategy involves being neutral to the direction of the market. This article looks at what pairs trading is, how it works, and its advantages and disadvantages (pros and cons). The main benefit of pairs trading is market neutrality. In the end, we test some simple pairs trading strategies. Pairs trading is profitable and still working.

Pairs trading strategies involve market-neutral strategies that aim for profits in any type of market, be it sideways, down, or up. Jim Simons’ The Man Who Solved The Market describes the origin of pairs trading: at Morgan Stanley in the 1980s. Small independent traders have used the same techniques, especially at proprietary firms because pairs trading needs leverage to efficient.

Table of contents:

What is pairs trading?

Pairs trading could be done in a wide range of instruments, for example, gold and silver, but in this article, we look at pairs trading in the stock market.

To have a pair you need to have two stocks, of course, and look at their historical performance and co-movement. When the price difference between the two stocks weakens, for example, one stock rises more than the other, the idea is to short the strongest one of the pair and buy the weakest one. Of course, a pairs trade could also do the opposite. There is no definitive answer to what is the best method.

The price differential is called the “spread”. The spread converges and diverges and the idea is most of the time to go against those swings in the belief the spread will converge after it has diverged.

The whole point with pairs trading is to be market-neutral: you want to trade the spread of the pair, not the direction of the market.

When the spread moves in a direction, it could be due to many reasons: filling of a big order, news, beta values, or whatever reason.

Examples of pairs could be GM/F, KO/PEP, and MS/GS. If GM outperforms F over a certain number of days, most pair traders would short GM and buy F.

Below is a chart of the share prices of KO and PEP (Coca-Cola and Pepsi-Cola). As is clear, over a 12-month period the share prices didn’t deviate many percentage points from one another. During brief periods of time, they diverged before they slowly converged and returned to “normal” again. These are the opportunities pair traders look for.

Pair trade chart
Coca-Cola and Pepsi-Cola are correlated. Source: Yahoo!Finance.

How Does Pairs Trading Work?

Pairs trading works by identifying two highly correlated financial instruments, such as stocks, options, futures, or currencies, and simultaneously buying one and selling the other. The idea is that two historically correlated instruments, which are currently not well correlated would eventually trade in a way to restore the historical relationship. In essence, pairs trading works by betting that 2 or more securities will diverge or converge in price to restore their historical correlation.

Pairs Trading Statistics

Pairs trading research has shown that a simple trading rule can yield average annualized excess returns of up to 11% for self-financing portfolios of pairs15. The positions in pairs trading are based on the current market price of both stocks and their standard deviation2. The strategy uses statistical and technical analysis to seek out potential market-neutral profits3. It is important to carefully evaluate the correlation between the two assets, typically requiring a correlation of at least 0.802. Pairs trading is a subset of statistical arbitrage, which involves taking advantage of the mispricing between two or more co-moving assets4.

Jim Simons’ Medallion Fund and pair trading strategies:

Jim Simons and his Medallion Fund use, to my understanding, mostly market-neutral strategies.

The main reason why they want to use market-neutral strategies is because of the uncorrelated return with the overall market. Even if the return from the market-neutral strategies over time is below the market’s return, uncorrelated returns boost portfolio returns. Thus, such strategies are very valuable.

Pairs trading – a personal experience – pairs trading was profitable:

Before we go on here is a short anecdote about my own experiences as a pair trader at the beginning of the millennium. I was a 100% market-neutral trader:

When I first started trading full-time back in 2001, I started with pairs. Why did I start with pairs trading? It was one simple reason: my mentor traded pairs and merger arbitrage.

My pairs trading strategies gave me a good starting point and pairs trading was highly likely much more profitable at that time than today. I traded only stocks listed on NYSE – none NASDAQ pairs. At the time, the specialist on the NYSE floor had a lot of power and most of the trading went through those firms. The specialist’s job was to create a fair and orderly market and to fill big positions.

The specialist system often meant I got price improvements:

If I had a bid at 50.25 and the specialist received a sell order for 40 000 shares, he might “sweep” all the bids and fill the order at 50.05. Thus, I managed to buy at 50.05 instead of 50.25. If I was filled I could either be naked long or short the other stock to make a “market-neutral” position. It’s unlikely that you get such price improvement anymore.

I can recall some of the most popular pairs at the time:

  • RDC / ESV
  • SII / BJ
  • BHI / SLB
  • FRE / FNM
  • ETG / EVT
  • RQI / RPF
  • BSC/LEH
  • MS/GS
  • STT/STI

Traders starting out today will notice that many of the tickers don’t exist anymore. To understand more of the flux of the stock market I recommend Hendrik Bessembinders study from 2017 called Do Stocks Outperform Treasury bills?. The average life of a public company was only seven years from 1926 to 2015 and just a small minority of the stocks beat Treasury Bills.

All pairs were traded intraday, ie. as day trades. I stopped pairs trading in 2005 because I found better strategies, and most likely I didn’t manage to adapt to the dynamics of pairs trading.

However, even today, after pairs trading has been around for over three decades and the most obvious edges are “arbed” away, there are still profitable pair traders out there. I still believe Bright Trading has a pairs trading group.

Advantages of pairs trading

The three most obvious advantages of pairs trading are these:

The market direction doesn’t matter – you are market-neutral

You don’t need to make any bets on the direction of the overall market. You make a bet on the direction of the difference of the pair (the spread). You can make money if the market moves up, down, or sideways. However, due to the different betas of the stocks you’re trading the market direction might influence the movement of the spread.

Pairs trading means (mostly) that you are market neutral

If the market drops 15%, it’s unlikely you face a 15% loss in your pairs. But be aware that the position can be poorly hedged. Market neutral doesn’t equal low risk. It’s just as much risk in pairs trading as in something else. The main reason for that is increased leverage.

Volatility is good for pair traders

In a slow and drifting market, pairs trading can be difficult. Opposite, when the volatility picks up, you often have sudden and rapid moves in one stock in any direction. Thus, you can “lock-in” profits by hedging the other stock.  

Disadvantages with pairs trading

Unfortunately, pairs trading has many disadvantages as well. The most obvious are these:

Pair traders take on too much leverage

When I traded at Echotrade, the risk managers always worried when they saw a new trader starting pairs trading.
 
Why? Because pair traders need leverage to make it worthwhile. The spread of a pair moves less than the market.
 
Moreover, pairs are considered lower risk because of the illusion of being “hedged”. Most pair traders at Echotrade “blew up”. They made money for 11 months before they lost it all in one month in just one or two bad pairs.

Pairs tend to wander away

In his book Algorithmic Trading, Ernie Chan notes that pairs trading of stocks has become more difficult over time. Two stocks may cointegrate in-sample, but they often wander apart out-of-sample as the fortunes of the respective companies diverge.

Below is an example of the ratio between PEP and KO:

Pairs trading example

A sudden move in one of the stocks often makes the spread settle on a new level. The chart above shows PEP/KO makes sudden and dramatic moves. This is what makes pairs trading pretty difficult.

What Are the Benefits of Pairs Trading?

Some of the benefits of pairs trading include:

  • It gives a market-neutral position
  • It can reduce risk by offsetting the potential losses of one position with the potential gains of another position.
  • Pairs trading inherently diversifies a portfolio.
  • It can reduce volatility by taking advantage of the relative price movements of two correlated financial instruments.
  • It can be used in a variety of markets, including stocks, options, futures, and currencies,
  • It can easily be automated using trading software and algorithms.

What is the difference between statistical arbitrage and pairs trading

Statistical arbitrage and pairs trading are related strategies, but they have distinct characteristics. Statistical arbitrage, also known as “stat arb,” involves trading strategies that take advantage of mean-reverting non-structural inefficiencies, typically using historical correlation and other data. It is not strictly limited to two securities and can be applied to a group of correlated securities. On the other hand, pairs trading is a subset of statistical arbitrage that specifically focuses on trading a pair of assets, often stocks, that are historically highly correlated. Pairs trading uses statistical and technical analysis to identify mispricings between the two assets and typically involves market-neutral strategies. While statistical arbitrage is more diverse and can be deeply quantitative, pairs trading is more focused on the specific relationship between two assets and can involve fundamental analysis of the pair. Therefore, while both strategies aim to take advantage of market inefficiencies, they differ in their scope and the number of assets involved.

What Are the Drawbacks of Pairs Trading?

Pairs trading has several drawbacks. These are some of them:

  • It may be difficult to find suitable pairs.
  • It offers limited profit potential.
  • It has a high capital requirement, so you may be forced to use leverage to increase potential profits.
  • Market conditions can change, and the correlation would break down.

What Types of Assets Are Traded in Pairs?

They can be any financial assets, such as stocks, exchange-traded funds (ETFs), and futures contracts. Some common examples of pairs that are traded include:

  • Two stocks from the same industry: For example, two technology companies such as Apple and Microsoft
  • Two ETFs tracking the same index: For example, the SPDR S&P 500 ETF and the iShares S&P 500 ETF
  • Two futures contracts on the same commodity: For example, two crude oil futures contracts with different expiration dates

In some cases, pairs trading can also be used to trade currencies, options, and other financial instruments.

What Is the Difference Between Pairs Trading and Spread Trading?

Pairs trading is a type of statistical arbitrage strategy that involves simultaneously buying and selling two highly correlated financial assets — the goal of pairs trading is to profit from the temporary mispricing of the two assets, which is expected to eventually converge.

Spread trading, on the other hand, is a type of strategy that involves buying and selling two different financial instruments, such as futures contracts, options, or currencies, with the goal of profiting from the difference in their prices. The two instruments can be highly correlated or not, the objective is to profit from the difference between the prices of the two instruments.

In other words, pairs trading is a specific type of spread trading where the two assets are highly correlated and the objective is to profit from the temporary mispricing of the two assets. Spread trading can also include other types of spread such as calendar spread, inter-commodity spread, etc.

What Are the Different Strategies Used in Pairs Trading?

There are several different strategies used in pairs trading, including:

  • Mean reversion strategy
  • Cointegration strategy
  • Statistical arbitrage strategy
  • Volatility based strategy

What is the cointegration test and how is it used in pairs trading

The cointegration test is a statistical method used in pairs trading to identify two assets that have a long-term relationship, allowing traders to take advantage of the mispricing between them. Cointegration is a property of two or more time-series variables that indicates if a linear combination of these variables is stationary. In the context of pairs trading, the cointegration test, such as the Johansen test or the Engle-Granger methodology, is used to determine if a pair of assets are cointegrated, implying that their spread remains constant over time. This test helps in selecting trading pairs for pairs trading strategies by ensuring that the assets have a long-term relationship, which is essential for the effectiveness of the pairs trading strategy

What Are the Risks Involved in Pairs Trading?

There are several risks involved in pairs trading, including:

  • Market conditions changing and abolishing the correlation in the trading pair.
  • Difficulty in finding suitable pairs
  • Limited profit potential
  • Risk of overfitting the trading pair from their historical data, which can lead to poor performance in real-world trading
  • Data snooping bias
  • Risk of poorly timed execution in the pair
  • Risk of concentrated positions
  • Risk of margin calls

Related reading: Statistical Arbitrage Trading Strategy

What Are the Advantages of Pairs Trading Over Other Trading Strategies?

Pairs trading has the following advantages over other trading strategies:

  • Lower risks.
  • Market neutrality
  • Limited loss potential
  • Statistical arbitraging opportunities
  • High-frequency trading opportunity
  • Hedging benefits
  • Low correlation with other strategies

What is the average annualized excess return for pairs trading

The average annualized excess return for pairs trading varies depending on the dataset and method used. According to various studies, the average annualized excess return for top-pairs portfolios ranges from about 11% to 15.92% 1 2 3 4 5. However, it is important to note that these returns may be affected by institutional factors and transaction costs.

What Are the Disadvantages of Pairs Trading?

Pairs trading has several disadvantages, including:

  • Difficulty in finding suitable pairs
  • Limited profit potential
  • Risk of market conditions changing
  • High capital requirement
  • Overleveraging to make the profits sizeable
  • Requires a high level of expertise and experience

What Are the Most Popular Pairs Trading Strategies?

There are several popular pairs trading strategies, including:

  • Mean reversion strategy
  • Cointegration strategy
  • Statistical arbitrage strategy
  • Volatility based strategy

Note that, regardless of the strategy used, pairs trading requires finding two highly correlated assets and trading in a way to benefit from the divergence or convergence of their prices.

What Are the Best Practices for Pairs Trading?

Here are some of the best practices to keep in mind when pair trading:

  • Find suitable pairs that are highly correlated
  • Use a robust trading strategy
  • Use proper risk management
  • Constantly monitor your position
  • Don’t overleverage
  • Have discipline
  • Have a trading plan
  • Continuously learn and improve

What Are the Potential Pitfalls of Pairs Trading?

These are some of the potential pitfalls of pairs trading:

  • Difficulty in finding suitable pairs
  • Risk of market conditions changing
  • Risk of overfitting
  • Risk of data snooping bias
  • Risk of concentrated positions
  • Risk of margin calls
  • Limited diversification

What Are the Steps to Take Before Starting Pairs Trading?

The steps to take before starting pair trading include:

  • Study the markets
  • Find the suitable pairs
  • Develop a trading strategy and plan
  • Have a robust risk management strategy
  • Backtest your strategies
  • Choose the right broker

What Should You Look for in a Pairs Trading Platform?

The things to look for in a pairs trading platform include:

  • Charting and other trading tools, such as order management panel and strategy tester
  • Reliability
  • Data and analytics
  • Automated trading
  • Execution speed
  • Customizable alerts
  • Technical indicators
  • Mobile compatibility
  • Customer support
  • Fee structure

What Are the Different Types of Pairs Trading Systems?

These are some of the different types of pairs trading systems:

  • Statistical Arbitrage Systems
  • Machine learning-based Systems
  • High-frequency trading systems
  • Volatility based Systems
  • Hybrid Systems

What Are the Pros and Cons of Automated Pairs Trading?

Automated pairs trading comes with some pros and cons.

The pros include:

  • Better speed and accuracy
  • Efficiency and consistency
  • Scalability
  • Easy backtesting
  • Easy monitoring

The cons:

  • High complexity
  • Too much reliance on data quality
  • Overfitting
  • Limited flexibility
  • Lack of discretion

How Can You Get Started with Pairs Trading?

These are the steps to follow if you want to start pair trading:

  • Study the markets
  • Find the suitable pairs
  • Develop a trading strategy and plan
  • Have a robust risk management strategy
  • Backtest your strategies
  • Choose the right broker
  • Test your strategy with a demo account first
  • Implement your strategy with a small amount and gradually grow

How Can You Use Technical Analysis to Improve Your Pairs Trading Results?

You can use technical analysis to do the following:

  • Identify trends and patterns
  • Identify key levels of support and resistance where prices may reverse
  • Identify overbought and oversold conditions
  • Identify divergences
  • Smoothen the data and filter the noise
  • Identify entry and exit points

What Are the Best Books and Resources for Learning Pairs Trading?

These are some of the best books and resources for learning pairs trading:

  • Pairs Trading: Quantitative Methods and Analysis” by Ganapathy Vidyamurthy
  • Pairs Trading: A Bayesian Network Approach” by Y.T. Chan and W.K. Ho
  • Pairs Trading: An Introduction” by AlgoTrader
  • Pairs Trading: Arbitrage, Statistical Arbitrage and Convergence Trading” by Cesar Alvarez
  • Pairs Trading: A Practical Guide to Trading Pairs” by Peter Rosenstreich
  • Online resources: There are several websites and online forums that provide information on pairs trading, such as Quantpedia, QuantStart, Quantocracy, and others.

Pairs trading involves black swan events

Pairs trading is most of the time smooth sailing with many small winners. The win ratio is high. Because of this, you take on more risk. This is the optimism bias. Even worse, many are tempted to double up when a pair goes against you. Because of this, many traders lose months of profits in just one day, even in minutes. Moreover, because pairs tend to yield smaller unleveraged returns than buy and hold, traders use leverage to boost earnings.

Pairs trading involves cost for shorting

When you have a short position it costs money to borrow shares to sell short. If you are trading KO/PEP, this cost is negligible. However, if you trade some pairs that might not be as liquid as those, you need to pay to borrow the shorts. Even worse, some stocks might be impossible to borrow – so called hard-to-borrow stocks.

Pairs trading involves slippage and commissions

One trade involves four transactions. Perhaps needless to say, this increases trading frictions. This is not an insignificant amount.

Pairs have different betas, leverage, and fundamentals – beware of your pair trading strategy

There are a zillion reasons why two stocks shouldn’t move in tandem as time goes by. For example, different business leverage might influence the stocks a great deal. In a bull market, a leveraged stock might rise much more than one which has low leverage.

Likewise, is there any reason why PEP and KO should move in tandem over time? It’s hard to say. Thus, most pair traders use a short time horizon.

Pairs trading strategies are not really market-neutral

Despite being both long and short an equal amount, perhaps adjusted for beta and volatility, you are not really market-neutral.

This is because you are essentially long and short two different stocks. This is a fundamental difference to being long and short the same asset, for example, to be long and short the same instrument with different calendar spreads.

How to pick stocks for pairs trading strategies?

The most important issue in pairs trading is the process of selecting pairs to trade. Which criteria would you use? What is the time frame? What is risk management? Do the trading correlations increase or decrease in bear markets?

Correlations are important in a pairs trading strategy

If two stocks move in the same direction, the correlation is positive. If the stocks move in opposite directions, the correlation is inverse – negative. Here is a plot of four different correlations for PEP/KO:

Pairs trading correlation

The chart above shows the correlations of PEP/KO for 10 days (red), 30 days (black), 50 days (blue), and 100 days (green). Clearly, the numbers vary depending on the number of days. The longest one, 100 days, has over the last 1.5 years been between 0.6 and 0.95, suggesting PEP and KO are pretty correlated.

Correlation vs. cointegration in pairs trading

Correlation is handy but might be a bad measure of the quality of a pair. Even a positive correlation can lead to wide variations in the spread ratio. Cointegration is often a better measurement of the quality of a pair. Why? Because cointegration measures the variability of the difference between two stocks.

Let’s take an example: If two stocks A and B today have a ratio of one (1) and the historical cointegration is perfect, we can expect the ratio to be one even after one year, even though the correlation might have gotten weaker. Any deviations from the base case of one imply that you have a perfect setup for a trade (a statistical abnormality).

Do fundamental factors matter in a pair trading strategy?

It makes a lot of sense to pick stocks that are mostly influenced by the same factors. For example, both KO and PEP are in the same markets (soft drinks and snacks), they are subject to the same macroeconomic and industry factors, they are likely to be valued by the same financial indicators, and they have pretty similar earnings multiple.

Let’s test: pairs trading strategy no. 1: KO/PEP

The criteria for our pair trading strategy are as follows based on end-of-day quotes:

Trading Rules

THIS SECTION IS FOR MEMBERS ONLY. _________________ Click Here To Get Access Click Here To Get Access To Trading Rules

If the ratio of KO/PEP is below 10, then enter at close by buying KO and shorting PEP. This is the result from 2000 until today:

Pairs trading example (KO/PEP)
The pair ratio of KO and PEP is trending, but still has room for mean reversion par trades.

The strategy yielded 113% with erratic bursts: during the last ten years, this naive strategy has made zero returns.

Let’s test: pairs trading strategy no. 2: GS/MS (Goldman Sachs and Morgan Stanley)

The criteria for our pair trading strategy are these:

Trading Rules

THIS SECTION IS FOR MEMBERS ONLY. _________________ Click Here To Get Access Click Here To Get Access To Trading Rules

The result from the year 2000 until March 2021 is 187% on 310 trades: 0.6% per trade before commissions and slippage.

If we change the exit to RSI(2)>75 the total returns increase to 275% on 286 trades: 0.96%.

Another popular measure when I traded pairs was to use Bollinger Bands. Unfortunately, I couldn’t make that more profitable than the simple two-day RSI strategy.

Conclusion on pairs trading strategies

Our rather “naive” pairs trading strategy show promise but needs to work on.

However, the equity chart of KO/PEP shows the benefit and the whole idea of pairs trading: market-neutral positions make you not dependant on the market to get returns.

Pairs trading strategy using Python

In case you are interested in learning how to code in Python, we have made an exclusive article about how to code a pairs trading strategy using Python.

Pairs trading strategy for SPY and TLT

SPY is the ETF for S&P 500 and is the oldest ETF still trading. TLT is the ETF that tracks 20-year Treasuries. We made a pair trade for SPY and TLT.

Conclusion: pairs trading strategies are still working

Pairs trading is still popular among hedge funds and proprietary traders. However, we suspect the profitability is one of diminishing returns. Pairs trading offers no easy money anymore and often involves “black swan” types of returns. Pairs strategies are no longer the “low hanging” fruit because the easy prey is “arbed” away many years ago.

However, this might be offset by diversification into many different pairs. We believe it’s paramount to understand the fundamentals of the stocks you’re trading, for example, earnings, ROIC, and leverage.

The backtests we did on KO/PEP and GS/MS yielded a return lower than buying and holding the S&P 500. This makes sense because you are short one leg of the pair, and we all know short faces constant tailwinds. You need leverage for this strategy to work. However, this might be offset by a higher Sharpe Ratio due to fewer swings in the equity curve.

FAQ:

– What is pairs trading, and how does it work?

Pairs trading involves simultaneously buying and selling two highly correlated financial instruments, such as stocks, to profit from the temporary mispricing of the two assets. The goal is to benefit from the divergence or convergence of their prices.

– How is a pair identified in pairs trading?

A pair consists of two stocks, and their historical performance and co-movement are analyzed. Traders look for opportunities when the price difference between the two stocks weakens, allowing them to short the stronger stock and buy the weaker one.

– Why is pairs trading considered market-neutral?

Pairs trading is market-neutral because it focuses on trading the spread of the pair rather than the direction of the overall market. Traders aim to be profitable regardless of whether the market moves up, down, or sideways.

Similar Posts