Add 1-Ounce Gold and Micro Ultra Treasury futures - #9692
Open
0xpinara wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This adds three CME futures so
AddFuture()can find them:Each one gets a ticker constant, an expiry function, a symbol-properties row,
and a market-hours entry.
I found two things that are different from the issue:
1OZ does not use the same calendar as GC/MGC. Trading stops on the third
last business day of the month before the contract month. I checked 8 real
expiry dates from CME and they all match, including the Thanksgiving one.
I followed the same pattern already used for Henry Hub Last-day Financial (HH).
MWN is not the 10-Year Note micro. It is the Ultra Bond micro. The Note
micro is MTN. The tick sizes are different too (1/64 for the Note, 1/32 for
the Bond). I added both so it is correct either way. Happy to remove one if
you only want one.
I left QNDX out. The issue says Spot-Quoted futures do not follow the
quarterly-roll model and need a design decision first. I can do it in a
follow-up PR.
Related Issue
Partially addresses #9622.
Motivation and Context
These tickers are not registered anywhere in LEAN, so users cannot add them at
all. This unblocks live trading and live IB data for them.
Requires Documentation Change
Yes, the list of supported futures should get these three new tickers.
How Has This Been Tested?
I added new test cases in
FuturesExpiryFunctionsTestsand new rows inFuturesExpiryFunctionsTestData.xml.FuturesExpiryFunctionsTestspasses203/203 locally.
I could not run
MarketHoursDatabaseTestsorSymbolPropertiesDatabaseTestson my machine. They crash during teardown with a Python GIL error, and this
also happens on unmodified master, so I do not think it is from my change.
Some 1OZ test rows use off-cycle months on purpose, to test that it rolls
forward to the next Feb/Apr/Jun/Aug/Oct/Dec contract.
One note on the diff: the market-hours JSON looks like it changed a lot, but I
parsed the file before and after and only 3 entries were added. No existing
entry was changed. The big diff is just git lining up the wrong blocks, because
the new entries look almost the same as their neighbors.
Types of changes
Checklist:
bug-<issue#>-<description>orfeature-<issue#>-<description>