OPEN-SOURCE SCRIPT

Commitment of Traders: Financial Metrics

Aggiornato
█ OVERVIEW

This indicator displays the Commitment of Traders (​COT) financial data for futures markets.


█ CONCEPTS

Commitment of Traders ​(​COT) data is tallied by the Commodity ​Futures Trading Commission (CFTC), a US federal agency that oversees the trading of derivative markets such as futures in the US. It is weekly data that provides traders with information about open interest for an asset. The CFTC oversees derivative markets traded on different exchanges, so ​COT data is available for assets that can be traded on CBOT, ​CME, NYMEX, COMEX, and ICEUS.

A detailed description of the COT report can be found on the CFTC's website.

COT data is separated into three notable reports: Legacy, Disaggregated, and Financial. This indicator presents data from the COT Financial (Traders in Financial Futures) report. The Financial report includes financial contracts, such as currencies, US Treasury securities, Eurodollars, stocks, VIX and Bloomberg commodity index. As such, the TFF data is limited to financial-related tickers. The TFF report breaks down the reportable open interest positions into four classifications: Dealer/Intermediary, Asset Manager/Institutional, Leveraged Funds, and Other Reportables.

Our other COT indicators are:
 • Commitment of Traders: Legacy Metrics
 • Commitment of Traders: Disaggregated Metrics
 • Commitment of Traders: Total


█ HOW TO USE IT

Load the indicator on an active chart (see here if you don't know how).

By default, the indicator uses the chart's symbol to derive the COT data it displays. You can also specify a CFTC code in the "CFTC code" field of the script's inputs to display COT data from a symbol different than the chart's.

The rest of this section documents the script's input fields.

Metric
Each metric represents a different column of the Commitment of Traders report. Details are available in the explanatory notes on the CFTC's website.
Here is a summary of the metrics:
 • "Open Interest" is the total of all futures and/or option contracts entered into and not yet offset by a transaction, by delivery, by exercise, etc.
  The aggregate of all long open interest is equal to the aggregate of all short open interest.
 • "Traders Total" is the number of all unique reportable traders, regardless of the trading direction.
 • "Traders Dealer" is the number of traders classified as a "Dealer/Intermediary" reported holding any position with the specified direction.
  A "producer/merchant/processor/user" is an entity typically described as the “sell side” of the market.
  Though they may not predominately sell futures, they do design and sell various financial assets to clients.
  They tend to have matched books or offset their risk across markets and clients.
  Futures contracts are part of the pricing and balancing of risk associated with the products they sell and their activities.
 • "Traders Asset Manager" is the number of traders classified as "Asset Manager/Institutional" reported holding any position with the specified direction.
  These are institutional investors, including pension funds, endowments, insurance companies,
  mutual funds and those portfolio/investment managers whose clients are predominantly institutional.
 • "Traders Leveraged Funds" is the number of traders classified as "Leveraged Funds" reported holding any position with the specified direction.
  These are typically hedge funds and various types of money managers. The traders may be engaged in managing and
  conducting proprietary futures trading and trading on behalf of speculative clients.
 • "Traders Other Reportable" is the number of reportable traders that are not placed in any of the three categories specified above.
  The traders in this category mostly are using markets to hedge business risk, whether that risk is related to foreign exchange, equities or interest rates.
  This category includes corporate treasuries, central banks, smaller banks, mortgage originators, credit unions and any other reportable traders not assigned to the other three categories.
 • "Traders Total Reportable" is the number of all traders reported holding any position with the specified direction.
  To determine the total number of reportable traders in a market, a trader is counted only once whether or not the trader appears in more than one category.
  As a result, the sum of the numbers of traders in each separate category typically exceeds the total number of reportable traders.
 • "Dealer/Asset Manager/Leveraged Funds/Total Reportable/Other Reportable Positions -- all positions held by the traders of the specified category.
 • "Nonreportable Positions" is the long and short open interest derived by subtracting the total long and short reportable positions from the total open interest.
  Accordingly, the number of traders involved and the commercial/non-commercial classification of each trader are unknown.
 • "Concentration Gross/Net LT 4/8 TDR" is the percentage of open interest held by 4/8 of the largest traders, by gross/net positions,
  without regard to whether they are classified as commercial or non-commercial. The Net position ratios are computed after offsetting each trader’s equal long and short positions.
  A reportable trader with relatively large, balanced long and short positions in a single market, therefore,
  may be among the four and eight largest traders in both the gross long and gross short categories, but will probably not be included among the four and eight largest traders on a net basis.

Direction
Each metric is available for a particular set of directions. Valid directions for each metric are specified with its name in the "Metric" field's dropdown menu.

COT Selection Mode
This field's value determines how the script determines which COT data to return from the chart's symbol:
- "Root" uses the root of a futures symbol ("ES" for "ESH2020").
- "Base currency" uses the base currency in a forex pair ("EUR" for "EURUSD").
- "Currency" uses the quote currency, i.e., the currency the symbol is traded in ("JPY" for "TSE:9984" or "USDJPY").
- "Auto" tries all modes, in turn.
If no COT data can be found, a runtime error is generated.
Note that if the "CTFC Code" input field contains a code, it will override this input.

Futures/Options
Specifies the type of Commitment of Traders data to display: data concerning only Futures, only Options, or both.

CTFC Code
Instead of letting the script generate the CFTC COT code from the chart and the "COT Selection Mode" input when this field is empty, you can specify an unrelated CFTC COT code here, e.g., 001602 for wheat futures.



Look first. Then leap.

Note di rilascio
Minor update to import the latest version of "LibraryCOT"
Note di rilascio
v3

This version release features the following updates:

• Expanded COT code coverage: This indicator now imports the latest LibraryCOT version, which uses dynamic requests and a map containing an expanded list of current CFTC COT report codes. These changes allow the indicator to retrieve available COT data for a broader range of symbols.

• Improved tooltips: We've expanded the tooltips in the "Settings/Inputs" tab to provide more detailed information about how each input works and how to use it.

• Enhanced errors: We've improved error-handling behaviors and added clearer, more informative error messages for incorrect configurations and unavailable data feeds.

• Ticker info visibility: The indicator now displays the table containing the COT ticker information in the bottom-right corner to ensure visibility in any pane location.


Note di rilascio
v4

We've upgraded this indicator to Pine Script™ v6, the latest version of our trader-focused programming language. See the Release notes and Migration guide to learn what's new in v6 and how to convert your scripts to this version.
commitmentsoftradersCOTsentimentTrend Analysis

Script open-source

In pieno spirito TradingView, l'autore di questo script lo ha pubblicato open-source, in modo che i trader possano comprenderlo e verificarlo. Un saluto all'autore! È possibile utilizzarlo gratuitamente, ma il riutilizzo di questo codice in una pubblicazione è regolato dal nostro Regolamento. Per aggiungerlo al grafico, mettilo tra i preferiti.

Vuoi usare questo script sui tuoi grafici?


Share TradingView with a friend:
tradingview.com/share-your-love/

Read more about the new tools and features we're building for you: tradingview.com/blog/en/
Anche su:

Declinazione di responsabilità