From 5758f885c5be0089b646ac1aeb8bc82e206b73ee Mon Sep 17 00:00:00 2001 From: Eddie Hebert Date: Wed, 10 Jul 2013 15:37:03 -0400 Subject: [PATCH] TST: Update talib example for compatibility with multiple sids. To support mulitple sids the TALib transforms now return a dict, instead of a float. Accordingly, the TALib example script now needs to index into the transform result. --- zipline/examples/dual_ema_talib.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zipline/examples/dual_ema_talib.py b/zipline/examples/dual_ema_talib.py index 38f12741..a8846718 100644 --- a/zipline/examples/dual_ema_talib.py +++ b/zipline/examples/dual_ema_talib.py @@ -63,8 +63,8 @@ class DualEMATaLib(TradingAlgorithm): self.sell = True self.record(AAPL=data['AAPL'].price, - short_ema=self.short_ema, - long_ema=self.long_ema, + short_ema=self.short_ema['AAPL'], + long_ema=self.long_ema['AAPL'], buy=self.buy, sell=self.sell)