Option Symbols Incorrect Across Splits
Trading AAPL options:
2014-06-09 00:00:00 : | Runtime Error: System.ArgumentNullException: Value cannot be null. Parameter name: key at System.Collections.Concurrent.ConcurrentDictionary`2[TKey,TValue].ContainsKey (TKey key) [0x0000b] in
Hi @isobretatel; please provide an example algorithm which caused this error; and the data you used to cause it. LEAN does handle option splits but there may be some oddity with your setup. Thanks
@jaredbroad Here's a simple one
Thank you @dillonricketts. I verified the bug and assigned to @StefanoRaggi, since he knows that code well.
This is a quite tricky one. Actually the symbol objects won't work for options and we'll need to do a refactor of Symbol objects to handle this.. we're still brain storming the best solution but will circle back shortly.
Just an update here - this is a complex issue and we've had to do a work around for now so at least the backtest modelling / equity curves will be accurate (https://github.com/QuantConnect/Lean/pull/1503).
Long term we may need another data-source to know how the option-symbols are mapped. There is no reliable pattern from the OTCC.
Leaving issue open until we crack the mapping post-split/renames and solve properly.
Closing as we now close option positions on a split warning.