← Projects·Quantitative Researcher

Pairs Trading via Cointegration (BTC / ETH)

A cointegration study on BTC / ETH: the most-traded pair in crypto, and the most obvious candidate for mean-reversion. The ADF test is honest about it.

−2.11
ADF test statistic
fail to reject unit root at 5%
208 days
Half-life (estimated)
≈ 0
OOS Sharpe (fade)
as the test predicted
Status
open-source

The hypothesis

BTC and ETH move together. If they are cointegrated, a stationary spread should mean-revert — a textbook stat-arb entry.

What the project does

  • Pulls BTC/ETH daily prices.
  • Estimates a hedge ratio by OLS.
  • Runs an Augmented Dickey-Fuller test on the spread (implemented from scratch, no statsmodels).
  • Estimates the half-life of mean-reversion from an AR(1) on the spread.
  • Fades the spread OOS; applies a 5 bps/side cost.

The result

ADF test statistic vs critical values — fail to reject unit root
CV 1% (−2.57)-1.95CV 5% (−2.86)-1.95ADF stat-2.11CV 10% (−3.43)-1.62
Spread ADF = −2.11 sits *less negative* than the 5% critical value (≈ −2.86) and even the 10% line. Cannot reject H₀: spread has a unit root. The cointegration hypothesis fails — by construction, no stat-arb trade is warranted.
  • ADF test statistic: −2.11 — fails to reject the unit-root hypothesis at the 5% level. The spread is not stationary.
  • Half-life: 208 days — too slow to be a trade.
  • The OOS fade produces ≈ 0 Sharpe net of cost — and that is the correct answer, given the test.

What’s transferable

Stat-arb begins with the cointegration test, not with the trade. A pre-trade ADF regime filter is the single largest quality lift on a pairs/mean-reversion pipeline.

Want to see this project in your stack?

Every project is runnable in one command. The scorecard is the contract.