mirror of
https://github.com/wassname/catalyst.git
synced 2026-08-02 12:30:45 +08:00
The defaultdict behavior was allowing both algo code and TradingAlgorithm wrappers to add unintended keys. Remove use of defaultdict in favor of a dictionary that explicitly adds the values in tradesimulation, otherwise allow a KeyError if the bar is indexed with a sid that doesn't exist. Also, when iterating over the keys in the data bar, only return those keys that have pricing data.