Add the published 2027 CME holiday dates and hours - #9733
Open
AlexCatarino wants to merge 2 commits into
Open
Conversation
AlexCatarino
force-pushed
the
bug-cme-memorial-day-bank-holidays
branch
from
August 20, 2026 19:24
def3de6 to
62baa26
Compare
AlexCatarino
force-pushed
the
bug-cme-memorial-day-bank-holidays
branch
from
August 21, 2026 18:10
62baa26 to
eeed880
Compare
AlexCatarino
force-pushed
the
bug-cme-memorial-day-bank-holidays
branch
2 times, most recently
from
August 31, 2026 14:07
bce60f9 to
ddf4acb
Compare
AlexCatarino
force-pushed
the
bug-cme-memorial-day-bank-holidays
branch
2 times, most recently
from
August 31, 2026 14:36
1c8dfea to
3b2ec93
Compare
AlexCatarino
force-pushed
the
bug-cme-memorial-day-bank-holidays
branch
from
August 31, 2026 16:35
3b2ec93 to
d4b9b9e
Compare
The CME, CBOT, NYMEX and COMEX calendars carried nothing for 2027 beyond New
Year's Day and the observed Juneteenth, so every session and every expiry
computed into 2027 counted the rest of the year as ordinary business days.
Every 2026 record is carried to its 2027 counterpart - the same offset from the
same named holiday, written into the same field - and the times come from CME's
published 2027 schedule wherever it covers the product and date. Nothing on or
before today is touched, nothing is removed, and no existing value changes.
Full closes are only ever mirrored from 2026, never inferred. CME's feed
publishes no events for a product it has no schedule for, and reading that as
"the product does not trade" put Columbus Day and Veterans Day closures on TPY
and TPD, which no entry in this database has in any year for those dates.
Dates confirmed twice over, in OPM's published 2027 federal holiday schedule and
in CME's own 2027 holiday notes:
Full closes, where CME states there is no trade date at all:
1/1/2027 New Year's Day
3/26/2027 Good Friday - "No trading for Friday March 26th trade date"
12/24/2027 Christmas, observed Friday; last trade date is Thursday the 23rd
Bank holidays, where CME trades but the banks are closed: 1/18 MLK, 2/15
Washington's Birthday, 5/31 Memorial, 6/18 Juneteenth observed, 7/5
Independence observed, 9/6 Labor, 10/11 Columbus, 11/11 Veterans, 11/25
Thanksgiving, and 12/31 for New Year's Day 2028 observed. That last one has no
2026 counterpart, since New Year's Day 2026 was the 1st itself, so it is placed
on the entries that treat New Year's Day as a bank holiday, matching 2021.
Per-product hours come from CME's own published 2027 schedule, served by
/services/trading-hours-by-product?fromEventDate=&toEventDate=
for 2026 and 2027 and no other years, which is exactly CME's publication window.
Each product's published 2027 event signature is matched against that same
product's 2026 holidays, whose treatment this database already records from CME's
published 2026 calendar.
The layout follows 2026: every holiday sits on the per-ticker entries, and the
four market-wide entries carry only Good Friday, Columbus Day and Veterans Day.
No date is duplicated between a ticker and its market entry, and none appears in
both holidays and bankHolidays, an overlap this file has nowhere else.
Two things a partial mirror would have missed, and one a projection would:
* Livestock has no Sunday segment, so a full close is the only way it can be
shut. LE, HE, GF and LBR keep all ten of the full closures they hold in 2026.
* The early close on the calendar day before a holiday cancels the evening
session. 102 entries carry one on Holy Thursday 2026 and now do for 25 March
2027, and the grain, dairy and lumber entries carry one before each Monday
holiday.
* Crude oil closes at 14:30 on Independence Day 2027, not the 13:00 it uses in
2026, and reopens at 18:00 where 2026 has no reopen at all, because the
holiday is observed on a Monday rather than a Friday.
The eight remaining 2026 holidays were checked against the same source: 883 of
883 recorded values agree, so nothing before 2027 changes.
Six recorded expiries move, all 2027 contracts, each matching a 2021 contract in
the same weekday configuration already recorded that way:
BK, CSX May 2027 05-31 -> 05-28 cf. 2021-05-28, Memorial Day on the 31st
BK, CSX Dec 2027 12-31 -> 12-30 cf. 2021-12-30, New Year observed Friday
HH Jun 2027 05-27 -> 05-26 cf. 2021-05-26
HH Jan 2028 12-29 -> 12-28 cf. 2021-12-28
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
AlexCatarino
force-pushed
the
bug-cme-memorial-day-bank-holidays
branch
from
August 31, 2026 18:46
d4b9b9e to
5b67b7e
Compare
The 2027 calendar was built by carrying each 2026 record to its counterpart at the same offset from the same named holiday. That offset is in calendar days, so every holiday whose weekday moved between the two years carried its record onto the wrong day, and nothing was written where the new weekday needs a record 2026 had no reason to hold. Sessions that were modelled wrongly: 7/6/2027 was a full close on 29 FX entries. Independence Day 2027 is observed on Monday the 5th, which this file already records; the 6th is an ordinary Tuesday. It came from 7/4/2026, the Saturday one day after that year's Friday observance. Nothing replaces it, because Sunday 7/4/2027 carries a live evening session for all 29. 24 entries held a 7/5/2027 early close and no late open, leaving the session that runs into Monday open from midnight rather than shut until 17:00 or 18:00. The 2026 observance was a Friday and rightly carries no reopen, so there was nothing to carry forward. Each entry takes its own 9/6/2027 value, which is what all 139 entries already holding 7/5/2027 use and what 23 of these 24 use for 7/5/2021. Seven dairy entries held 7/5/2027 in holidays as well as the 17:00 late open they already carry, closing a day they trade. A Monday observance belongs in bankHolidays, where these entries put 1/18, 2/15, 5/31 and 9/6/2027, and 7/5/2021 and 7/4/2022. It was carried from 7/3/2026, where holidays is correct because no evening session follows a Friday close. 1OZ and MGT closed 7/5/2027 at 13:00 and MNH at 12:00, the 2026 Friday-observed times, where every peer took the published Monday times of 14:30 and 16:00. 21 entries closed 12/23/2027 at the abbreviated Christmas Eve time carried from 12/24/2026. Christmas 2027 is a Saturday observed on Friday the 24th, so the 23rd is a full session whose only distinction is that no evening session follows it. The 16 with an evening session take the time their same-shaped peers use to suppress it; the five livestock entries have no evening session and need no record at all. Records removed, each inert because a holiday already closes the day: 70 Good Friday early closes on 3/26/2027, carried from 4/3/2026. That date was the first Friday of the month and carried the Employment Situation release, so CME ran an abbreviated session; 2027 is not, so it is a full close, which the four market entries already record. No entry carries an early close on 4/18/2025, the previous ordinary Good Friday. 163 late opens on 1/1/2027, a Friday with no evening session to reopen, and 15 records on 1/2/2027, a Saturday. The 7/5/2027 late opens had been appended after 11/25/2027, so lateOpens is back in date order for the 163 entries that carry one. EarlyClosesAndLateOpensFallOnTradingDays sweeps every entry and fails on an early close or late open that lands on a holiday or on a weekday that never trades. It catches every removal above. Entries written before 2026 hold thousands of records of this shape, so the sweep starts at 2026. Nothing outside 2027 is touched: 308 records removed and 50 added, all in 2027. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Fill in the 2027 holiday calendar for the CME, CBOT, NYMEX and COMEX entries, from CME's published schedule.
Description
The CME-family calendars carried nothing for 2027 beyond New Year's Day and the observed Juneteenth, so every session and every expiry computed into 2027 counted the rest of the year as ordinary business days.
Dates, on the four market-wide entries. Each appears in OPM's published 2027 federal holiday schedule, and CME's own 2027 holiday notes state the trade dates around it.
Full closes, where CME states there is no trade date at all:
1/1/20273/26/202712/24/2027Bank holidays, where CME trades but the banks are closed, so only expiry dates move:
1/18,2/15,5/31,6/18,7/5,9/6,10/11,11/11,11/25and12/31/2027.Per-product hours, from CME's own published 2027 schedule. The trading-hours page is backed by
which serves per-product events for 2026 and 2027, and only those two years - exactly CME's publication window. Each product's published 2027 event signature is matched against that same product's 2026 holidays, whose treatment this database already records from CME's published 2026 calendar. Where the signature matches, the recorded treatment is what CME publishes for 2027 as well. A date with no events at all is unambiguous on its own: the product does not trade.
Notes
1/18/2027and12/31/2027, with no removals and no existing value altered.16:01pre-open,16:02open), plus HE, LE, GF and LBR, where this database and CME disagree about the day after Thanksgiving and Christmas Eve 2026 and it is not clear which is right.14:30on Independence Day 2027, not the13:00it uses in 2026, because the holiday is observed on a Monday rather than a Friday; and the E-mini S&P has no early close on Christmas Eve 2027 though it had one in 2026.Related Issue
n/a
Motivation and Context
Keeps trading sessions and futures expiry dates correct through 2027 for the CME family.
Requires Documentation Change
N/A. The QuantConnect/Documentation repo regenerates MHDB-related docs on a weekly schedule.
How Has This Been Tested?
FuturesExpiryFunctionsTests,MarketHoursDatabaseTests,SecurityExchangeHoursTests,SymbolPropertiesDatabaseTests,SymbolRepresentationTests- 531/531 pass.Six recorded expiries move, all 2027 contracts. Each matches a 2021 contract in exactly the same weekday configuration that is already recorded that way:
2027-05-312027-05-282021-05-28, Memorial Day on the 31st2027-12-312027-12-302021-12-30, New Year observed Friday2027-05-272027-05-262021-05-262027-12-292027-12-282021-12-28Both expiry rules were replayed independently over every recorded row for those three roots: 106 of 108, 103 of 105 and 149 of 151 reproduce the recorded value exactly, and the only differences are the six above.
Types of changes
Checklist: