Pair trading is a trading strategy based on trading two financial instruments, which have a fundamental or statistical relationship expressed by the fact that the ratio of these assets’ prices has a long-term tendency to return to some mean value, as one, a “pair”. In this article we will introduce you to the concept of "pair trading", explain why this approach is staple for many major investment funds, what are its advantages and disadvantages, as well as examine the possibilities for employing it by individual traders.
Pair trading is based on an assumption that fundamentally related financial instruments’ prices react to economical or other factors in approximately the same fashion. Accordingly, both instruments’ price dynamics will tend to be the same, and the difference between the prices, called the spread, will most probably maintain long-term equilibrium.
Let’s consider which fundamental economic preconditions this assumption is based on. Taking, for example, a pair of some interchangeable FMCG goods. It is obvious that when quality characteristics are the same, any rational consumer will try to purchase the goods at a lower price. As a result, this will lead to increased demand for cheaper goods, which will be accompanied by a consequent price increase. Thus, the assets’ prices will level off over time. If the goods have some functional or qualitative differences, their prices will converge at some equilibrium point due to the same reasons, being also determined by customers’ supply and demand, with an additional characteristic of "price / quality."
Roughly the same mechanisms orchestrate financial markets, with the only difference being that the principle of "price / quality" is replaced by the principle of "profitability / risk". Taking, for example, two rival companies, let’s call them A and B, having similar qualitative characteristics. Investment risks for both companies are the same. But what happens if shares of B will be cheaper than A, considering the same expected dividends? Rational investors will prefer to buy shares of B, since using the same amount of capital they will get more dividends/profit, thus maximizing their ROI. This will lead to increased demand for B’s stock and, consequently, to an increase in its price. In addition, some investors, having a long position in A, may prefer to close it, cashing out to buy B’s shares, thereby reducing the A’s cost. As a result, the prices of both shares will come to some equilibrium, giving approximately the same return on investment while it (equilibrium) persists.
Considering real trading, prices of financial instruments are constantly affected by various external factors, such as news, macroeconomic indicators, political situation, both local and world politics, cataclysms etc. It all leads to the said equilibrium condition periodically vanishing, then restoring. Thus, it becomes possible to make money on short-term discrepancies between the assets’ prices. For example, the same negative news report may produce stronger reaction for A company’s stock prices than for B, causing the equilibrium to dissapear. Noticing the imbalance, we can purchase A shares while selling B’s, hoping that they return to the mean in nearest future. When that happens, both positions can be closed, locking in a guaranteed profit.
Let’s now turn to practice. In order to employ the pair trading strategy, you must be able to determine the mean point/value (the equilibrium we’ve talked about before) between the trading instruments’ prices and measure the current prices’ deviation from the mean. For this purpose, a spread between the pair of financial instruments, which is essentially a difference between their prices, combined with specific coefficients, called "weights", is calculated as follows:
SPREAD=a*PriceA-b*PriceB,
where PriceA and PriceB are instruments’ prices, a and b - their weights, which are necessary for bringing the price to comparable values (a degree of normalization, may we say so) and/or balance the positions in terms of used capital per instrument.
We shall notice, though, that the spread instrument is a synthetic instrument, as it can be traded as a common trading asset. Purchasing the spread equals going long on first instrument and selling the second one, shorting the spread is vice versa, a simultaneous sale of the first asset and second one’s purchase. Another thing to remember - each spread constinuent’s trading volume in the position shall be proportional to its weight in the spread formula.
It is clear that a pair of related assets’ spread, considering constant and non-changing price movement characteristics, will fluctuate around a certain mean value, which will be the point of equilibrium between these instruments’ prices. Thus, analyzing a spread chart, built using the instruments’ historical price values, we can determine the average value, as well as optimal deviation levels at which one can take short or long positions expecting the spread to return to the mean value, a so-called mean reversion approach.
As an example, let’s consider the shares of two energy sector companies: «Exxon Mobil» (XOM) and «Chevron Corporation» (CVX). Below are both companies’ stock price charts. They show how tightly correlated their prices are:
Let’s calculate and generate a spread chart using the following formula, 1.4*XOM-1*CVX :
The weight coefficients of "1.4" and "1" are selected in a way as to ensure optimum spread stationarity. Using these weighting values, the spread shows a stable stochastic dynamics relative to a constant mean value, located near 5 points. Just a look at the chart and it becomes apparent, how easy and convenient to trade it is: it’s enough to just “draw” deviation levels above and below the mean, then opening positions on crossing them and closing on returning to the mean. Examples of transactions with the selected level of deviation of 10 points are shown on the above chart. The arrows indicate position opening, squares - closing.
Another interesting example is a pair of HYG and SPY ETF funds. 90% of HYG’s constinuents are high-yield corporate bonds, most of which are included in S&P 500. At the same time, SPY is a “copy” of S&P 500 Index. Thus, there’s a fundamental connection between these two tickers: bonds’ coupon rate and yield directly depend on a company’s "economic health" and value, and, considering that, the ETF price also depends on individual bonds’ prices, so by implication it depends on the shares’ prices. However, this relationship is not strictly deterministic and allows quite serious discrepancies of HYG-SPY spread from its mean values, allowing a trader to gain from regularly occurring deviations.
As can be seen from the chart, the synthetic instrument (spread) "oscillates" around the mean price at around 115-116 dollars, and, obviously, now one could enter a position, because a fourth “cycle” of oscillations had just started, with high probability of the trend continuing. Thus, following the pair trading/mean reversion approach, we have to buy and sell shares of HYG the SPY respectively, counting on the fact that the spread will return to the average eventually.
The most important and often complex thing in pair trading is selecting suitable pairs to trade and constructing spreads suitable for trading. In fact, if you look at the problem from a mathematical point of view, the main task of pair trading is confined to “extraction” of stationary time series out of two instruments’ prices. The term "stationary" in this case means permanence of time series’ characteristics over time. Considering the method - pair trading, it is vital to maintain the same mathematical expectation throughout time, ie. the average value. Simply put, it is required to pick a couple of instruments and their participation coefficients (weights) in such a way that the difference between their prices, taking the weight coefficients into account, would be performing periodical "vibrations" or "oscillations" around some mean value. Obviously, such a pair is easy and convenient to trade with since it is known that the spread will return to its average value with high probability.
Let’s have a look at a couple of “good pairs”, with spreads showing a high level of stationarity:
A pair consisting of two oil grades futures - Brent Crude (Brent) and West Texas Intermediate (WTI). Due to the fundamental relation of these commodities they clearly follow each other, as can be seen.
A spread between the NASDAQ100 index (NQ100) futures and Walt Disney shares (DIS). Almost a perfect example, despite the fact that oscillation amplitude had increased slightly at the end of the visible chart.
The spread between 60 shares of «3M Company» (MMM) and the Dow Jones Industrial Average (DJI) futures.
Another “oil” example - a pair consisting of Chevron Corporation (CVX), an oilgas company, shares, and the Natural Gas futures (NG). This spread does a great job at depicting the price connection between a commodity-distributing or producing company and the commodity itself.
However, those, close to ideal, spreads, fully satisfying the stationarity criteria and being almost perfect for trading, are extremely rare. But, fortunately, less “perfect” spreads are fine for trading too, most of the time; the main condition being the oscillatory movement of the spread occurring often enough, and the amplitude of these oscillations being greater than the average value changing over the same time period. In this case, it’s better to use, for example, a moving average on the mean value instead of a fixed average level. Then one can continue to profit trading on deviations from the mean.
Some suitable spreads:
Spread made out of a pair of futures: S&P 500 and Dow Jones.
Please note that the average level of the spread varies over time, but still, the spread is deviating from the moving average often enough, and the amplitude of these deviations is much greater than the magnitude of average value’s changes. Therefore, the spread is, of course, a good candidate for pair trading.
ETF-funds of energy sector stocks and, strangely, South Korean stock market. At a first thought, there can be absolutely no connection between those, yet, the oscillations are stable over a period greater than two years already.
Energy sector shares fund and the emerging markets ETF.
Here, there is definitely some relation - energy companies often have production rigs \ platforms located in developing countries, moreover, are often dominant employers in some regions, exerting a strong influence on the countries’ economies.
Already familiar to us energy sector ETF against Mexican markets ETF fund here.
Emerging markets and Pacific region, excluding Japan.
These combinations were picked from a small set of ETF-funds using SpreadBuilder software, more information about it will be presented in the next paragraph.
Taking the above information into account, it is clear that the most important element of pair trading is picking the right pair to trade. Let’s examine this, often not easy and simple, task, in detail.
One can choose pairs on his own: based on fundamental information, selecting stocks from one sector and hand picking their weights, evaluating the quality of the resulting spread by eye. For those eager to experiment with hand-picking assets and weights - you can use our Spread Charts web service allowing to “build” a spread of two or more instruments online. However, as securities belonging to the same sector are often counted in tens or even hundreds, checking all of the possible combinations by hand proves ineffective and sometimes just physically impossible, because the number of combinations will surely exceed tens of thousands, which is definitely a lot. Therefore, it is rational to employ specialized web services or software for this task. The options are:
1. You can use the financial instruments’ correlation phenomenon for promising pairs pre-selection. The correlation (meaning Pearson correlation coefficient) measures the strength of linear relationship between two distinct time series. Values of this parameter lie in the range from -1 (-100%) 1 (100%). The closer the value lies to 1 (100%), the stronger the relationship between the values is, and, vice versa, the closer to 0, the weaker, or even non-existent, connection. High correlation implies some relation between the instruments, which means that there is a good chance of spread between these instruments being quite stationary and suitable for pair trading. Using the pre-calculated correlation coefficients between financial instruments can significantly reduce the time spent searching for pair combinations. On our Correlation page, you can find an informative real-time table including financial instruments’ correlations shown pairwise, on different timeframes. With this table, “promising” pair combinations are easy to spot, which can then be analysed manually to pick the weights and assess their suitability for pair trading.
2. For those not willing to search for the combinations semi-automatically and pick weights manually, we’ve developed a unique web service, Pair matching, made to solve this problem once and for all. Simply select financial instruments from the list and the web service will automatically find all the pair combinations which they can participate in, will pick the optimal weights and sort the results by their suitability for pair trading. So, you will get a ready-made list of pairs with spread charts and weight formula. The only thing remaining is to choose several pairs to your liking and start trading.
3. The most effective, may we say so, way is using SpreadBuilder software that can pick not only pair combinations, but also more complex ones: spreads consisting of three, four or more instruments. SpreadBuilder imports data directly from the terminal used for trading, and will automatically search for the most suitable combination. The resulting list of best spreads is presented with charts and calculation/weight formulas. A big advantage of using SpreadBuilder comes from it being able, apart from picking spreads, to generate ready-to-trade systems in the form of Megatrader projects, that can immediately be loaded into the former and launched.
So, let’s assume: a pair is picked, the weights are optimal - only trading remains to be performed. There are two basic approaches: algorithmic and intuitive. Intuitive approach is essentially manual trading, based on visual analysis of the spread chart. We will not cover this approach in detail here, only noting that, in spite of all the disadvantages of discretional trading, the fact that the spread has a higher stationary and predictability compared to “common” instruments helps in analysing it a lot.
Algorithmic approach - automatic trading using a trading robot following a programmed algorithm. A very simple example of algotrading strategy was already discussed above - trading on deviation from the moving average. The strategy itself is very simple - a moving average with a big period is applied to the spread, representing the mean value spread tends to “return” to. The remaining tasks are choosing the deviation levels from the mean, both up and down, at which the position will be opened, and closing the position on returning to the mean.
Now we will demonstrate the performance of this strategy using MegaTrader on the IXC-EEM spread:
As can be seen, even about half a year yields 36 trades, 35 of which, or 97%, are closed at a profit. We used the deviation of 0.2 points to open a mean reversal position for both sides. It can be made more “adaptive” by changing the deviation depending on current market volatility, or by using Bollinger Bands.
Pair trading, like any other trading strategy except pure arbitrage, is subject to risks. Despite the fact that these risks are less evident and “dangerous” than in case of trading “common” instruments, they do exist and should be taken into account. Among the main risks are:
It’s impossible to completely avoid these risks, but they can be substantially reduced and offset through diversification. A simple yet effective way to diversify in pair trading is trading several pairs simultaneously, allowing for significantly increasing the stability of equity growth and reducing the overall portfolio risk. In this case, even if some pair changes its dynamics and is not going to return to the mean, the others compensate for this loss.
Pair trading has many advantages, but one of the most important, perhaps, is its mathematic “validity”, allowing it to stand out from thousands of “traditional” strategies flooding the Internet. However, the “dark side” of this advantage is the need to perform a couple of actions (although nothing too hard as the article shows) and do some math to choose potentially profitable pairs and open positions. For above reasons pair trading was originally only available to investment funds and large institutional investors. But now, thanks to the progress in IT and software development in particular, pair trading is available to anyone.
Our website has a plethora of tools to offer for a pair trader: excellent web services, Correlation, Spread Charts and Pair matching, and some innovative software, namely Megatrader and SpreadBuilder, allowing one to use and automate any pair and spread trading strategies.