From 43d375700469be3ff50235ce441fb9fb40a8c891 Mon Sep 17 00:00:00 2001 From: Matti Hanninen Date: Fri, 14 Jun 2013 14:17:16 +0300 Subject: [PATCH] DOC: Fix docstring for TradingAlgorithm Get the amount from the algorithm object instead of referring to a (undefined) global. --- zipline/algorithm.py | 1 + 1 file changed, 1 insertion(+) diff --git a/zipline/algorithm.py b/zipline/algorithm.py index 02d0b3cc..4a89df59 100644 --- a/zipline/algorithm.py +++ b/zipline/algorithm.py @@ -69,6 +69,7 @@ class TradingAlgorithm(object): def handle_data(self, data): sid = self.sids[0] + amount = self.amount self.order(sid, amount) ``` To then to run this algorithm: