我正在尝试运行一个简单的滑索教程来测试 GOOG 中的交易算法,但无法使其正常工作。这就是问题:
dma = DualMovingAverage()
results = dma.run(data)
返回以下内容:
data msgpacks aren't distributed with source.
Fetching data from Yahoo Finance.
data msgpacks aren't distributed with source.
Fetching data from data.treasury.gov
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-11-daf3c4eec6f3> in <module>()
1 dma = DualMovingAverage()
----> 2 results = dma.run(data)
/home/luis/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/zipline/algorithm.pyc in run(self, source, sim_params, benchmark_return_source)
297 trans_descr['class'],
298 *trans_descr['args'],
--> 299 **trans_descr['kwargs']
300 )
301 sf.namestring = namestring
/home/luis/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/zipline/transforms/utils.pyc in __init__(self, tnfm_class, *args, **kwargs)
111 # usually resolves to our super call.
112 self.state = super(TransformMeta, tnfm_class).__call__(
--> 113 *args, **kwargs)
114 # Normal object instantiation.
115 else:
TypeError: __init__() got an unexpected keyword argument 'days'
我在为我的开发人员使用库(pandas、scikit-learn、numpy、seaborn、mcerp 等加上我自己的具有许多依赖项的库)方面“很重”,所以我不知道这是否与它。
除此之外,我还在一个 Ubuntu(虚拟盒)VM 中运行来自 Enthought 的 Python 2.7 中的所有内容。
有关如何解决此问题的任何帮助?
干杯