Lab · Pairs trading
Pairs trading
Pairs trading compares every pair, so it uses your first 8 assets.
Example: assets that often move together: SPY and VOO (both track the S&P 500), XOM and CVX (oil majors), KO and PEP (soft drinks). Your portfolio is unchanged.
Funds tracking the same index always pair; industry rivals pass some days and not others. That's the test working, not breaking.
None of your assets move together closely enough to trade as a pair (p < 0.05). Pairs usually come from the same industry, such as two banks or two oil majors.
-
- z-score
- Hedge ratio
- p-value
Show the maths
Prices as of . Each pair gets an Engle-Granger cointegration test on one year of daily closes, lined up on shared trading days. Pairs with p < 0.05 are shown.
The spread is A − (α + β·B), where β (the hedge ratio) comes from an ordinary least squares fit of A on B. The z-score is today's spread minus its mean, divided by its standard deviation. |z| above 2 suggests trading the spread back towards its mean; 1 to 2 means watch it.
Testing many pairs means about 1 in 20 will pass by chance. Treat this as a shortlist to research, not a trade.
QuantLab is an educational tool, not investment advice. Past performance does not predict future results. Terms · Privacy ·