Skip to content

ingted/CFTC-Data

 
 

Repository files navigation

CFTC

Each Friday the CFTC publishes its Commitment of Traders reports showing long and short positions in financial and commodity futures as of that Tuesday. This is the scraper for all the data published by CFTC, including:

  • Disaggregated Futures Only Reports
  • Disaggregated Futures-and-Options Combined Reports
  • Traders in Financial Futures; Futures Only Reports
  • Traders in Financial Futures; Futures-and-Options Combined Reports
  • Futures Only Reports
  • Futures-and-Options Combined Reports
  • Commodity Index Trader Supplement

config

PostgreSQL DB setting

config/config.yml

SQL Server DB setting

sql

the table create command for all the CFTC data (PostgreSQL)

sql_sqlserver

the table create command for all the CFTC data (SQL Server)

data

(PostgreSQL) if the table doesn't exist, this script will create for you run the script each Friday after CFTC publishes the reports to update the data

data_sqlserver

(SQL Server) if the table doesn't exist, this script will create for you run the script each Friday after CFTC publishes the reports to update the data

  • Using pytds for performance
  • All datalayer code are located in datalayer_sqlserver.py

image

historical_data\daily_data

Several futures daily data.

image

jack_seasonal_trading_strategy_back_test

  • daily_data_to_sql_server.ipynb Insert data into SQL Server.

About

the scraper for all the data published by CFTC

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 90.7%
  • Jupyter Notebook 9.3%