From 15f1947652656433d8d83d58c12332236a6343a2 Mon Sep 17 00:00:00 2001 From: Scott Sanderson Date: Mon, 2 Jun 2014 23:22:41 -0400 Subject: [PATCH] BUG: Don't return mostly nans from `get_history` when `ffill=False`. Fixes an issue where, if `ffill=False`, `get_history` would return nans for every entry in the history frame except the last one. --- zipline/history/history_container.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/zipline/history/history_container.py b/zipline/history/history_container.py index ce2da464..f0b31c4a 100644 --- a/zipline/history/history_container.py +++ b/zipline/history/history_container.py @@ -416,6 +416,8 @@ class HistoryContainer(object): # e.g. with leading nans. pass digest_frame = digest_frame.ffill() + + if digest_frame is not None: return_frame.ix[:-1] = digest_frame.ix[:] # Get minutes from our buffer panel to build the last row.