- Adding `LazyToUpper()` implementation, that will avoid the call to
`ToUpper` if the string is already upper.
- Reduce the timezone conversions at `Time.EachTradeableDayInTimeZone`
- `TotalPortfolioValue` will iterate over all securities once
- Adding new `SecurityIdentifier` cache, significant impact for
algorithms using coarse/fine data
Often users will request History with a string instead of a Symbol. Because of the implicit conversion between Symbol and string, this only works if the ticker has been first added to the algorithm as a security using a method like AddSecurity(), AddEquity() etc. This commit checks for failed implicit conversions in History request and returns an error message to the user that should better enable users to debug what has gone wrong.
Having a symbol implicit to string and then string to symbol must be
inverse operations, consider the case we pass Symbol data.Symbol to a
method expecting a string, and then that same method invokes another
method expecting a Symbol, we'll need it to resolve back to the original
symbol.
For some still unknown reason, when trying to deserialize a
List<Ticks> into a List<BaseData> with multiple symbols, all
instances would share the same symbol reference (to the last
symbol in the list). Adding a dedicated json converter to
handle the deserialization handled this.
SymbolTests.HandlesListTicksWithDifferentSymbols has the
demonstrating case of the bug.
This includes updating all usages of symbol as a security identifier to use the new type.
The type includes a unique field, SID, as well as the current ticker's value. This allows
for consistent addressability while also allowing the ticker to evolve over time with the
mapping changes.
Effort was made to maintain compile and runtime backwards compatibility.