Fix For Obtaining Yahoo Historical Data - #52
Conversation
changed date formats in get_historical_prices from YYYYMMDD to YYY-MM-DD
updated README.rst
|
Tested locally, and seems to work for me. |
| 'cookie': cookies} | ||
|
|
||
|
|
||
| def get_historical_prices(symbol, start_date, end_date, interval='1d'): |
There was a problem hiding this comment.
I might be using this wrong, but can 'interval' only be a number of days? If so, maybe rename the variable to interval_days and have the input be an int? That will make it more clear how it's used.
There was a problem hiding this comment.
interval variable can take the following:
This determines if you would like to obtain data rolled up daily, weekly or monthly. Changing it to interval days might be misleading. However this library was used to obtain only daily data before so we could remove it as an argument.
What do you think?
There was a problem hiding this comment.
Oh I see. Hmm... Either way seems fine. Maybe keep it because being able to request at a specific interval would be sweet :D although could you add a small docstring explaining the options?
There was a problem hiding this comment.
No problem. Will add it and push the update. Any idea why Travis returns wrong assert?
There was a problem hiding this comment.
Done with the requested changes
johnjackoleary
left a comment
There was a problem hiding this comment.
Looks good. No clue on Travis... :/
| from urllib import urlencode | ||
| import sys | ||
| reload(sys) | ||
| sys.setdefaultencoding('utf8') |
There was a problem hiding this comment.
please don't reload sys to change the default encoding
|
hmm.. travis still failing. I'd like to get this merged. |

Fix to update API to get historical data based on recent changes made by Yahoo. Inspired by fix in pandas_reader using cookies