From 89485c6ae372d63dd7137a8f12813390e1dc749f Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Fri, 16 Mar 2012 16:42:39 -0400 Subject: [PATCH] Hack to ignore dataframes in process_event, code seems to be written against namedicts. --- zipline/finance/performance.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/zipline/finance/performance.py b/zipline/finance/performance.py index 9a46f6bb..bf9276c4 100644 --- a/zipline/finance/performance.py +++ b/zipline/finance/performance.py @@ -209,6 +209,15 @@ class PerformanceTracker(): def process_event(self, event): self.event_count += 1 + # TODO: This seems to get both dataframes and namedicts? + # I can't find a corresponding test for this + # function so not sure if this is the desired behavior or + # something is going wrong upstream... + + # hack for now + if isinstance(event, pandas.DataFrame): + return + if(event.dt >= self.market_close): self.handle_market_close()