1. Find Cointegration
Two stocks "move together" structurally — common business model, sector, customer base. Engle-Granger test gives a p-value; below 0.05 = statistically cointegrated.
2. Compute Spread Z-Score
Z = (current spread − mean spread) / stdev. |Z| > 2 means the pair has diverged into actionable territory. Mean reversion is the bet.
3. Trade Dollar-Neutral
Long the underperforming leg, short the outperformer, equal dollar amounts. Profit when the spread reverts. Half-life tells you the expected holding period.