AM settlement timestamp is skipped for Wednesday VIX and legacy Saturday SPX expirations
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ả
Observed behavior
OptionSymbol.GetSettlementDateTime skips its AM-settlement adjustment for recognized AM-settled contracts when the nominal date is not in the generic third-Friday window, or when it resolves to a different trading date.
Reproduced on master (7939b7878) with the bundled database:
| Root / nominal expiry | IndexOptionSymbol.IsAMSettled |
OptionSymbol.IsStandard |
Returned settlement (America/Chicago) |
|---|---|---|---|
| VIX / 2016-02-17 | true | false | 2016-02-17 15:15 |
| SPX / 2014-06-21 | true | true | 2014-06-20 15:15 |
Both remain afternoon values rather than the AM settlement time described by the helper's own contract. For the legacy Saturday SPX contract, GetLastDayOfTrading correctly resolves Friday 2014-06-20, but the settlement branch then rejects that date because it differs from the nominal Saturday expiry.
Minimal reproduction:
foreach (var c in new[] {
("VIX", new DateTime(2016, 2, 17)),
("SPX", new DateTime(2014, 6, 21)) })
{
var underlying = Symbol.Create(c.Item1, SecurityType.Index, Market.USA);
var option = Symbol.CreateOption(underlying, c.Item1, Market.USA,
OptionStyle.European, OptionRight.Call, 200m, c.Item2);
Console.WriteLine($"{option}: AM={IndexOptionSymbol.IsAMSettled(option)}, standard={OptionSymbol.IsStandard(option)}, settlement={OptionSymbol.GetSettlementDateTime(option):yyyy-MM-dd HH:mm}");
}
Cause and required result
The AM branch in Common/Securities/Option/OptionSymbol.cs requires both IsStandard(symbol) and expiryTime.Date == symbol.ID.Date.Date in addition to the explicit AM-settlement classification. A Wednesday VIX expiry fails the former; the legacy Saturday SPX expiry fails the latter. OptionIndicatorBase.Expiry consequently overstates the remaining time for the Greeks/IV indicators.
Use the contract's AM-settlement classification and appropriate settlement date without requiring every such contract to have a third-Friday nominal expiry. Include Wednesday VIX and pre-2015 Saturday SPX cases alongside the existing SPX tests.
This concerns the timestamp used by indicators, not the exercise-price issue in #7728. It predates #10114, whose change leaves the AM branch untouched.
- 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
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.
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của QuantConnect/Lean
-
PDF report generation can overwrite HTML when the destination extension is not lowercase .htmlĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
QuantConnect/Lean#10082 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
QuantConnect/Lean#10059 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Library Request: highspyĐang mởlibrary-request
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
QuantConnect/Lean#10034 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
QuantConnect/Lean#9965 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
QuantConnect/Lean#9955 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của QuantConnect/Lean
Issue tương tự
-
bug emitter:client:csharp
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
microsoft/typespec#12572 · 1 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
needs-area-label
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 2 ngày
-
AWS Lambda: KeyNotFoundException drops HTTP-triggered transactions when allowAllHeaders is disabledĐang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
newrelic/newrelic-dotnet-agent#3949 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area-networking
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
dotnet/aspnetcore#70545 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 87/100
Maintainer thường phản hồi trong vòng 1 ngày