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

Add bank holidays for CME Futures MHDB #8539

Open
wants to merge 19 commits into
base: master
Choose a base branch
from

Conversation

Marinovsky
Copy link
Collaborator

@Marinovsky Marinovsky commented Jan 15, 2025

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:
    image

  • 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:
    image

  • 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:
    image

  • 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

  • Bug fix (non-breaking change which fixes an issue)
  • Refactor (non-breaking change which improves implementation)
  • Performance (non-breaking change which improves performance. Please add associated performance test and results)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Non-functional change (xml comments/documentation/etc)

Checklist:

  • My code follows the code style of this project.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • My branch follows the naming convention bug-<issue#>-<description> or feature-<issue#>-<description>

@Marinovsky Marinovsky changed the title Bug add bank holidays to cme futures mhdb Add bank holidays for CME Futures MHDB Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Review Euro FX Futures Expiration
2 participants