From 0ef89ee7049cbf37081ffbd254dcc18ca73d1047 Mon Sep 17 00:00:00 2001 From: scottsanderson Date: Sat, 18 Aug 2012 22:04:21 -0400 Subject: [PATCH] fix algo_dt logging --- zipline/gens/tradesimulation.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/zipline/gens/tradesimulation.py b/zipline/gens/tradesimulation.py index 14669195..8784a4fc 100644 --- a/zipline/gens/tradesimulation.py +++ b/zipline/gens/tradesimulation.py @@ -303,6 +303,10 @@ class AlgorithmSimulator(object): Run the user's algo against our current snapshot and update the algo's simulated time. """ + # Needs to be set so that we inject the proper date into algo + # log/print lines. + self.snapshot_dt = date + start_tic = datetime.now() self.algo.handle_data(self.universe)