AM settlement timestamp is skipped for Wednesday VIX and legacy Saturday SPX expirations
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
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.
- Lingua principale
- C#
- Stelle
- 22.5k
- Fork
- 5.4k
- Merge medio
- 22h 6m
- PR unite (30g)
- 81
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di QuantConnect/Lean
-
PDF report generation can overwrite HTML when the destination extension is not lowercase .htmlAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
QuantConnect/Lean#10082 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
QuantConnect/Lean#10059 ·
I maintainer di solito rispondono entro 1 giorno
-
Library Request: highspyApertalibrary-request
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
QuantConnect/Lean#10034 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
QuantConnect/Lean#9965 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
QuantConnect/Lean#9955 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di QuantConnect/Lean
Issue simili
-
bug emitter:client:csharp
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
microsoft/typespec#12572 · 1 commento · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
needs-area-label
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 2 giorni
-
AWS Lambda: KeyNotFoundException drops HTTP-triggered transactions when allowAllHeaders is disabledApertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
newrelic/newrelic-dotnet-agent#3949 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
area-networking
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
dotnet/aspnetcore#70545 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 87/100
I maintainer di solito rispondono entro 1 giorno