Files
catalyst/zipline/finance/performance
Stewart Douglas e47cb96479 BUG: Ensure consistent ordering of amounts, prices & multipliers
Previously, we have assumed that the `amounts` and `last_sale_prices`
lists have the same order as the `value_multipliers`. This is not
correct, since to populate the `amounts` and `last_sale_prices` lists
we iterate over a `dict` (self.positions). The order of this `dict`
can change in arbitrary ways when it is updated, which occurs when
we call `update_positions`. Our `value_multipliers` however are stored
in an `OrderedDict`, meaning the order of existing key/value pairs
is not changed when they are updated.

To address this issue, we make sure that `self.positions` subclasses
`OrderedDict`.
2016-03-11 13:16:24 -05:00
..