From e50858315bb07f4eb4513f28d5b6a5df4c505a5d Mon Sep 17 00:00:00 2001 From: puppy Date: Sun, 1 Nov 2015 09:10:17 -0600 Subject: [PATCH] BUG: Issue #801 Initializing TradingAlgorithm Object Does Not Set _analyze Method in algorithm.py Added one line to check for the keyword argument 'analyze' and set the the _analyze method when a TradingAlgorithm object is initialized within a script. --- zipline/algorithm.py | 1 + 1 file changed, 1 insertion(+) diff --git a/zipline/algorithm.py b/zipline/algorithm.py index 38daf6e7..c0416ad2 100644 --- a/zipline/algorithm.py +++ b/zipline/algorithm.py @@ -267,6 +267,7 @@ class TradingAlgorithm(object): self.algoscript = kwargs.pop('script', None) self._initialize = None + self._analyze = kwargs.pop('analyze', None) self._before_trading_start = None self._analyze = None