Non-US Interactive Brokers index CFDs inherit the US holiday and early-close calendar

Open
#10,124 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@quantconnect-kronos is already working on this.

Since Nov 17, 2026.

  • #10184 by @quantconnect-kronos — open

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
50/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
csharp
Domain
data

Research direction

Start with the Cfd-interactivebrokers-[*] entry in the market-hours database JSON and with MarketHoursDatabaseJsonConverter, which always merges the [*] holidays into each entry. Run the snippet in the issue to confirm IsDateOpen returns False for 2025-01-20 on IBDE40. Done means the non-US index CFDs keep their own market's calendar, while IBUS500, IBUS30, IBUST100 and the metals still match the current US calendar.

Written by the indexing model from the issue text.

Description

priority:p2
Observed behavior

The Cfd-interactivebrokers-[*] market-hours entry (America/New_York) defines the US equity calendar: US holidays such as Martin Luther King Jr. Day, Juneteenth, Thanksgiving, and 13:00 early closes such as 2025-11-28. The non-US index CFDs under it (IBDE40, IBGB100, IBEU50, IBFR40, IBES35, IBNL25, IBCH20, IBJP225, IBHK50, IBAU200) define no holidays or early closes of their own, so they inherit the whole US calendar:

var symbol = Symbol.Create("IBDE40", SecurityType.Cfd, Market.InteractiveBrokers);
var hours = MarketHoursDatabase.FromDataFolder().GetExchangeHours(Market.InteractiveBrokers, symbol, SecurityType.Cfd);
Console.WriteLine(hours.IsDateOpen(new DateTime(2025, 1, 20)));        // False: MLK Day, but the DAX trades
Console.WriteLine(hours.IsDateOpen(new DateTime(2025, 11, 27)));       // False: Thanksgiving
Console.WriteLine(hours.GetLastDailyMarketClose(new DateTime(2025, 11, 28), false)); // early close, not the 21:00 UTC close
Impact

Those CFDs are treated as closed on US holidays and closed early on US half days, even though their underlying markets trade a full session. Algorithms trading them lose those sessions, and orders on those days are rejected or wait for the next open.

What a fix must achieve

Each non-US index CFD gets its own market's holidays and early closes, or explicitly none, instead of the US calendar. The US index CFDs (IBUS500, IBUS30, IBUST100) and the metals keep the current calendar. Note that an entry's own holidays don't replace the market-wide ones: MarketHoursDatabaseJsonConverter always adds the [*] holidays to them. A suggestion is to move the US calendar from [*] to the US entries that need it, and give the non-US entries their own.

Dominant language
C#
Stars
22.6k
Forks
5.4k
Avg merge
11h 39m
Merged PRs (30d)
104

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from QuantConnect/Lean

All issues in QuantConnect/Lean

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.