API: DataFrame/Panel sources expect integer sids, not identifiers

This commit modifies the DataFrameSource and DataPanelSource to accept only Int64Indexes on the incoming data and moves the burden of mapping user identifiers to TradingAlgorithm.run().
This commit is contained in:
jfkirk
2015-07-01 13:43:31 -04:00
parent a4ce9712b8
commit 258b5ea2ca
8 changed files with 83 additions and 33 deletions
+1 -1
View File
@@ -98,7 +98,7 @@ class TestTALIB(TestCase):
zipline_transforms = [ta.MA(timeperiod=10),
ta.MA(timeperiod=25)]
talib_fn = talib.abstract.MA
algo = TALIBAlgorithm(talib=zipline_transforms)
algo = TALIBAlgorithm(talib=zipline_transforms, identifiers=[0])
algo.run(self.source)
# Test if computed values match those computed by pandas rolling mean.
sid = 0