What Is Pairs trading?
Pairs trading buys one instrument and shorts a related one when their prices diverge, seeking to profit as the gap closes. Suppose one share of A usually trades near twice the price of B. With A at 105 and B at 50, a trader shorts one A and buys two B. If A reaches 106 and B reaches 53, the spread falls from 5 to zero and the trade gains 5 before fees and borrow costs. A change in the relationship can leave a widening loss on both legs combined.
Gatev, Goetzmann and Rouwenhorst matched stocks by the historical distance between normalised prices. Other methods use cointegration to estimate a hedge ratio. See Pairs Trading: Performance of a Relative-Value Arbitrage Rule.
For a worked cryptocurrency example, Leung and Nguyen estimate cointegrating portfolios and use deviations from the estimated relationship as entry signals. See Constructing Cointegrated Cryptocurrency Portfolios for Statistical Arbitrage.