Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Futures Dashboard #2188

Merged
merged 12 commits into from
Aug 2, 2022
Merged

Futures Dashboard #2188

merged 12 commits into from
Aug 2, 2022

Conversation

colin99d
Copy link
Contributor

@colin99d colin99d commented Jul 27, 2022

Description

Futures dashboard request by Bexley. Todo:

  • Add CME data to fill yfinance missing data

For right now I think adding CME data might be out of reach. So far I have had to:

  • Create a CME account
  • Signup for Duo multi-factor authentication
  • Send a request for a 30 day free trial of CME

And I still do not have access. If someone wants to add CME thats fine, but I don't think its worth my time for now since the API is not accessible for most of our users.

How has this been tested?

  • Please describe the tests that you ran to verify your changes.
  • Provide instructions so we can reproduce.
  • Please also list any relevant details for your test configuration.

Checklist:

Others

  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • My code passes all the checks pylint, flake8, black, ... To speed up development you should run pre-commit install.
  • New and existing unit tests pass locally with my changes. You can test this locally using pytest tests/....

@colin99d colin99d marked this pull request as draft July 27, 2022 00:59
@colin99d colin99d added the dashboards dashboards label Jul 27, 2022
@deeleeramone
Copy link
Contributor

It would be prudent and forward-thinking to equip this dashboard with the ability to switch data sources.

The CME offers API access through registering as an individual, it would be a very good idea to have to ability to call historical and market data from this as it is free, and some users will also have purchased premium data sets. This will allow CME traders the ability to plug-and-play.

https://www.cmegroup.com/market-data/datamine-api.html
https://datamine.cmegroup.com/

Additionally, some price data is available here: https://www.econdb.com/commodities - available through an OpenAPI https://www.econdb.com/blog/pandas-datareader/

Screen Shot 2022-07-28 at 11 37 55 AM

This resource handles cross-referencing ticker symbols for the same instrument globally: https://www.openfigi.com/about/symbology

@deeleeramone
Copy link
Contributor

deeleeramone commented Aug 1, 2022

Here is my working list of yFinance continuous symbol listings that have useable contracts:

S&P 

ES=F	E-mini S&P 500 Index Futures (CME)
ESQ=F	TACO on E-mini S&P 500 Futures (CME)
MES=F	Micro E-Mini S&P 500 Index Futures (CME)
GD=F      S&P GSCI Commodity Index Futures (CME)
SDA=F    S&P 500 Annual Dividend Index Futures (CME)
SDI=F     S&P 500 Quarterly Dividend Index Futures (CME)
XAB=F	E-mini Materials Select Sector Futures (CME)
XAE=F	E-mini Energy Select Sector Futures (CME)
XAF=F	E-mini Financial Select Sector Futures (CME)
XAI=F	E-mini Industrial Select Sector Futures (CME)
XAK=F	E-mini Technology Select Sector Futures (CME)
XAP=F	E-mini Consumer Staples Select Futures (CME)
XAR=F	E-mini Real Estate Select Sector Futures (CME)
XAU=F	E-mini Utilities Select Sector Futures (CME)
XAV=F	E-mini Health Care Select Sector Futures (CME)
XAY=F	E-mini Consumer Discretionary Sector Futures (CME)
XAZ=F	E-mini Communication Services Sector Futures (CME)
ESG=F	E-mini S&P 500 ESG Index Futures (CME)


Russell

RS1=F	E-Mini Russell 1000 Index Futures (CME)
RSG=F	E-Mini Russell 1000 Growth Index Futures (CME)
RSV=F	E-Mini Russell 1000 Value Index Futures (CME)
RTY=F	E-Mini Russell 2000 Index Futures (CME)
M2K=F	Micro E-Mini Russell 2000 Index Futures (CME)

Nasdaq

NQ=F	NASDAQ 100  Futures (CME)
NQQ=F	TACO on E-mini NASDAQ 100 Futures (CME)
NQT=F	BTIC E-mini NASDAQ 100 Futures (CME)
MNQ=F	Micro E-Mini NASDAQ 100 Index Futures (CME)
BIO=F	E-Mini NASDAQ Biotech Industry Futures (CME)

Dow

YM=F	DJ $5 E-Mini Futures (CBT)
RX=F	Dow Jones U.S. Real Estate Index (CBT)


Global Indexes

ASN=F	ICE MSCI EM Asia NTR Index Futures (NYB)

MME=F	ICE MSCI Emerging Markets Index Futures (NYB)
MMM=F	ICE MSCI Emerging Markets EMEA NTR Index Futures (NYB)
MMN=F	MSCI Emerging Markets NTR Index Futures (NYB)
MWS=F 	ICE MSCI World NTR Index Futures (NYB)
MMW=F	ICE MSCI ACWI NTR Index Futures (NYB)
MFS=F	ICE MSCI EAFE Index Futures (NYB)
LFM=F	ICE MSCI EM ESG Leaders NTR Index Futures (NYB)
USS=F	ICE MSCI USA GTR Index Futures (NYB)
TPY=F	Yen Denominated TOPIX Futures (CME)
FT5=F	E-Mini FTSE China 50 Index Futures (CME)
MLE=F	MSCI EM Latin American Index Futures (NYB)

Water

H2o=F	NASDAQ Veles California Water Futures (CME)


Dairy

CB=F	Cash-Settled Butter Futures (CME)
GNF=F	Nonfat Dry Milk Futures (CME)
DC=F	Class III Milk Futures (CME)
GDK=F	Class IV Milk Futures (CME)
BLK=F 	Block Cheese Futures (CME)
CSC=F	Cash-Settled Cheese Futures (CME)

Poultry

GF=F	Feeder Cattle Futures (CME)
LE=F	Live Cattle Futures (CME)
HE=F	Lean Hogs Futures (CME)


Agriculture

LBS=F	Random Length Lumber Futures (CME)
UFV=F	Urea (Granular) FOB US Gulf Futures (CBT)

CC=F	Cocoa (NYB)
KC=F	Coffee (NYB)
CT=F	Cotton (NYB)
SF=F	Sugar No.16 Futures (NYB)
SB=F	Sugar #11 (NYB)
OJ=F	Orange Juice (NYB)

ZW=F 	Chicago SRW Wheat Futures (CBT)
XW=F 	Mini-sized Chicago SRW Wheat Futures (CBT)
KE=F	KC HRW Wheat Futures (CBT)
ZO=F	Oat Futures (CBT)
ZR=F	Rough Rice Futures (CBT)
ZC=F	Corn Futures (CBT)
XC=F	Mini-Corn Futures (CBT)
ZS=F	Soybean Futures (CBT)
ZM=F	Soybean Meal Futures (CBT)
ZL=F	Soybean Oil Futures (CBT)

DY=F	Dry Whey Futures (CME)


Precious Metals

GC=F	Gold Futures (CMX)
MGC=F	Micro Gold Futures (CMX)
SI=F		Silver Futures (CMX)
QI=F	E-mini Silver Futures (CMX)
YI=F		ICE 1000 oz Mini Silver Futures (NYB)
QO=F	E-mini Gold Futures (CMX)
SGU=F	Shanghai Gold (USD) Futures (CMX)
PL=F	Platinum Futures (NYM)
PA=F	Palladium Futures (NYM)

Base Metals

ALI=F	Aluminum Futures (CMX)
AUP=F	Aluminum MW U.S. Transaction (CMX)
BUS=F	US Midwest Busheling Ferrous Futures (CMX)
HG=F	Copper Futures (CMX)
QC=F	E-mini Copper Futures (CMX)

Oil & Gas

CL=F	WTI Crude Oil Futures (NYM)
MCL=F	Micro WTI Crude Oil Futures (NYM)
QM=F	E-mini Crude Oil Futures (NYM)
BZ=F	Brent Crude Oil Last Day Financing (NYM)
RB=F	RBOB Gasoline Futures (NYM)
GLI=F	European Low Sulphur Gasoil (NYM)
NG=F	Natural Gas Futures (NYM)
QG=F	E-mini Natural Gas Futures (NYM)
	
GEO=F	CBL Global Emissions Offset Futures (NYM)

Currency and Bond Rates (lots missing here)

DX=F	U.S. Dollar Index Futures (NYB)

TRM=F	TRY/USD Futures (NYB)


ZB=F	US Treasury Bond Futures (CBT)
ZQ=F	30-Day Fed Funds Rate Futures (CBT)
ZT=F	2-Year Treasury Note Futures (CBT)
Z3N=F	3-Year Treasury Note Futures (CBT)
ZF=F	5-Year Treasury Note Futures (CBT)
ZN=F	10-Year Treasury Note Futures (CBT)


GE=F	Eurodollar Futures (CME)
GLB=F	1-Month Eurodollar Futures (CME)



SR1=F	1-Month SOFR Futures (CME)
SR3=F	3-Month SOFR Futures (CME)


BTC=F	Bitcoin Futures (CME)
MBT=F	Micro Bitcoin Futures (CME)
ETH=F	Ether Futures (CME)
MET=F	Micro Ether Futures (CME)

@colin99d
Copy link
Contributor Author

colin99d commented Aug 1, 2022

Hey @deeleeramone, thanks for the data. Do you mind either adding it to this: https://github.com/OpenBB-finance/OpenBBTerminal/blob/022f52c83913cf51c21e2c2fd085debc2e6aa357/custom_imports/dashboards/futures.csv and submitting a commit, or making that data match this format. The entire dashboard auto builds from the csv linked above.

@colin99d colin99d marked this pull request as ready for review August 1, 2022 17:31
@colin99d colin99d requested a review from JerBouma August 1, 2022 17:38
@deeleeramone
Copy link
Contributor

Will do, I think I have broken a sufficient number of things for this morning; so maybe I'll get a chance do this later today.

@deeleeramone
Copy link
Contributor

@colin99d Here is an easier to get source for European futures markets, XLSX spreadsheet link downloadable without signing up.

http://www.nasdaqomx.com/commodities/market-prices

Screen Shot 2022-08-01 at 10 34 16 PM

Copy link
Contributor

@JerBouma JerBouma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the dashboard is a great proof of concept but what's more important right now is to focus on a derivatives menu, which includes futures. So for now I am happy to approve this and continue with this when we have our derivatives menu designed.

@colin99d colin99d merged commit 7494059 into main Aug 2, 2022
@colin99d colin99d deleted the future_curve branch August 2, 2022 12:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dashboards dashboards
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants