From 473dafcfb6e7d6c0862f4f1f1b97283c16b66bc0 Mon Sep 17 00:00:00 2001 From: scottsanderson Date: Tue, 14 Aug 2012 16:31:00 -0400 Subject: [PATCH] fix DONE bug when all events are in the warmup period --- zipline/gens/tradesimulation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zipline/gens/tradesimulation.py b/zipline/gens/tradesimulation.py index ba474f3b..22afa34f 100644 --- a/zipline/gens/tradesimulation.py +++ b/zipline/gens/tradesimulation.py @@ -222,7 +222,7 @@ class AlgorithmSimulator(object): # update our universe, but don't start a snapshot or # pass anything to handle_data. Discard any # perf messages. - if event.dt < self.algo_start: + if event.dt != 'DONE' and event.dt < self.algo_start: self.update_universe(event) if event.perf_message: log.info("Discarding perf message because we're in warmup.")