CFTC Commitments of Traders
All plugins

Plugin libraryPositioning

Plugin

CFTC Commitments of Traders

Weekly futures positioning from the CFTC for the market behind your instrument: speculators, leveraged funds, asset managers and a 0 to 100 COT index.

Data sourceNetwork: publicreporting.cftc.govDesktop onlyv1.0.0

About

Every week the US Commodity Futures Trading Commission (CFTC) publishes who holds the open futures positions in each market: large speculators, commercial hedgers and, in the newer reports, leveraged funds, asset managers and managed money. Many traders read extremes in speculator positioning as a sign of a crowded trade.

Before a run, the plugin finds the futures market behind the run's instrument (EURUSD reads the CME Euro FX contract, XAUUSD COMEX gold, US500 the E-mini S&P 500), downloads its history since 1993 and writes the feed cot_<market>, for example cot_eur or cot_gold. Each day holds the latest report known that day as an object: net speculator position, its weekly change and share of open interest, net commercials, open interest, net leveraged funds and asset managers (financial futures) or net managed money (commodities), and a COT index: where the net speculator position sits in the range of the last reports, from 0 (lowest) to 100 (highest).

An FX pair reads the contract of each non dollar leg: EURJPY writes cot_eur and cot_jpy. A currency contract is long that currency against the US dollar, so for USDJPY, USDCHF and USDCAD the numbers point the other way: speculators long yen are short USDJPY.

Markets: eur, jpy, gbp, chf, cad, aud, nzd, mxn, usd_index, sp500, nasdaq100, dow, russell2000, nikkei, ust10y, bitcoin, ether, gold, silver, copper, platinum, wti, natgas.

Configuration

FieldTypeDefaultDescription
cache_daysRefetch after (days)number1Days before the plugin downloads a market again. Within that time a run reads the cached feed and needs no network.
index_weeksCOT index lookback (reports)numbermin 2, max 520156How many reports the COT index looks back over, the current one included. 156 is about three years, 52 one year. The index stays empty until that many reports exist.
marketsMarkets (auto or keys like eur, gold, sp500)string"auto"Which markets to fetch, separated by commas. auto (the default) is the market behind the run's instrument; add keys to fetch more, for example auto, usd_index. An instrument with no CFTC market gets no feed and a line in the plugin log.

Use it in a strategy

pythonbars = ctx.bars(1)
if bars:
    cot = ctx.data("cot_eur", bars[-1].ts)
    if cot is not None and cot["cot_index"] is not None:
        if cot["cot_index"] > 90:
            ctx.signal("EXIT")

The feed is refreshed before a run whose strategy reads ctx.data, or when "Fetch external data (news and plugin feeds)" is ticked. A run on the server never fetches. A value is None before the first report the plugin has.

What it provides

cot_<market>FeedOne feed per market (cot_eur, cot_gold, cot_sp500 and so on). Each day holds an object: report_date, released, open_interest, net_speculators, net_speculators_change, net_speculators_pct_oi, net_commercials, cot_index, and net_leveraged_funds with net_asset_managers (financial futures) or net_managed_money (commodities). Positions are in contracts; a field the report does not carry that week is None.

Data source and terms

PublisherU.S. Commodity Futures Trading Commission, Commitments of Traders (Legacy, Traders in Financial Futures and Disaggregated reports, futures only)
TermsRead the terms
API keyNone needed
AttributionSource: U.S. Commodity Futures Trading Commission, Commitments of Traders
Rate limitTwo requests per market per refresh, half a second apart. The CFTC's public reporting site needs no key at this volume.

Hosts it may reach: publicreporting.cftc.gov

When values are known

A report shows positions as of Tuesday and is published on Friday at 15:30 New York time, three business days later, one day later for each federal holiday or government closure in between. Each report is stored under the first weekday after its publication: Friday's report is Monday's value, a report published on a Monday after a holiday week is Tuesday's. Even a crypto strategy sees it from Monday, one rule for every market. The reports delayed by the government shutdowns of 2013, 2018 to 2019 and 2025 use the publication dates the CFTC announced. Values are carried forward for at most 70 days; report_date says how old a value is.

Limits

  • Weekly data: a value is six or more days old when it becomes known (Tuesday positions, known Monday) and stays the same for a week.
  • The publication dates are computed from the CFTC's rule, a list of federal holidays and closures, and a table of the delays the CFTC announced. Where the CFTC gave only a week, the last day of it is used. The table may miss a delay or a closure, so a value can be a day early in a week nobody wrote about.
  • The CFTC corrects reports now and then. The download holds today's corrected figures, not the ones first published.
  • Futures only, no options. Reports before 1993 are left out (the CFTC published them later and less often). Trader groups start in June 2006, bitcoin in 2018 and ether in 2021. Brent, the DAX and other markets outside US exchanges have no CFTC report.
OrionQuant