Pair trading methods
The distance method
Two price paths that have stayed close for several months can be a starting point for finding a pair. The distance method measures that proximity over a defined period.
September 10, 2026
The calculation
Normalize each series to 1 at the start of the period: N(A,t) = P(A,t) / P(A,0). SSD distance is the sum of squared differences between the normalized series. Prices must be adjusted for corporate actions and compared on the same dates.
SSD = Σ [N(A,t) − N(B,t)]²
A numerical example
These values are fictional. The first asset goes from 100 to 104, then 103. The second goes from 50 to 51, then stays at 51. After normalization, the distance is 0² + 0.02² + 0.01² = 0.0005.
| Session | Asset A | Asset B | Squared gap |
|---|---|---|---|
| 0 | 1.00 | 1.00 | 0.0000 |
| 1 | 1.04 | 1.02 | 0.0004 |
| 2 | 1.03 | 1.02 | 0.0001 |
Reading the result
A lower distance means the price paths were closer over the selected period. There is no SSD threshold that works across all markets. The score depends on the number of observations and the normalization date, among other things: only pairs measured with the same protocol can be compared directly.
How the trade can generate a profit
Historical distance is used to select the pair. The trader then waits for the current gap between the normalized price paths to exceed a threshold set in advance. They buy the asset that has lagged and sell short the one that has moved ahead, aiming for the paths to move closer together.
Fictional example: consider two companies in the same market. A costs $100 and B costs $50. Later, A reaches $110 while B stays at $50: A has risen 10%, while B is unchanged. This difference is a statistical anomaly because these two stocks normally move together. The trader anticipates a return to normal and sells short 10 shares of A at $110 and buys 22 shares of B at $50, giving each leg a value of $1,100.
If A falls to $105 and B rises to $52.50, both assets are now 5% above their initial prices. The trader closes both positions: buying back A for less earns $50, and selling B for more earns $55. The total profit is $105 before fees, stock borrowing costs and any dividends owed on the short position.
The gap can also keep widening and cause a loss. Before entering, the trader therefore sets a convergence target, a loss limit and a maximum holding period. A low historical distance alone does not ensure a profitable trade.
Preparing a simulation
The period used to select pairs must come before the period used to test trades. Parameters are then frozen for that test period. Selecting pairs using the entire period and simulating trades at its start would introduce future information.
What cointegration adds
Distance describes the proximity of normalized price paths. A cointegration test examines the stationarity of a combination of log prices, with an estimated hedge coefficient. These criteria answer different questions. A low distance alone does not validate a mean-reverting relationship.
In PairScanner
Pair detail charts let you compare paths normalized to 100. The scanner uses correlation for its shortlist, then calculates cointegration and the spread Z-score. This guide explains the distance method; the table does not enable an SSD ranking or a trade signal based on it.
Reference: Gatev, Goetzmann and Rouwenhorst, NBER Working Paper 7032 (1999). Their study matches stocks by minimum distance between normalized historical price paths. NBER.
Educational content. No investment advice. Relationships between assets can change, and trading involves a risk of loss.