MarketHoursDatabase marks CME equity index futures (e.g. NQ, ES) as open for regular trading (extendedMarketHours=false) on Juneteenth 2026 (2026-06-19), but official CME trading hours calendar shows the regular trade date as 2026-06-22 (Monday) for Juneteenth 2026, with an electronic session that closes early at 1pm ET. As a result ExchangeHours.IsDateOpen(new DateTime(2026, 6, 19)) (which uses extendedMarketHours: false by default) should return false, but currently returns true.
Expected behavior
For CME equity index futures (Market.CME) the market hours should follow the CME exchange holiday calendar. On 2026-06-19 (Juneteenth) the exchange only has an electronic session outside regular trading hours. For example, TradingView and TWS also show no regular trading hours session on that day.
Therefore:
exchangeHours.IsDateOpen(new DateTime(2026, 6, 19), extendedMarketHours: false) should return false
exchangeHours.IsDateOpen(new DateTime(2026, 6, 19), extendedMarketHours: true) should return true
Official CME trading hours for NQ on Juneteenth 2026:
Source: https://www.cmegroup.com/trading-hours.html#tradeDate=2026-06-19
Actual behavior
MarketHoursDatabase currently treats 2026-06-19 as open for Future-cme-NQ for RTH and ETH sessions.
Juneteenth (2026-06-19) is present under bankHolidays in market-hours-database.json, but the IsDateOpen() method does not check bankHolidays when determining if the market is open for regular trading. This causes the incorrect behavior where a bank holiday with only electronic sessions is treated as having regular market hours.
Current snippet from market-hours-database.json:
{
"entries": {
"Future-cme-NQ": {
"dataTimeZone": "UTC",
"exchangeTimeZone": "America/New_York",
"holidays": [
"12/25/2026",
"1/1/2027"
],
"earlyCloses": {
"6/19/2026": "13:00:00"
},
"lateOpens": {},
"bankHolidays": [
"6/19/2026"
]
}
}
}
Reproducing the Problem
Run this QuantBook snippet in the Cloud Research environment:
load "../QuantConnect.csx"
using QuantConnect;
using QuantConnect.Research;
using QuantConnect.Securities;
using QuantConnect.Data;
using System;
using System.Linq;
var qb = new QuantBook();
var nq = qb.AddFuture("NQ", Resolution.Minute, Market.CME);
var marketHours = MarketHoursDatabase.FromDataFolder();
var entry = marketHours.GetEntry(nq.Symbol.ID.Market, nq.Symbol, nq.Symbol.ID.SecurityType);
var exchangeHours = entry.ExchangeHours;
DateTime targetDate = new DateTime(2026, 6, 19);
Console.WriteLine($"IsDateOpen: {exchangeHours.IsDateOpen(targetDate)}");
Console.WriteLine($"Segments: {string.Join(", ", exchangeHours.GetMarketHours(targetDate).Segments.Select(s => $"{s.Start}-{s.End} ({s.State})"))}");
Expected output:
IsDateOpen: False
Segments:
Actual output:
IsDateOpen: True
Segments: 00:00:00 - 09:30:00 (PreMarket), 09:30:00 - 13:00:00 (Market)
Potential Solution
It appears bankHolidays are not currently checked by the market hours logic for CME equity index futures. Only holidays are treated as market closures. Consider treating bankHolidays as days when the regular trading session (extendedMarketHours=false) is closed but extended trading may still be available.
This issue affects multiple methods including IsDateOpen(), GetNextMarketOpen(), GetNextMarketClose() and related market hours methods.
System information
- Environment: QuantConnect Cloud Research
- Context: C# Notebook / LEAN master (as of 2026-06-20)
Checklist
MarketHoursDatabasemarks CME equity index futures (e.g. NQ, ES) as open for regular trading (extendedMarketHours=false) on Juneteenth 2026 (2026-06-19), but official CME trading hours calendar shows the regular trade date as 2026-06-22 (Monday) for Juneteenth 2026, with an electronic session that closes early at 1pm ET. As a resultExchangeHours.IsDateOpen(new DateTime(2026, 6, 19))(which usesextendedMarketHours: falseby default) should returnfalse, but currently returnstrue.Expected behavior
For CME equity index futures (
Market.CME) the market hours should follow the CME exchange holiday calendar. On 2026-06-19 (Juneteenth) the exchange only has an electronic session outside regular trading hours. For example, TradingView and TWS also show no regular trading hours session on that day.Therefore:
exchangeHours.IsDateOpen(new DateTime(2026, 6, 19), extendedMarketHours: false)should returnfalseexchangeHours.IsDateOpen(new DateTime(2026, 6, 19), extendedMarketHours: true)should returntrueOfficial CME trading hours for NQ on Juneteenth 2026:
Source: https://www.cmegroup.com/trading-hours.html#tradeDate=2026-06-19
Actual behavior
MarketHoursDatabasecurrently treats 2026-06-19 as open forFuture-cme-NQfor RTH and ETH sessions.Juneteenth (2026-06-19) is present under
bankHolidaysinmarket-hours-database.json, but theIsDateOpen()method does not checkbankHolidayswhen determining if the market is open for regular trading. This causes the incorrect behavior where a bank holiday with only electronic sessions is treated as having regular market hours.Current snippet from
market-hours-database.json:{ "entries": { "Future-cme-NQ": { "dataTimeZone": "UTC", "exchangeTimeZone": "America/New_York", "holidays": [ "12/25/2026", "1/1/2027" ], "earlyCloses": { "6/19/2026": "13:00:00" }, "lateOpens": {}, "bankHolidays": [ "6/19/2026" ] } } }Reproducing the Problem
Run this
QuantBooksnippet in the Cloud Research environment:Expected output:
Actual output:
Potential Solution
It appears
bankHolidaysare not currently checked by the market hours logic for CME equity index futures. Only holidays are treated as market closures. Consider treatingbankHolidaysas days when the regular trading session (extendedMarketHours=false) is closed but extended trading may still be available.This issue affects multiple methods including
IsDateOpen(),GetNextMarketOpen(),GetNextMarketClose()and related market hours methods.System information
Checklist
masterbranch