Sunday, February 28, 2010

Pairs Trading: How I will trade this strategy

If you don’t know any thing about pairs trading, read this article: A Basic Introduction to Pairs Trading

For those who like to play with Excel along with a good explanation of pairs trading, Click here.

I want to choose pairs from S&P 500 stocks, all possible pairs are 250*501 = 125250 pairs.

I like to use different formula to measure correlation between stocks. I use “Rank correlation” (similar to Spearman Rank Correlation) and “Price Behavior correlation to do the job.

If the pairs meet:

The Rank correlation is > 0.6, and
The Price Behavior correlation is also>0.6

Then the pairs become the candidate for pairs trading. I run thru 125250 pairs, and found that only over 300 pairs met my correlation conditions. Interestingly enough, the most pairs are in the same industry /sector.


The entry rule:

The ratio of the pairs is deviated more than 2 standard deviations from the mean.

The exit rule:

              It hit the stop loss point, or when the ratio reverts to the mean of the ratio.

Let’s look at some of examples:


The above figure shows 400 days of TIE and NBR close price. I use 200 days as sliding/rolling window, I can calculate the last 200 days correlations:


You can see at Day 40, it uses previous 200 days data, the Rank Correlation was actually negative. Our entry rule says only when both the rank correlation and price behavior correlation are > 0.6, so the pair at Day 40 will NOT show up in my candidate list. However Day 110, both correlation are >0.6, so it shows up in my candidate list. When the pairs are correlated, it is shown as “green circles” in the following figure:


The above figure is the price ratio between NBR and TIE, the GREEN horizontal bars are actually consist of green circles, they indicated the period when both rank correlation and price behavior correlation are greater than 0.6.

The ratio extended over 2 standard deviations at Day 118, at that time the ratio went to 2.5065; NBR at $21.08, TIE at $8.41. Because it was over the 2 standard deviation, we would sell the pairs, meaning, selling NBR and buying TIE. Assume I use $10000 for each stocks, I would do the following:

Sold short 447 shares of NBR at $21.08;
Bought 1189 shares of TIE at $8.41;

On Day 135, the ratio fall to 1.9910 below the mean (2.0033), so we would close the trade:

Bought back 447 shares of NBR at $19.83 with profit of $558
Sold 1189 shares of TIE at $9.96 with profit of $1843

Total profit: $2401 (from Day 118 open positions to Day 135 close the positions)

Another example:




In Summary:

(1)                       The correlation of the pairs is consistently changing. Most people believe KO and PEP are always correlated. This is simply not the case if using my correlation method.
(2)                       If the correlation is too high, then we cannot take advantage of doing pairs trading.
(3)                       We have to patiently wait for best opportunity for pairs trading, signals are hard to find for many pairs, thus I will monitor pairs among S&P500 stocks.
(4)                       Pairs trading is a market neutral strategy, I will only allocate 20% of capital to do pairs trading.

This list of candidates will be updated weekly. However, the pairs will be checked daily for the ratio to see if the ratio is reached 2 standard deviations. The correlations and ratio mean and standard deviation calculation are based on the rolling previous 200 days.

Check my blog for weekly pairs trading candidate list;
Check my blog for daily pairs trading signal list;
blog comments powered by Disqus

My Favorite Books