Knowledge · Strategies · Pairs Trading / Statistical Arbitrage

Pairs Trading / Statistical Arbitrage

Morgan Stanley quant team around Nunzio Tartaglia (1980s); academically documented by Gatev, Goetzmann, Rouwenhorst (2006)
Market Neutral Evidence: Strong swing equitiesetfscrypto
7/10
Relevance for Botty
Two cointegrated assets: long the undervalued one, short the overvalued one. Profit from mean reversion of the spread. Market-neutral.
Two assets whose prices are historically cointegrated (move in sync over the long run, with outliers) offer statistical arbitrage: when the spread deviates far from its mean, short the expensive one, long the cheap one, and wait for reversion. Market-neutral — immune to broad market moves.
Relevance Score 7/10
Hyperliquid offers many perp markets. The BTC/ETH spread, the ETH/SOL spread, or correlated layer-1 pairs would be natural candidates. Botty's current architecture (3 isolated wallets for single-asset) does not fit directly — it needs a multi-leg trading module. Potentially a highly relevant upgrade.

Entry

  • Phase 1 (identification): test pair candidates for cointegration (Engle-Granger, Johansen test)
  • Compute spread = log(A) - β × log(B), normalized as a z-score
  • Entry: spread z-score > +2 → short A, long B (equal dollar weights)
  • Entry: spread z-score < -2 → long A, short B

Exit

  • Z-score crosses back through 0 (or 0.2) → exit
  • Time stop: hold at most 60 days (guards against regime breaks)
  • Stop-loss: z-score > ±3.5 → the pair has decointegrated, realize the loss
NameTyp. valueDescription
entry_z 2.0 Opening threshold
exit_z 0.0 to 0.2 Closing threshold
stop_z 3.5 Stop on regime break
lookback 60-120 days Window for β and spread stats

Pros

  • Market-neutral — performance independent of BTC direction
  • Well-documented academic evidence since 2006
  • Lower volatility than directional strategies
  • Diversifies well across many pairs

Cons

  • Pair selection is everything — bad pairs ruin it all
  • Cointegration can break suddenly (regime change, news event)
  • Execution-sensitive: slippage on two assets × entry+exit
  • Crowded on US equities since 2010 — margins have eroded
cagr
~10-16% annualized
notes
Historical Gatev study: ~12%/year 1962-2002 on US stocks. In crypto: 16% CAGR at ~1.0 Sharpe on cointegrated pairs (e.g. ETC/FIL, LINK/MATIC).
sharpe
~1.0-1.5 with careful pair selection
max drawdown
~15-20%
market correlation
~0
Excellent — fully automatable; requires infrastructure for simultaneous multi-asset orders.

Core idea

Two stocks or coins that are fundamentally similar (e.g. BTC and ETH, or Coca-Cola and Pepsi) mostly move in parallel — but not exactly. Short-term divergences are normal and mean-reverting: when BTC runs much stronger than ETH, arbitrageurs typically bring ETH back up in relative terms.

The statistical test for this is cointegration (not simply correlation!). Two time series are cointegrated if a linear combination of them behaves stationary — i.e. has a stable mean it keeps returning to.

The math

  1. Pick two candidates A, B
  2. Estimate β via OLS: log(A) = α + β × log(B) + ε
  3. Test whether ε is stationary (Augmented Dickey-Fuller or Engle-Granger)
  4. If yes → the pair is tradable
  5. Live: compute spread_t = log(A_t) - β × log(B_t), z-standardize over a rolling window

Trade rules

z > +2.0:   Short A, Long B  (A is expensive relative to B)
z < -2.0:   Long A, Short B  (A is cheap relative to B)
|z| < 0.2:  close position
|z| > 3.5:  stop — pair has decointegrated

Enter in equal dollar amounts so the portfolio stays market-neutral.

Evidence

Original Gatev study (1962-2002 on US stocks): a simple pairs-trading strategy earned ~12% per year with low market correlation.

Modern crypto applications (2024 research): cointegrated altcoin pairs (ETC/FIL, LINK/MATIC) delivered ~16% CAGR at ~1.0 Sharpe, profit factor ~3.7. Currently works better in crypto than in equities because it is less crowded.

Risks

  • Cointegration break: if a coin fundamentally diverges from its pair partner (delisting, hack, protocol change), the assumption breaks. Hence the hard stop at z > 3.5.
  • Correlation spikes in crises: all cryptos fall at once — pair trades can still work, but slippage becomes extreme.
  • Execution: executing both legs simultaneously is essential — Hyperliquid has good order-book depth, but the time windows are small.

Relevance for Botty

High, but architecturally demanding. Botty's current 'one wallet per strategy' architecture would need to be adapted for pair trading — a pair trade requires coordinated execution of two position legs. Candidate pairs on Hyperliquid:

  • BTC/ETH: very stably cointegrated, low margins (crowded)
  • ETH/SOL: medium, higher margins
  • Layer-1 basket pairs: SOL/AVAX, BNB/TRX, etc.

Would be an entirely new module, but with real alpha potential.