-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Add bank holidays for CME Futures MHDB #8539
Open
Marinovsky
wants to merge
19
commits into
master
Choose a base branch
from
bug-AddBankHolidaysToCMEFuturesMHDB
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains 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
Marinovsky
changed the title
Bug add bank holidays to cme futures mhdb
Add bank holidays for CME Futures MHDB
Jan 15, 2025
…com/Marinovsky/Lean into bug-AddBankHolidaysToCMEFuturesMHDB
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
Bank only Holidays were included since, according to CME, the settlement days of CME Futures are affected by US holidays, even when the market is open that day:
Add CME Futures bank holidays to MHDB from 2009 to 2025. I found the holiday calendars from 2009 to 2022 and saved here, for the other years I used CME webpage and this other webpage
Approximately, the expiry dates of 135 symbols changed, but 2025 changes were manually confirmed using their CME settlement calendars. One can still check those changes comparing these two files, that contain the expiry dates generated for each future from 2009 to 2025:
Before the changes -> FuturesExpiryFileTest-master.json
After the changes -> FuturesExpiryFileTest.json
Bank holidays were excluded for CNH, MNH and MIR Futures, as their expiry rules don't consider US Holidays. For example, the settlement day for MIR Future contracts is the second INDIAN business day preceding the last INDIAN business day of the contract month. Thus, in the case of November 2025 contract, since the last business day is the 28th, the settlement day is the 26th, as it ignores Thanksgiving:
Although CME holiday calendars <= 2022 didn't include any specific entry for Futures belonging to Softs, such as Sugar No 11, these were finally found an included. According to CME, the holiday schedule they follow is the COMEX/NYMEX schedule:
Tricky cases, such as for CBOT Ethanol Futures were correctly handled. Although this future is part of energy Futures, it doesn't follow their holiday calendars as its exchange is not NYMEX nor COMEX
Related Issue
Closes #8522
Motivation and Context
CME has tradable dates which should not be counted as business days for their expiration rules due to bank holidays
Requires Documentation Change
N/A
How Has This Been Tested?
Existing and new tests
Types of changes
Checklist:
bug-<issue#>-<description>
orfeature-<issue#>-<description>