YahooFinanceData Issue - TypeError: 'module' object is not callable
neoyipeng last edited by
Not sure if anyone else is facing this issue, but I can't seem to use YahooFinanceData properly - google search on the error suggests I'm importing the class improperly.
d = bt.feeds.YahooFinanceData(dataname='MSFT', fromdate=datetime(2011, 1, 1), todate=datetime(2012, 12, 31))
Anything wrong with this? I copied it from one of the examples so was surprised it was not working
vladisld last edited by
You are probably not importing the datetime class from datetime module correctly . Either import it using:
from datetime import datetime