liveBook · Manning

Pair trading

As explained in Investing for Programmers

Pair trading is a market-neutral investment strategy that takes a long position in one asset and a short position in another to profit from their relative price movements.

Pair trading offsets market exposure by going long on one asset and short on another, usually within the same industry or among correlated assets. It seeks profit from relative performance rather than market direction. section 7.4.3

A relative-performance trade

Buy $100 of Company A, which has stronger growth potential, and short $100 of Company B, which is slowing. If A rises more than B, the difference can produce a gain. If both decline, B’s short-side gain may offset A’s loss. Interest on the short position and an incorrect forecast can still turn the trade into a loss. section 7.4.3

Evaluate the trade with these checks:

  • Compare the assets’ relative price movements rather than assuming the whole market will rise. section 7.4.3
  • Include short-selling interest costs and test the downside if the long asset falls while the short asset rises. section 7.4.3
  • Treat correlation as a risk input, not a guarantee that paired assets will continue moving together. section 7.7
Figure 7.5 The investors are long on A and short on B. In the bull case, the long position increases more than the short position, and the long gain minus the short loss is the profit. In a bear case, the short position loses more than the long position. The profit is the gain from the short position minus the loss in the long position.
figure

Compare the long gain with the short-side loss across bull and bear cases. section 7.4.3

How Investing for Programmers covers it

How deep it goes
Defines the position structure and illustrates payoff scenarios, but stops short of implementation, statistical testing, or automation.
Examples
Uses paired AI-sector companies, a $100 long position, a $100 short position, and bull-market and market-crash scenarios.
What you can do after
Evaluate relative-position outcomes while accounting for short-selling costs, market scenarios, and forecast error.
How it connects
Connects pair trading with correlation, hedging, diversification, short selling, and risk management.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Investing for Programmers. The section links point to the parts of the book it draws on.