Why YahooFinanceCSVData reports the data is broken?
Jeff Vahue last edited by backtrader
I was using YahooFinanceCSVData and things worked great. Then I tried to subclass GenericCSVData with a new date format and Yahoo stopped working. To isolate the problem I commented out the original Yahoo data and got my new format working. When I re-introduced Yahoo it keeps crashing on the date processing becuase it expects a date string format of 'YYYYMMDD' but the file I just downloaded from Yahoo has the date a like '1/1/1950' as the first entry. I delete my new data type and cannot get Yahoo to parse any more. I can go into the code _loadline at line 129 <dt = date(int(dttxt[0:4]), int(dttxt[5:7]), int(dttxt[8:10]))> and change it but what happened.
Any ideas would be appreciated.
Jeff Vahue last edited by
Make sure you don't open and SAVE a Yahoo data feed from excel as it will change the date format from:
1950-01-01 to 1/1/1950
and that will not work with YahooFinanceCSVData