cot-contrarian-detector

Detect crowded speculative positioning in CFTC futures markets via the FMP COT API.

2.8k|632|Updated Oct 19, 2025
One-click install
npx skills add https://github.com/tradermonty/claude-trading-skills --skill cot-contrarian-detector
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cot-contrarian-detector
Source: https://github.com/tradermonty/claude-trading-skills/tree/main/skills/cot-contrarian-detector
Command: npx skills add https://github.com/tradermonty/claude-trading-skills --skill cot-contrarian-detector

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires requests, and includes scripts (resource) and references (resource) components.

What problem does it solve?

Manually reviewing weekly Commitment of Traders reports across dozens of futures markets to spot crowded speculative positioning is slow and error-prone. This Skill automates the screening step of Jason Shapiro's contrarian methodology, computing a COT Index per market and flagging positioning extremes so you can focus on confirmation and trade planning.

Core Features & Use Cases

  • Automated Crowding Screen: Fetches legacy COT report data for up to 65 futures markets (indices, rates, FX, metals, energy, crypto) from the FMP API and computes 3-year and 26-week COT Index values per market.
  • Extreme Classification: Flags markets as CROWDED_LONG (index >= 90) or CROWDED_SHORT (index <= 10), with week-over-week net-position swings and open-interest context, output as JSON and Markdown reports.
  • Guided Manual Steps: Walks you through Shapiro steps 2-5 (news failure, price-action confirmation, entry sizing, exit) using the bundled methodology references.
  • Use Case: On a weekend after Friday's COT release, run the core-universe screen to see that gold speculators are at a 3-year net-long extreme, then use WebSearch to check whether recent bullish news failed to lift prices before considering a contrarian short.

Quick Start

Ask the assistant to run a COT crowding screen on the core futures universe with your FMP API key set, then review which markets are flagged as crowded long or short.

Frequently Asked Questions about cot-contrarian-detector

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I screen COT reports for crowded speculative positioning?

Run the screen_cot_crowding.py script with --core for 23 liquid futures markets or --symbols for specific ones. It fetches weekly legacy COT data from the FMP API, computes a 3-year COT Index per market, and classifies extremes as CROWDED_LONG or CROWDED_SHORT.

What is a COT Index and how is it calculated?

The COT Index is (current net position minus window minimum) divided by (window maximum minus window minimum), times 100, applied to large-speculator net positioning. A value of 100 means the most net-long reading in the lookback window; 0 means the most net-short.

Does the FMP COT API work with a free API key?

No, the FMP Commitment of Traders endpoints require a Premium+ plan. A free-tier key will not have access, so you must set FMP_API_KEY with an entitled key or pass it via the --api-key argument.

Can I use COT analysis for individual stocks?

No, COT reports cover CFTC-regulated futures markets only, such as equity indices, rates, FX, metals, energy, agriculture, and crypto futures. Single-stock positioning is not included in this data.

Is a crowded COT reading a trade signal by itself?

No, crowded positioning is only a precondition for a contrarian trade, not an entry signal. Shapiro's process requires news-failure confirmation and price-action reversal before entering, and COT data is always 3 to 9 days old when published.