The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

367282 (1) [Avatar] Offline
#1
Page 133 - Listing 8.2 ........ the following does not work , probably due to change in yahoo finance site.

stock_hist = share.get_historical(start_date, end_date)

Suggest to change code to use quandl WIKI data or use updated pandas_datareader from
https://github.com/rgkimball/pandas-datareader
Nishant Shukla (52) [Avatar] Offline
#2
Hi,

I'm not sure why it isn't working for you. Are you on Python 3 and have you installed the latest version of the `yahoo_finance` library?
Raul Cota (1) [Avatar] Offline
#3
the code also does not work for me. Python 3.5.

There is a discussion about changes to API here,
https://stackoverflow.com/questions/44030983/yahoo-finance-url-not-working


A person there also posted an alternative which I haven't tested,
https://github.com/sjev/trading-with-python/blob/3.1.1/lib/yahooFinance.py


It would be nice if the data for this example was made available regardless of changes in the yahoo api