What is the best way to begin calculations for pairs trading? I have seen two ways:

1) Start from the price ratio StockAPrice/StockBPrice and calculate mean, standard deviation and z-score from a times series of that.

2) Start with the spread calculated as StockAPrice-StockBPrice*Hedge ratio (where hedge ratio is just the beta of the regression). You then purchase x shares of stockA an short x*hedge ratio of stock B, for example.

What is the right way to do it? If #1 is acceptable, how do you incorporate hedge ratio in that?

It depends on if you are trying to do a Dollar neutral hedge or a beta neutral hedge.

Method 1 is a Dollar neutral hedge and Method 2 is the Beta neutral hedge ratio.

Remember that even if you find a cointegrated pair, share A can have a higher beta than share B.

• Hi Jacques Joubert, welcome to Quant.SE! Jan 29, 2016 at 13:12
• Hi @BobJansen, Thank you very much. Lots of good questions here :) Apr 5, 2019 at 14:30

The first method is dollar neutral and the second one is based on the relationship of price movement between two assets.

For the first method of dollar neutral

Let's say you want to keep the amount invested in stock A and stock B same. Then, simply divide \$1000 with the price of A and B. The number you get is the number of shares of A and B you need to buy/sell to make the pair dollar neutral.

For the second method, you need to find the relationship between two stocks A and B. Use that to calculate the spread. For example, the spread can be formed as 1 * stock A - slope * stock B. Where the slope of the line resulting from regressing A and b prices becomes the number of shares of stock b to buy for every 1 share of stock A.

It's worth noting that once you take a position in a pair-trade the subsequent change in the ratio does not always equate to the same change in your P&L. It depends on whether you are winning/losing on the long position or the short position. Specifically, while the ratio will change commensurately with a change in your long position, it will not change commensurately for changes in your short position. For winning short positions the change in the ratio overstates the winnings, and for losing short positions the change in the ratio understates the losses. As such, you can't set your take-profit and stop-loss levels at percent changes in the ratio. Example follows:

Long StockA @ 100 Short StockB @ 100 Ratio = 1

Long StockA now 120 Short StockB now 100 Ratio = 1.2

We can see that a 20% increase in the long stock equates to a 20% increase in the ratio. Great.

Long StockA @ 100 Short StockB @ 100 Ratio = 1

Long StockA now 100 Short StockB now 80 Ratio = 1.25

We can see that a 20% fall in the short stock equates to a 25% increase in the ratio. Ratio has overstated the win.

Long StockA @ 100 Short StockB @ 100 Ratio = 1

Long StockA now 100 Short StockB now 120 Ratio = 0.83

We can see that a 20% increase in the short stock equates to a 16.6% decrease in the ratio. Ratio has understated the loss.

• I am just switching from individual contracts to spreads and noticed this same problem. What is the solution to this? Unlike single securities where I can define my risk easily by looking at the difference between the entry price and stop price, this does not seem to be the case with spreads. Is there a way to do defined risk trades on ratio spreads? Nov 30, 2020 at 18:45