我正在尝试使用pyalgotrade (版本0.18)的yahoofinance.build_feed来构建包含OHLC数据的cvs文件。我不知道为什么我会犯这个错误。谢谢你的帮助。
from pyalgotrade.tools import yahoofinance
instruments = ["orcl"]
feed = yahoofinance.build_feed(instruments, 2010, 2015, './csv', 86400, timezone=None, skipErrors=True)不幸的是,我得到的错误是
>>> runfile('/home/marco/.config/spyder-py3/temp.py', wdir='/home/marco/.config/spyder-py3')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/marco/miniconda3/lib/python3.5/site-packages/spyder/utils/site/sitecustomize.py", line 866, in runfile
execfile(filename, namespace)
File "/home/marco/miniconda3/lib/python3.5/site-packages/spyder/utils/site/sitecustomize.py", line 102, in execfile
exec(compile(f.read(), filename, 'exec'), namespace)
File "/home/marco/.config/spyder-py3/temp.py", line 8, in <module>
from pyalgotrade.tools import yahoofinance
File "/home/marco/miniconda3/lib/python3.5/site-packages/pyalgotrade/tools/yahoofinance.py", line 119
except Exception, e:
^
SyntaxError: invalid syntax谢谢,马可。
发布于 2017-01-06 08:40:38
使用Python2.7进行尝试,Python 2.7与Python3.4相比是稳定的
https://stackoverflow.com/questions/41284350
复制相似问题