Are you sure you are always reading correct with yahoo finnance?
kcneato opened this issue · 0 comments
HI
(Thanks for this code, great work!)
I have been using the code but quick realised that you probably have defined the yahoo finance service incorrect? you have written the statement as if df is None, while i think it should be if df is Nonen Or df. empty:
If you check your data while pulling the stock data, you will se that the dataframe df, after reading the quandl database file wiki, pretty often is not =none, but insted is just headers but empty. why i think you should add also "or df.emtpy"?!
df = quandl_data(wiki, company[0], start, end)
if df is None or df.empty:
df = yahoo_data(company[0], start, end)
if df is None or df.empty:
skips.add(company)
I am not 100% but this way you are able to get date for any date. If you dont do that you will get very little data for any request you make after 2018 03-30....