Fix index futures June 2027 expiry by adding observed Juneteenth holiday - #9572
Merged
Martin-Molinero merged 1 commit intoJul 2, 2026
Conversation
Juneteenth 2027 (June 19) falls on a Saturday and is observed on Friday June 18, 2027, which is also the third Friday of June 2027. The futures market hours database tracked Juneteenth through 6/19/2026 but was missing 6/18/2027, so ThirdFriday-based index expiries (ES, NQ, YM, RTY and their micros) were not moved back, producing e.g. ES18M27 instead of ES17M27. Add 6/18/2027 alongside every existing 6/19/2026 entry (earlyCloses, lateOpens, bankHolidays, holidays). Same class of fix as QuantConnect#7164. Add June 2027 regression contracts (last trade 2027-06-17) for ES, NQ, YM, RTY, MES, MYM in the expiry test data. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
songdara23-jpg
approved these changes
Jul 1, 2026
songdara23-jpg
approved these changes
Jul 1, 2026
Martin-Molinero
approved these changes
Jul 2, 2026
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
Juneteenth 2027 (June 19) falls on a Saturday and is therefore observed on Friday June 18, 2027 — which is also the third Friday of June 2027. The futures entries in the market hours database tracked Juneteenth through
6/19/2026but were missing6/18/2027.Index futures expiries computed via
ThirdFriday(time, contract)move the third Friday back one business day when it is a holiday (holidays ∪ bankHolidays). Because6/18/2027was absent, the expiry was not moved back, so the June 2027 contract was created as ES18M27 instead of the correct ES17M27 (CME last trade date is 17 Jun 2027). This affects all index futures using the holiday-adjusted third Friday: ES, NQ, YM, RTY and their micros (MES, MNQ, MYM, M2K).This is the same class of fix as #7164.
Changes
6/18/2027alongside every existing6/19/2026entry (earlyCloses,lateOpens,bankHolidays,holidays). The change only touches entries that already observe Juneteenth, leaving non-US markets untouched.2027-06-17) for ES, NQ, YM, RTY, MES, MYM.Early close vs. full close
6/18/2027was intentionally added toearlyCloses(13:00 ET), matching how equity index futures treat Juneteenth — an early close, not a full-day closure:6/19/2023–6/19/2026) is inearlyCloses+bankHolidays, not the full-closeholidaysarray.6/19/2026is itself a Friday Juneteenth — the direct analog of 2027.Equity-usaentry; the equity index futures differ.Regardless of the early/full-close distinction, the expiry fix is driven by
bankHolidays, so ESM27 correctly rolls to June 17.Verification
Equity-usaentry already carried6/18/2027.FuturesExpiryFunctionsTestspasses 191/191, including the new 2027-06-17 cases for the affected index futures.🤖 Generated with Claude Code