pairs-scannerlisted
Install: claude install-skill rgourley/quant-garage
# pairs-scanner
You hand over a basket of tickers. The skill tests every pair for
cointegration, estimates the historical tempo of mean reversion, and
flags pairs where the spread is currently wide enough to trade.
This is a screen, not a strategy. It tells you which pairs are worth
looking at, with the statistics that back the claim: hedge ratio,
Engle-Granger t-stat, OU half-life, current z-score, and an
out-of-sample stability read. The trader decides sizing, execution,
and stop rules from there.
## When to invoke
- A stat-arb desk with a 5-30 name sector basket asks "which pairs
are cointegrated and currently wide"
- A PM building a pairs book wants to see the hedge ratio and
mean-reversion tempo before committing
- The user says "run a pairs scan", "find cointegrated pairs",
"test pair X-Y for mean reversion", "which of these are tethered"
- Follow-up work after `sector-rotation-signal` narrows to a single
sector and you want the within-sector pairs read
Not for: universe-wide screens (this is O(n²); a 100-name basket is
4,950 pairs, too many to eyeball). Not for high-frequency pairs (this
uses daily closes; intraday cointegration needs tick data).
## What you need
- A basket of tickers (`--basket`, required, comma-separated)
- `MASSIVE_API_KEY` exported in the environment
- Stocks Starter plan minimum (unlimited REST for daily aggs)
Optional:
- `--lookback-days` (default 252): trading-day window for the fit
- `--min-correlation` (default 0.6): |Pearson