Skip to content

CME equity index futures marked open for regular trading on bank holidays #9552

Description

@chris0x42

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:

Image

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

  • I have filled out this template with reproduction steps
  • I reproduced this on the current master branch
  • I searched existing issues and did not find a duplicate

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions