NDXP and NQX indicator settlement cutoff uses 15:00 Eastern instead of documented 16:00

Đang mở
#10,116 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

priority:P1
Observed behavior

On master (7939b7878), OptionSymbol.GetSettlementDateTime applies a fixed 15:00 exchange-local cutoff to all PM-settled index options. Its comment describes 16:00 Eastern, which is equivalent for Chicago SPXW/RUTW but not for New York NDXP/NQX.

Reproduction with a regular session:

var expiry = new DateTime(2025, 7, 7);
var underlying = Symbol.Create("NDX", SecurityType.Index, Market.USA);
foreach (var ticker in new[] { "NDXP", "NQX" })
{
    var option = Symbol.CreateOption(underlying, ticker, Market.USA,
        OptionStyle.European, OptionRight.Call, 200m, expiry);
    var hours = MarketHoursDatabase.FromDataFolder()
        .GetExchangeHours(Market.USA, option, SecurityType.IndexOption);
    Console.WriteLine($"{ticker}: zone={hours.TimeZone}, close={hours.GetLastDailyMarketClose(expiry, false):HH:mm}, settlement={OptionSymbol.GetSettlementDateTime(option):HH:mm}");
}

Observed for both: zone=America/New_York, close=16:15, settlement=15:00.

Impact

The helper returns 15:00 Eastern rather than its documented 16:00 Eastern rule. OptionIndicatorBase.Expiry caches this value, understating time to expiry by one hour for these contracts. The current regular-session ZeroDTEPMSettledIndexOptionsExpireAt4PM test also asserts an unconditional local 15:00, so it does not validate the named Eastern-time cutoff.

Required result

Express the intended PM expiration cutoff in each contract's exchange timezone. Add assertions in a common reference timezone for both Chicago and New York entries, and preserve correct early closes. A suggestion is to convert the Eastern cutoff into the resolved exchange timezone rather than treating all exchanges as Chicago.

This regular-session defect predates #10114; its new early-close guard leaves this path unchanged.

Ngôn ngữ chính
C#
Star
22.5k
Fork
5.4k
Merge trung bình
22 giờ 6 phút
Pull request đã merge (30 ngày)
81

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của QuantConnect/Lean

Tất cả issue của QuantConnect/Lean

Issue tương tự

Thêm issue về C#

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.