Files
catalyst/zipline/finance/performance
Eddie Hebert eaea8e5317 Remove bottleneck caused by unnecessary check of the position index.
Instead of checking the positions indexes every time either
`_position_amounts` or `_position_last_sale_prices` is updated, check
and grow the individual Series on each update.

This gain with this patch is by reducing the following bottlenecks:
- Checking both vectors when only one is updated.
- Using try/except to trigger the growth, instead of incurring the cost
of checking the Index contains on every update.

In testing this change results in about a 33% speedup of the
`update_last_sale` algorithm when run with a buy and hold algorithm with
160 equities, resulting in a 20% speedup overall.
2014-12-04 12:08:00 -05:00
..
2014-10-10 17:10:45 -04:00