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

未关闭
#10,124 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@quantconnect-kronos 已经在做这个了。

开始于 2026年11月17日。

  • #10184 来自 @quantconnect-kronos —— 未关闭

评估

难度
3/5
预计耗时
1-2 天
新手友好度
50/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
csharp
领域
data

调研方向

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.

由索引模型根据 Issue 内容生成。

描述

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.

主要语言
C#
星标
22.6k
派生
5.4k
平均合并
11 小时 39 分钟
30 天内合并 PR
104

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

QuantConnect/Lean 的其他 Issue

查看 QuantConnect/Lean 的全部 Issue

相似的 Issue

更多 C# Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。