我有一个python2.7脚本,它在命令提示符下运行Zipline fine,使用--bundle=myBundle
来加载我用extension.py
注册的自定义数据包myBundle
。在
zipline run -f myAlgo.py --bundle=myBundle --start 2016-6-1 --end 2016-7-1 --data-frequency=minute
问题:然而,当我尝试使用%zipline
IPython魔术来运行算法时,bundle参数--bundle
似乎很难找到myBundle
。在
运行此操作将显示错误
UnknownBundle: No bundle registered with the name u'myBundle'
在使用IPython笔记本时,我们是否必须以不同的方式注册捆绑包?在
这是zipline中已知的(现已关闭)bug,另请参见https://github.com/quantopian/zipline/issues/1542。在
作为解决方法,您可以在使用zipline magic之前在单元格中加载以下内容:
相关问题 更多 >
编程相关推荐