mirror of
https://github.com/wassname/catalyst.git
synced 2026-06-28 20:54:47 +08:00
6ff1d55504
In preparation for using `DataPortal` in notebooks, remove restriction on the `HistoryLoader` to dates that are monotonically increasing. Notebook usage of the `DataPortal` is more useful when the end of the history window can be arbitrary dates without having to restart the notebook kernel. Due to the implementation of the prefetch and caching logic, the end date of history calls could previously only increase. e.g. `2016-11-01`, `2016-11-02`, `2016-11-03`. This pattern was sufficient for backtesting and live simulations, since the current time of the algorithm only ever increases. With this change, which resets the underlying sliding window when the last fetched idx is greater than the Now calls to history in the same process with end dates such `2016-11-01`, `2016-10-31`, `2015-11-02` should work.