I am trying to use yahoofinance.build_feed
from pyalgotrade (version 0.18) to build a cvs file containing OHLC data. I have no clue why I get this error. Thank you for any help.
from pyalgotrade.tools import yahoofinance
instruments = ["orcl"]
feed = yahoofinance.build_feed(instruments, 2010, 2015, './csv', 86400, timezone=None, skipErrors=True)
Unfortunately, the error I got is
>>> 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
Thanks, Marco.
Try it using Python 2.7 Python 2.7 is stable compared to Python 3.4