diff --git a/zipline/algorithm.py b/zipline/algorithm.py index 72a9365f..4a89df59 100644 --- a/zipline/algorithm.py +++ b/zipline/algorithm.py @@ -63,11 +63,13 @@ 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] + amount = self.amount self.order(sid, amount) ``` To then to run this algorithm: