- Removing unneeded `CashBook` instance to create a new `TimeSlice`
- Adding new `TimeSliceFactory`, an instance base class that will
provide methods to create a new `TimeSlice`. Will own the `DateTimeZone`
property.
- Adding new `ISecurityPrice` and `IOptionPrice` that will provide a
reduced interface for accessing price properties and methods used when
creating a new `TimeSlice`
The SubscriptionDataReaderHistoryProvider was using StubResultHandler, so no error messages were being shown or logged. By adding events to IHistoryProvider and SubscriptionDataReader, the dependency on IResultHandler could be removed completely and error messages are now pushed up the stack.
This is only a mechanical refactor for the updated IHistoryProvider.Initialize method in all IHistoryProvider implementations, call sites and unit tests.
Pipes universe data from the data feed, through TimeSlice.Create and adds
TimeSlice.UniverseData dictionary property for read access from the algo
manager, where the data will be placed onto the correct security object.
A large percentage of synchronization time is spent performing time zone conversions.
Previously, it was possible that we may compute the same tz conversion multiple times
on the same piece of data until it's emitted. This change moves the time zone conversion
logic onto the data feed thread right before it puts the data into enqueueable enumerator.
In addition, we're not performing the clone operation at the same moment. This removes
unnecessary computation while moving the necessary computation to the data feed thread to
lighten the load on the synchronization/algorithm thread.
Previously, in Live mode, requesting History for multiple symbols in a single call returned an IEnumerable<Slice> concatenating the results of each request, so every Slice only had one data point and the list was not sorted by time.
This problem has been solved in the following steps:
- Added a new BrokerageHistoryProvider, to be used in live mode with all brokerages
- Removed IHistoryProvider implementations from IB, Oanda, FXCM brokerages
- Added new GetHistory(request) method to IBrokerage interface and implementations
- Moved CreateSliceEnumerableFromSubscriptions method from SubscriptionDataReaderHistoryProvider to the new abstract base class SynchronizingHistoryProvider, to enable reuse in BrokerageHistoryProvider