From 9e94193d4b45b820c7bd7f16231dfd9d0049d859 Mon Sep 17 00:00:00 2001 From: Joe Jevnik Date: Mon, 17 Nov 2014 19:06:54 -0500 Subject: [PATCH] BUG: Off by one error in runtime construction of digest panel When a history minute digest panel was constructed at runtime, there would be 1 minute missing between the current minute at iloc[-1] and the next prior minute at iloc[-2]. --- zipline/history/history_container.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/zipline/history/history_container.py b/zipline/history/history_container.py index 77f1441d..e61d38d9 100644 --- a/zipline/history/history_container.py +++ b/zipline/history/history_container.py @@ -230,7 +230,7 @@ class HistoryContainer(object): # Dictionaries with Frequency objects as keys. self.digest_panels, self.cur_window_starts, self.cur_window_closes = \ - self.create_digest_panels(initial_sids, initial_dt, bar_data) + self.create_digest_panels(initial_sids, initial_dt) # Helps prop up the prior day panel against having a nan, when the data # has been seen. @@ -537,7 +537,6 @@ class HistoryContainer(object): def create_digest_panels(self, initial_sids, initial_dt, - bar_data, env=None): """ Initialize a RollingPanel for each unique panel frequency being stored @@ -564,8 +563,6 @@ class HistoryContainer(object): continue dt = initial_dt - if bar_data is not None: - dt = largest_spec.frequency.prev_bar(dt) rp = self._create_digest_panel( dt,