mirror of
https://github.com/wassname/catalyst.git
synced 2026-07-17 11:25:55 +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.