quantopian/zipline — pull request #136 by twiecki (2013-04-18 20:50:52+00:00)
Title: Refactor batch_transform to use rolling panel

First and foremost this changes batch_transform to use the new rolling panel @wesmckinney provided. It's about 100x faster which is nice.

While doing this I refactored a lot of batch_transform to make the code simpler and more readable. The functionality is the same though.

This refactoring lead me to discover a small logic bug. We were before saying a window of e.g. size 3 to be full on the 4th event. Now it's full upon seeing the 3rd event. It thus changes existing algorithms in a minor way @dunster: Every batch_transform will be called one event earlier, but only on it's first invocation.