Correct CME-family futures shortened sessions and holidays for 2023-2025 - #9807
Open
oandriushchenko-sasha wants to merge 3 commits into
Open
oandriushchenko-sasha wants to merge 3 commits into
oandriushchenko-sasha wants to merge 3 commits into
Conversation
…essions Add the early closes, and the same-evening late opens, that the per-symbol CME, CBOT, NYMEX and COMEX entries lack for 3 Jul 2023, 3 Jul 2024, 29 Nov 2024 and 9 Jan 2025, at the times CME published for each product group. Additive only: 80 early closes and 25 late opens across 52 entries, inserted in chronological order. Cover the change with a MarketHoursDatabaseTests case that resolves one entry per product group on each date.
…family futures Drop the 25 Dec 2025 early close that 110 entries carry at their own regular close alongside the evening late open. SecurityExchangeHours treats an early close that precedes a late open as a pause, so the pair opened the whole regular session on a day the exchange is closed. The late open alone is how every entry encodes 25 Dec 2023 and 25 Dec 2024. Move 9 Jan 2025 off the CBOT and COMEX market wildcards. Rates and grains closed 12:15 CT and reopened at their regular evening time, YM and MYM halted 08:30 CT, and metals traded normal hours. AW keeps the closure on its own entry. Extend the MarketHoursDatabaseTests coverage to both dates.
A halt at the regular open, such as the equity index entries on 9 Jan 2025, leaves the date without a regular session, so GetLastDailyMarketClose moves to the next trading day. Assert that anchor only when the date keeps a regular session, and check the early close and the reopen on the resolved segments for every case.
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
Corrects the CME-family futures entries in
market-hours-database.jsonon four shortened trade dates and one holiday:Future-cbot-[*]andFuture-comex-[*]wildcards, which had recorded it as a full closure for every product on those markets. AW keeps the closure on its own entry, since the published schedule does not cover it.SecurityExchangeHours.GetMarketHourstreats an early close that precedes a late open as a pause and keeps the segments on both sides, so the pair opened the full regular session on a closed day. The early close is removed; the late open alone is the encoding every entry uses for 25 Dec 2023 and 25 Dec 2024.Early closes and late opens are written in each entry's
exchangeTimeZoneand inserted in the file's chronological order. Net: 105 early closes and 50 late opens added, 110 early closes and two wildcard holiday dates removed, one holiday added. Times follow CME Group's published holiday schedules and match the values the same entries already carry for the equivalent sessions in 2023 and 2025.Related Issue
N/A
Motivation and Context
TimeRules.BeforeMarketCloseandSecurityExchangeHours.IsDateOpenresolve the regular session from these entries. A missing early close makes a close-anchored scheduled event fire after the exchange has halted, so a DAY order placed there waits for data that never arrives and expires at the recorded regular close. A wildcard holiday on a day the exchange traded suppresses every scheduled event and fill on that market for the day, and the Christmas pair does the reverse on a day with no session.Requires Documentation Change
No.
How Has This Been Tested?
MarketHoursDatabaseTests.CorrectlyReadsCMEGroupFutureShortenedSessions, which resolves one entry per product group on each date and asserts the early close, theGetLastDailyMarketCloseanchor and, where the exchange reopened the same evening, the late open.MarketHoursDatabaseTests.CorrectlyReadsCMEGroupFutureSessionAvailability, which assertsIsDateOpenfor regular and extended hours on 25 Dec 2025 and 9 Jan 2025.MarketHoursDatabaseTests,SecurityExchangeHoursTestsandFuturesExpiryFunctionsTestsrun in CI.Types of changes
Checklist:
bug-<issue#>-<description>orfeature-<issue#>-<description>