Borrowing it
Nothing to install: this file belongs to heurist-network/heurist-finance. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/heurist-network/heurist-finance/main/.claude/skills/pairs-relative-value/SKILL.mdgit clone --depth 1 https://github.com/heurist-network/heurist-financeWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/heurist-network/heurist-finance/pairs-relative-value)<a href="https://agentmods.dev/skills/heurist-network/heurist-finance/pairs-relative-value"><img src="https://agentmods.dev/badge/skills/heurist-network/heurist-finance/pairs-relative-value/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/heurist-network/heurist-finance/pairs-relative-value"><img src="https://agentmods.dev/badge/skills/heurist-network/heurist-finance/pairs-relative-value.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00076 | $0.01230 |
| Opus 5.5 | $0.00030 | $0.00492 |
| Sonnet 5.5 | $0.00015 | $0.00246 |
| Haiku 4.5 | $0.00008 | $0.00123 |
Grade A, and why
pairs-relative-value scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 13d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 36 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Pairs & Relative Value
Shared plumbing and output contract: ../_shared/analyst-core.md. A pair converts a market-direction bet into a relationship bet. That removes beta and adds two new ways to lose: the relationship breaks, or it mean-reverts slower than the capital can wait. Both are testable before entry — so test them.
Qualify the pair (compute, don't assert)
Pull both legs: hf_tool.py prices A B --period 3y --out FILE, then a Python block for the statistics. The gates, in order:
- Economic linkage first. Same demand driver, same input costs, or substitute products — stated in one sentence. Data-mined pairs with no economic reason are the ones that break. (KO/PEP yes; "these two cointegrated in-sample" no.)
- Cointegration, not correlation. Correlation 0.9 says they wiggle together; cointegration says the spread is stationary — only the second supports mean-reversion trading. Engle–Granger on log prices (regress, ADF-test the residual) over a ~3y lookback, demand p < 0.05 — and require sub-sample stability: re-run on each half of the window and the most recent year; a pair that only cointegrates over the full window is regime-dependent, treat it as failed. High correlation with failed cointegration = trending spread = the classic slow bleed. Failed cointegration with a real economic link and a directional relative view downgrades to the fallback structure: a return-beta-hedged overlay (hedge ratio from a return regression), traded as directional relative value on a thesis falsifier — no bands, no mean-reversion logic, and say it's not a pair.
- Half-life of the spread (fit OU / AR(1) on the residual: half-life = −ln(2)/ln(φ)). Reject > ~30 trading days — beyond that, capital lock-up and break risk dominate the convergence P&L, and it exceeds the user's multi-week horizon anyway. 5–20 days is the sweet spot.
- Hedge ratio from the cointegrating regression (not 1:1 shares, not equal dollars unless β≈1): position legs so the traded unit is the stationary spread. Then check residual beta — sector-neutral pairing (both legs same sector) removes ~60% of market beta by construction; cross-sector "pairs" are usually a hidden factor bet (long tech / short energy is a rates trade wearing a pairs costume — say so).
- Short-leg reality check: borrow availability and fee (
equity_overview, short-interest context viaequity_screen screen_name=most_shorted_stocks). A pair whose short leg is > 10–15% borrow fee or squeeze-listed has asymmetric blow-up risk — the short leg gets recalled precisely when it's ripping.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 13d ago First seen · 36 lines · 76 tokens per session scan A de6f2fffa569
pairs-relative-value is a skill published in the GitHub repository heurist-network/heurist-finance (11 stars, last pushed 14d ago), licensed MIT. It adds 76 tokens to every session and 1,230 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-24.
pairs-relative-value compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| pairs-relative-valueheurist-network/heurist-finance | Skill | 11 | 14d ago | MIT | A | 76 | Claude Code |
| sector-rotationHKUDS/Vibe-Trading | Skill | 38k | yesterday | MIT | A | 39 | Claude Code, Codex |
| twitter-readerhimself65/finance-skills | Skill | 3.5k | 2d ago | MIT | A | 110 | Claude Code |
| strategy-pivot-designertradermonty/claude-trading-skills | Skill | 3.7k | 2d ago | MIT | A | 28 | Claude Code, Codex |
| energy-procurementhashgraph-online/awesome-codex-plugins | Skill | 1.5k | yesterday | Apache-2.0 | A | 93 | Claude Code, Codex |
| airdrop-hunting-guidenirholas/three.ws | Skill | 269 | yesterday | Apache-2.0 | A | 54 | Claude Code, Codex |
| multi-expert-analyzerdigoal/blog | Skill | 8.6k | 2d ago | GPL-2.0 | A | 292 | Codex |