Skip to content

Add the published 2027 CME holiday dates and hours - #9733

Open
AlexCatarino wants to merge 2 commits into
QuantConnect:masterfrom
AlexCatarino:bug-cme-memorial-day-bank-holidays
Open

Add the published 2027 CME holiday dates and hours#9733
AlexCatarino wants to merge 2 commits into
QuantConnect:masterfrom
AlexCatarino:bug-cme-memorial-day-bank-holidays

Conversation

@AlexCatarino

@AlexCatarino AlexCatarino commented Aug 20, 2026

Copy link
Copy Markdown
Member

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:

Date Holiday
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, so only expiry dates move: 1/18, 2/15, 5/31, 6/18, 7/5, 9/6, 10/11, 11/11, 11/25 and 12/31/2027.

Per-product hours, from CME's own published 2027 schedule. The trading-hours page is backed by

/services/trading-hours-by-product?fromEventDate=&toEventDate=

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

  • Nothing is projected from a neighbouring year, and no date on or before today is touched. The change is additive: 12 distinct dates, all between 1/18/2027 and 12/31/2027, with no removals and no existing value altered.
  • The extraction is included only for the 164 of 177 products whose 2026 data it reproduces exactly under leave-one-out. The other 13 keep the market-wide dates alone. They are mostly crypto and index products whose published schedules are placeholders (16:01 pre-open, 16:02 open), 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.
  • This corrects values a projection from 2026 would have got wrong. Crude oil closes at 14:30 on Independence Day 2027, not the 13:00 it 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.
  • The eight remaining 2026 holidays were checked against the same source: 883 of 883 recorded values for those products agree, so nothing before 2027 needs changing.
  • 2028 and later are not included. The endpoint returns nothing for them, so they could only be projected.

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:

Contract Was Now Precedent already in the file
BK, CSX May 2027 2027-05-31 2027-05-28 2021-05-28, Memorial Day on the 31st
BK, CSX Dec 2027 2027-12-31 2027-12-30 2021-12-30, New Year observed Friday
HH Jun 2027 2027-05-27 2027-05-26 2021-05-26
HH Jan 2028 2027-12-29 2027-12-28 2021-12-28

Both 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

  • Bug fix / data update (non-breaking)

Checklist:

  • My code follows the code style of this project.
  • I have read the CONTRIBUTING document.
  • All new and existing tests passed.

@AlexCatarino
AlexCatarino force-pushed the bug-cme-memorial-day-bank-holidays branch from def3de6 to 62baa26 Compare August 20, 2026 19:24
@AlexCatarino AlexCatarino changed the title Add Memorial Day 2027-2031 to the CME bank holiday calendars Extend the CME holiday calendars past 2026 (Memorial Day and Good Friday) Aug 20, 2026
@AlexCatarino
AlexCatarino force-pushed the bug-cme-memorial-day-bank-holidays branch from 62baa26 to eeed880 Compare August 21, 2026 18:10
@AlexCatarino AlexCatarino changed the title Extend the CME holiday calendars past 2026 (Memorial Day and Good Friday) Complete the CME holiday calendars through 2029 Aug 21, 2026
@AlexCatarino
AlexCatarino force-pushed the bug-cme-memorial-day-bank-holidays branch 2 times, most recently from bce60f9 to ddf4acb Compare August 31, 2026 14:07
@AlexCatarino AlexCatarino changed the title Complete the CME holiday calendars through 2029 Add the published 2027 CME holiday dates Aug 31, 2026
@AlexCatarino
AlexCatarino force-pushed the bug-cme-memorial-day-bank-holidays branch 2 times, most recently from 1c8dfea to 3b2ec93 Compare August 31, 2026 14:36
@AlexCatarino AlexCatarino changed the title Add the published 2027 CME holiday dates Add the published 2027 CME holiday dates and hours Aug 31, 2026
@AlexCatarino
AlexCatarino force-pushed the bug-cme-memorial-day-bank-holidays branch from 3b2ec93 to d4b9b9e Compare August 31, 2026 16:35
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
AlexCatarino force-pushed the bug-cme-memorial-day-bank-holidays branch from d4b9b9e to 5b67b7e Compare August 31, 2026 18:46
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>
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