Last update on .

If you're planning on pair trading, it's important that you have at least a general understanding of the statistics that are used. This article gives an overview of some of the key statistics used in pair trading and what to look for when analyzing them.

### Overview

This article is the third in a multi-part series on pair trading. If you're new to pair trading, we suggest you read the first two articles in this series before continuing with this one. The prior articles explain the basics of what pair trading is and the difference between correlation and cointegration. Article 1 is here. Article 2 is here.

This article is not meant to be an depth analysis of the statistics used for pair trading but is rather aimed at traders and investors who want enough of an understanding of the key concepts to be able to apply them in their own trading. All of the statistics discussed are computed automatically for users of our pair analysis platform.

For each statistic we first provide a definition and overview of the concept before providing a practical application of it.

### Cointegration

First and foremost when dealing with pair trading we are looking for pairs that are cointegrated. Cointegration as discussed in the prior article, is an indication of stationarity. Said another way, a pair of stocks is said to be cointegrated if the spread between them is stationary.

For the spread to be stationary, the mean and standard deviation need to be constant over time. In other words, at any point in time the current value of the spread can be drawn from the same probability distribution.

### P-Value

The p-value provides a way to test for cointegration. P values are used to determine the statistical significance of a hypothesis test. The hypothesis in this case is determining if a pair of stocks is cointegrated.

Typically you're going to want a p-value of less than 0.05. Anything above that is typically not good enough to qualify for pair trading.

### Test Statistic

The test statistic and the p-value go hand in hand. When calculating a test statistic, you're generally trying to find evidence of a significant difference between population means or between the population mean and a hypothesized value.

In terms of stock pairs, the test statistic measures the size of the difference relative to the variation in the spread data. Once you have a test statistic, you need to compare it in relation to the critical values (discussed next).

### Critical Values

Critical values are essentially cut-off values for specific confidence levels. For example we provide confidence levels of 1%, 5% and 10% in our pair analysis platform. Depending on the confidence level that you're looking at, the goal for a cointegrated pair is to have a test statistic lower than the critical value associated with that confidence level.

The critical values and test statistic provide us with the level of confidence as to whether or not a stock pair is in fact cointegrated. For example in the following screenshot we have a test statistic that is lower than the critical value at the 10% confidence level. However it is higher than the 5% and 1% critical values. Typically you're going to want a test statistic that is lower than the critical value at the 5% confidence level. In practical terms, if you were analyzing two stocks that produced the above results, you would typically not trade this pair.

### Hedge Ratio

The hedge ratio (also known as beta) is calculated by performing an ordinary least squares regression on the spread data. The hedge ratio provides the ratio of shares necessary to produce a cointegrated and therefore stationary pair.

In practical terms, we are always trading stocks that have different prices and volatility. If we find a pair that is cointegrated and looks to be a good candidate for pair trading, it would be inaccurate to simply enter equal position sizes in both stocks. In other words, short 50 shares of stock A and long 50 shares of stock B.

The reason for this is that based on the attributes of the spread and cointegration analysis, the pair would only be cointegrated if a specific ratio of shares is used. If you simply enter the same position sizes in both shares, then you are no longer trading a pair that is cointegrated in the true sense of the term.

For example, if a hedge ratio of 2.5 is computed that means that each share of stock A should be combined with 2.5 shares of stock B. If you decide to enter 100 shares of stock A, then you would need to offset that with 250 shares of stock B.

### Half Life

Half life indicates how long the spread typically takes to revert back to the mean. A half life of 10 days for example indicates that this pair typically takes 10 days to revert.

Generally speaking, you would look to stay in a pair trade until one of the following happens:

• Your profit targets are reached
• The spread has reverted back to the mean
• You've been in the trade for the period of the half life (even if you haven't reached your profit target or stop loss)
• You reach your stop loss

### Z-Score

The Z-score is the number of standard deviations that the pair ratio has diverged from its mean. For a pair that is cointegrated, you will typically see the z-score bounce around 0 as per the following screenshot: The z-score is often used in trading strategies for entry and exit signals. We discuss one such strategy in a future article in this series.

### Pair Stress

The stress indicator was originally developed by Perry Kaufman who is well known in the professional algorithmic trading space. We provide users with the stress indicator as a way to easily see when a pairs spread has reached an extreme and to create pair trading strategies around that information.

As per the below screenshot, the chart displays the stochastic value of two stocks over time with the difference between them shaded in grey. The stress indicator goes up when the spread between the two stocks reaches an extreme. Along with the z-score discussed above, real pair trading strategies using the stress indicator are discussed in future articles in this series. ### Final Thoughts

Pair trading can be overwhelming at first due to the statistics involved. However with a basic understanding of them along with tools that calculate everything for you, pair trading can be an excellent addition to your portfolio.

Pair trading provides a unique way to profit in markets regardless of overall direction. This means you can profit if the market goes up, down or simply stays in a range.

Future articles in this series discuss actual trading strategies that use the z-score and stress indicator. The final article wraps everything up with a beginning to end process for pair trading which includes how to find opportunities, managing watch lists, entering trades and when to exit them.