Detects crowded speculative positioning in CFTC futures markets using COT report data and Jason Shapiro's methodology. Screens 65 markets for large-speculator net positioning extremes via FMP API.
Ships in tradermonty-claude-trading-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Implements step 1 of Jason Shapiro's COT (Commitment of Traders) contrarian process: detect when large speculators are crowded into one side of a futures market. Crowded positioning is a precondition for a contrarian trade, not a trade signal — a market only becomes tradable once crowding is confirmed by a news failure and price-action reversal (steps 2-3), which this skill guides the user through manually.
Core thesis (Shapiro): Large speculators (hedge funds, CTAs, momentum traders) tend to be maximally positioned at trend exhaustion, not trend inception. When they are already crowded onto one side, the next big move is statistically more likely to run them over than to reward them further. Fade the speculators, not the commercials (commercials hedge for structural reasons and are not a crowd-psychology signal).
English:
Japanese:
Do NOT use when:
FMP_API_KEY environment variable or pass
--api-key. COT endpoints require an FMP Premium+ plan — a free-tier
key will not have access.requests installed.--core, up to ~65 for the
full universe), plus one call for the market list when neither --symbols
nor --core is given.# Curated core futures universe (23 liquid/representative markets)
python3 skills/cot-contrarian-detector/scripts/screen_cot_crowding.py --core --output-dir reports/
# Explicit symbols
python3 skills/cot-contrarian-detector/scripts/screen_cot_crowding.py --symbols "ES,GC,CL" --output-dir reports/
# Full universe (all ~65 markets FMP's COT list covers)
python3 skills/cot-contrarian-detector/scripts/screen_cot_crowding.py --output-dir reports/
The script fetches each market's weekly legacy COT report (large-speculator long/short positions), computes a 156-week (3-year) and 26-week COT Index per market, and classifies extremes:
CROWDED_LONG — COT Index >= 90 (near the 3-year net-long high)CROWDED_SHORT — COT Index <= 10 (near the 3-year net-short high)NEUTRAL — everything in betweenMarkets with insufficient history to compute the index are never silently
dropped — they appear in a skipped list with the reason (e.g. "insufficient
history: 40/156 weeks").
Present the generated Markdown report, highlighting:
CROWDED_LONG / CROWDED_SHORT and by how muchFor any CROWDED_LONG / CROWDED_SHORT market the user wants to pursue,
load references/shapiro-methodology.md and walk through the remaining
steps — these are not automated:
position-sizer skill).Never recommend an entry from crowding alone — steps 2 and 3 must both confirm first.
reports/cot_crowding_<as-of-date>.json — machine-readable, with
a run_context block (schema_version, params, universe, data_date) plus
markets (ranked results) and skipped (never silently dropped). A top-level
data_provenance block records actual UTC retrieval time, conservative market
vintage and unverified quality flags. See references/output-contract.md
for the schema and the explicit all-skipped/no-observations case.reports/cot_crowding_<as-of-date>.md — human-readable
report with Crowded Long / Crowded Short / Full Ranking / Week-over-Week
Swings / Skipped Markets / Methodology sections.CFTC publishes the COT report Fridays ~3:30pm ET, with positions as of the prior Tuesday — data is always 3+ days old by the time it's published, and up to 9 days old by the following Friday. Run this skill:
references/shapiro-methodology.md also confirming.references/shapiro-methodology.mdThe full 5-step process (crowding → news failure → price action → entry → exit), why speculators (not commercials) are the fade target, the 3-day publication lag caveat, and a table of what this skill automates vs. what stays manual. Load this whenever guiding a user past step 1.
references/cot-index-calculation.mdThe COT Index formula, lookback rationale (156w primary / 26w context),
extreme threshold sensitivity, open-interest normalization rationale, the
legacy-vs-disaggregated report distinction (this skill uses the legacy
report's non-commercial = large-speculator fields), and a glossary of the FMP
COT API field names consumed by scripts/cot_index.py.
Vendored client: scripts/fmp_client.py (generated) owns FMP transport — rate limiting, single 429 retry, header auth (the key never appears in a URL), and apikey redaction on (data, error) results (Issue #495).
references/output-contract.mdJSON output and provenance fields, date semantics, failure behavior, and the fictional Shapiro replay boundary. Load when passing reports to another skill or explaining data freshness.
references/shapiro-methodology.mdreferences/cot-index-calculation.mdreferences/cot-index-calculation.md (opens in a new tab)references/output-contract.md (opens in a new tab)references/shapiro-methodology.md (opens in a new tab)requirements.txt (opens in a new tab)scripts/cot_index.py (opens in a new tab)scripts/fmp_client.py (opens in a new tab)scripts/screen_cot_crowding.py (opens in a new tab)scripts/tests/test_cot_index.py (opens in a new tab)scripts/tests/test_cot_provenance.py (opens in a new tab)scripts/tests/test_fmp_client_contract.py (opens in a new tab)scripts/tests/test_screen_cot_crowding.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
/tradermonty-claude-trading-skills:cot-contrarian-detectorfrom tradermonty-claude-trading-skills
tradermonty-claude-trading-skills@cascade-business-ops is listed by joshuarweaver/cascade-business-ops — review the source before installing
npx claudepluginhub joshuarweaver/cascade-business-ops --plugin tradermonty-claude-trading-skills74 skills in this plugin
/backtest-expertExpert guidance for systematic backtesting of trading strategies. Use when developing, testing, stress-testing, or validating quantitative trading strategies. Covers "beating ideas to death" methodology, parameter robustness testing, slippage modeling, bias prevention, and interpreting backtest results. Applicable when user asks about backtesting, strategy validation, robustness testing, avoiding overfitting, or systematic trading development./breadth-chart-analystThis skill should be used when analyzing market breadth charts, specifically the S&P 500 Breadth Index (200-Day MA based) and the US Stock Market Uptrend Stock Ratio charts. Use this skill when the user provides breadth chart images for analysis, requests market breadth assessment, positioning strategy recommendations, or wants to understand medium-term strategic and short-term tactical market outlook based on breadth indicators. Also works WITHOUT chart images by fetching CSV data directly from public sources. All analysis and output are conducted in English./breakout-trade-plannerGenerate Minervini-style breakout trade plans from VCP screener output with worst-case risk calculation, portfolio heat management, and Alpaca-compatible order templates (stop-limit bracket for pre-placement, limit bracket for post-confirmation). Use when user has VCP screener results and wants actionable trade plans with entry/stop/target levels and position sizing.Other plugins' skills for the same job