Repository navigation
Fix wildcard holidays overriding symbol early closes and late opens (#9866) - #9867
Closed
DivyaRaval1909 wants to merge 1 commit into
Closed
DivyaRaval1909 wants to merge 1 commit into
DivyaRaval1909 wants to merge 1 commit into
Conversation
5 of 11 tasks
Member
|
Hey @DivyaRaval1909! Thank for the contribution, but we decided to go with a slightly different approach at #9869 |
DivyaRaval1909
deleted the
bug-9866-wildcard-holidays-early-close-conflict
branch
October 5, 2026 22:04
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
When a market-wide wildcard entry in
market-hours-database.json(such asFuture-comex-[*]) lists a date as a holiday,MarketHoursDatabaseJsonConverterunions the wildcard's holidays into every specific symbol entry. However, specific symbol entries (such asFuture-comex-MGC) often specifyearlyClosesandlateOpensfor those same half-days (e.g., CME Globex holidays like MLK Day, Presidents' Day, etc.).Because
SecurityExchangeHourschecks_holidaysbefore evaluating_earlyClosesand_lateOpens, the symbol was resolving toClosed All Day(is_closed_all_day = true), ignoring the symbol's explicit early close/late open schedule and skipping data on active trading sessions.This PR:
MarketHoursDatabaseJsonConverterto exclude dates present inearlyClosesorlateOpensfromholidayDates, ensuring specific symbol schedules take precedence over wildcard holidays.SecurityExchangeHoursconstructor to ensure_holidaysexcludes dates specified inearlyClosesandlateOpens.HandlesWildcardHolidayWithSymbolEarlyCloseAndLateOpeninMarketHoursDatabaseJsonConverterTests.cs.EarlyClosesAndLateOpensTakePrecedenceOverHolidaysinSecurityExchangeHoursTests.cs.Related Issue
Closes #9866
Motivation and Context
Prevents futures (and other securities) on COMEX/NYMEX/CBOT/ICE from being marked as closed all day on CME Globex holiday half-days where actual trading sessions occurred and historical data exists.
Requires Documentation Change
No.
How Has This Been Tested?
MarketHoursDatabaseJsonConverterTests.HandlesWildcardHolidayWithSymbolEarlyCloseAndLateOpenverifyingMGCon 2020-01-20 is not treated as a holiday and resolves its 13:00 early close and 18:00 late open.SecurityExchangeHoursTests.EarlyClosesAndLateOpensTakePrecedenceOverHolidays.MarketHoursDatabaseJsonConverterTests(HandlesRoundTrip,HandlesOverridingEarlyCloses,HandlesOverridingLateOpens) and verified all tests pass.Types of changes
Checklist:
bug-<issue#>-<description>orfeature-<issue#>-<description>