Skip to content

Correct CME-family futures shortened sessions and holidays for 2023-2025 - #9807

Open
oandriushchenko-sasha wants to merge 3 commits into
QuantConnect:masterfrom
oandriushchenko-sasha:mhdb-cme-futures-early-closes-2023-2025
Open

oandriushchenko-sasha wants to merge 3 commits into
QuantConnect:masterfrom
oandriushchenko-sasha:mhdb-cme-futures-early-closes-2023-2025

Conversation

@oandriushchenko-sasha

@oandriushchenko-sasha oandriushchenko-sasha commented Sep 18, 2026

Copy link
Copy Markdown

Description

Corrects the CME-family futures entries in market-hours-database.json on four shortened trade dates and one holiday:

  • 3 Jul 2023 and 3 Jul 2024, the day before Independence Day: equity index entries (ES, NQ, MNQ, MES, RTY, M2K, EMD, YM, MYM) close 12:15 CT, with the 17:00 CT reopen recorded as a late open.
  • 29 Nov 2024, the day after Thanksgiving: early closes for the equity index, interest rate, grain, livestock, FX, cryptocurrency, energy and metals entries at the time CME published for each product group.
  • 9 Jan 2025, National Day of Mourning: equity index entries halt at 08:30 CT and reopen at 17:00 CT; interest rate and agricultural entries close at 12:15 CT and reopen at their regular evening time; metals trade normal hours. The date moves off the Future-cbot-[*] and Future-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.
  • 25 Dec 2025, Christmas Day: 110 entries carried an early close equal to their regular close together with the evening late open. SecurityExchangeHours.GetMarketHours treats 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 exchangeTimeZone and 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.BeforeMarketClose and SecurityExchangeHours.IsDateOpen resolve 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?

  • Added MarketHoursDatabaseTests.CorrectlyReadsCMEGroupFutureShortenedSessions, which resolves one entry per product group on each date and asserts the early close, the GetLastDailyMarketClose anchor and, where the exchange reopened the same evening, the late open.
  • Added MarketHoursDatabaseTests.CorrectlyReadsCMEGroupFutureSessionAvailability, which asserts IsDateOpen for regular and extended hours on 25 Dec 2025 and 9 Jan 2025.
  • The JSON round-trips byte-for-byte through the serializer used to write it, every added date is a weekday that is not a holiday on its entry or its market wildcard, every removed Christmas early close leaves the evening late open in place, and every touched map stays in chronological order.
  • The C# suite was not run locally; MarketHoursDatabaseTests, SecurityExchangeHoursTests and FuturesExpiryFunctionsTests run in CI.

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>

…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.
@oandriushchenko-sasha oandriushchenko-sasha changed the title Add missing CME-family futures early closes for 2023-2025 shortened sessions Correct CME-family futures shortened sessions and holidays for 2023-2025 Sep 18, 2026
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.
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.

1 participant