IndexOptionSymbol converts holiday-separated last-trading and expiration dates using calendar days
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 58/100
Direzione di ricerca
Start with IndexOptionSymbol.GetLastTradingDate and GetExpiryDate, then inspect how exchange calendars are represented and used by the shared helper. Check the InteractiveBrokersSymbolMapper.GetLeanSymbol IndexOption case and InteractiveBrokersBrokerage.CreateContract; add coverage for the December 2018 holiday in both conversion directions and mapper behavior. Done means those conversions return December 24 and December 26 while ordinary-session and PM-settled results remain correct.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Observed behavior
IndexOptionSymbol.GetLastTradingDate and GetExpiryDate use a fixed calendar-day offset for AM-settled index options. When a holiday separates the last trading session from expiration, both conversions can produce the holiday instead of the correct date.
A concrete case is VIXW expiration on 2018-12-26. Its preceding business day was 2018-12-24, since December 25 was closed. The helpers return December 25 in both directions:
Console.WriteLine(IndexOptionSymbol.GetLastTradingDate(
"VIXW", new DateTime(2018, 12, 26)).ToString("yyyy-MM-dd"));
// Actual: 2018-12-25; expected: 2018-12-24
Console.WriteLine(IndexOptionSymbol.GetExpiryDate(
"VIXW", new DateTime(2018, 12, 24)).ToString("yyyy-MM-dd"));
// Actual: 2018-12-25; expected: 2018-12-26
The fixed +1/-1 behavior is present on master (dbacbd727).
References
- Cboe's settlement archive includes the December 26, 2018 volatility settlement.
- Cboe's 2018 Christmas notice confirms the December 24 options session and December 25 closure.
- Cboe's VIX trading FAQ describes the existing AM-settled VIX last-trading rule as the market close on the business day before expiration, rather than the preceding calendar day.
Affected callers and required result
The public Interactive Brokers integration consumes both conversions:
InteractiveBrokersSymbolMapper.GetLeanSymbol, in theIndexOptioncase, callsGetExpiryDateto construct Lean's contract symbol.InteractiveBrokersBrokerage.CreateContractcallsGetLastTradingDateto populateLastTradeDateOrContractMonth.
Thus this is not only a display-date discrepancy: those callers can construct a different expiration or send a non-trading date when given this holiday-separated contract.
The shared conversions should produce December 24 and December 26 respectively for the reproduction, while preserving existing ordinary-session and PM-settled results. Add holiday-separated cases in both directions and mapper coverage. As a suggestion, resolve these dates against the relevant exchange calendar in the shared Lean helper, so brokerage callers can reuse the correction instead of adding their own holiday rules.
- Lingua principale
- C#
- Stelle
- 22.6k
- Fork
- 5.4k
- Merge medio
- 11h 39m
- PR unite (30g)
- 104
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
-
priority:p2
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
QuantConnect/Lean#10216 ·
I maintainer di solito rispondono entro 1 giorno
-
priority:p2
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
QuantConnect/Lean#10206 ·
I maintainer di solito rispondono entro 1 giorno
-
priority:p2
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
QuantConnect/Lean#10199 ·
I maintainer di solito rispondono entro 1 giorno
-
priority:p2
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
QuantConnect/Lean#10198 ·
I maintainer di solito rispondono entro 1 giorno
-
priority:p2
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
QuantConnect/Lean#10197 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di QuantConnect/Lean
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
dotnet-outdated/dotnet-outdated#871 ·
I maintainer di solito rispondono entro 1 giorno
-
triage/untriaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
unoplatform/uno#26676 ·
I maintainer di solito rispondono entro 1 giorno
-
.NET bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
I maintainer di solito rispondono entro 1 giorno
-
[问题] 导出文件时,提示后面还有1243390911步Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
jhaizhou-ops/S2Arm#2177 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
area-CodeGen-coreclr untriaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
dotnet/runtime#138181 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno