InIn textbooks, you often see pairs trading algorithms starting by regressing prices of Asset A on Asset B to calculate a hedge ratio.
But in the real world, I’ve rarely seen anyone actually do this.
That’s because it’s a very unstable approach, especially for pairs of volatile assets, and even more so over long periods of data.
The Basics of Pairs Trading: What You Need to Know
Pairs trading is a market-neutral strategy where you trade two correlated assets in opposite directions: one long, one short. The idea is that, over time, the assets will converge in price, and you profit from that convergence.
At its core, pairs trading relies on the belief that prices of two correlated assets will revert to their mean over time. If Asset A moves up, Asset B should move up too. If Asset A falls, Asset B should fall too. But, when they diverge significantly, you go long on the undervalued one and short the overvalued one, expecting them to move closer together.
The beauty of this strategy is that it aims to profit from relative price movements, not from the overall market direction. This makes pairs trading a popular choice for traders seeking to hedge market risk while capturing profits from asset mispricing.
Why Traditional Pairs Trading Models Don’t Work in the Real World
In textbooks, pairs trading algorithms often begin by regressing the prices of Asset A on Asset B to calculate a hedge ratio. This might work in theory, but in practice, it’s a volatile, unstable method, especially for a pair of assets that move dramatically or over large datasets.
The traditional model assumes that historical price relationships will continue to hold. But as you know, the market doesn’t care about your backtest. Real-world conditions like slippage, market impact, and the underlying volatility of the assets make these methods highly unreliable.
A Simple and Practical Approach to Pairs Trading
In the real world, the simpler approach tends to work best. Forget the complicated hedge ratios, focus on the ratio of the stock prices, apply a moving average to that ratio, and then use standard deviation to understand how far off the prices are from the mean. You can then calculate a z-score to decide when to trade.
The benefit here is that you don’t need to overthink the hedge ratio. You’re not trying to predict exactly how much one asset should outperform the other. Instead, you’re betting on the assets reverting to the mean, and your entry is based on the volatility around that mean.
Why Equal Risk Exposure Works in Pairs Trading
When you’re trading stocks or futures, you want to allocate the same amount of risk to each leg. The idea is simple: by allocating equal margin to both legs of the trade, you ensure that each position carries the same risk, regardless of how much the assets cost. This works because the relative movement of the two assets is more important than their absolute price.
In the case of equity pairs or futures contracts, this method is easy to execute and tends to balance risk exposure evenly. If one asset moves up, you want the other to move in the opposite direction in order to profit from the difference. This is about balancing your positions, not trying to predict exact price movements.
Adapting Pairs Trading for Unconventional Assets
When you step outside the world of equities and start trading unconventional asset pairs, like copper against JGBs, things get more complicated. These are markets with completely different behaviors. But you can still apply a simplified approach by adjusting your strategy based on the volatility of the assets.
For example, you can weight the ratio of assets by their realized or implied volatility. This ensures that you’re allocating more weight to the asset that has a greater potential to move, reducing the risk of mismatched exposure. So even if you’re trading something as crazy as copper vs. bonds, you can make the simple method work.
The Best Pairs Trading Strategy is the One That Works for You
The main lesson from this is that the smartest-seeming thing is often not the best in trading.
In academic land, you often see people calculating hedge ratios using dynamic linear models (Kalman filters, etc), copulas, genetic algorithms, etc. When I started out, I did all of these things as well.
In the real world, where implementation, scalability and profitability are prioritised, the simpler approach tends to win out.
In the real world, where implementation, scalability and profitability are prioritised, the simpler approach tends to win out.


Do you provide (R) code for above pairs trading strategy in RW PRO subscription?
Yes we do. We also run a universe selection process that leverages big data and cloud computing – which is much more interesting and useful than the actual pair trading algorithm itself.
is there plans for another bootcamp this year, very interested
Hey Brendan, yep we are running Trade Like a Quant Bootcamp again in April 2024! Sign up for email updates here: https://robotwealth.com/trade-like-a-quant-bootcamp-closed/