From d475766c63a335409f3786f78f71f2a31ad53d00 Mon Sep 17 00:00:00 2001 From: Matti Hanninen Date: Fri, 14 Jun 2013 13:13:36 +0300 Subject: [PATCH] DOC: Fix docstring for TradingAlgorithm Fix the example given in the class docstring as the original didn't work on REPL. --- zipline/algorithm.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/zipline/algorithm.py b/zipline/algorithm.py index 72a9365f..02d0b3cc 100644 --- a/zipline/algorithm.py +++ b/zipline/algorithm.py @@ -63,10 +63,11 @@ class TradingAlgorithm(object): A new algorithm could look like this: ``` class MyAlgo(TradingAlgorithm): - def initialize(amount): + def initialize(self, sids, amount): + self.sids = sids self.amount = amount - def handle_data(data): + def handle_data(self, data): sid = self.sids[0] self.order(sid, amount) ```