-
Notifications
You must be signed in to change notification settings - Fork 679
URGENT!!! options data garbled and unusable #193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I've figured out what is happening. It's a de-serialization issue. The day of the month is being interpreted as the year, and the year as the day of the month. Maybe Yahoo! changed something. Continuing from above example:
Note that 2008-04-16 is not a valid expiry at the moment. All expiries for currently available options are in the future. But if we interpret the last 2 digits of the year as the day and the day given above as the year, we get a list of currently valid expiries. The days are always 16, 17 or 18. The weeklies are provided for April, and otherwise we just get 3rd Friday of the month. This is an urgent issue, as it makes the options data completely unusable in the current release!!!! |
Additional suggestion: Put in an integration test that verifies that all expiries are later than current date. That would pick up this error. |
The
|
I don't have this problem on a server running |
As I eventually discovered, the problem arises when upgrading |
@aisthesis FYI, the launchpad is the old dateutil location. The new location is on github. I suspect this is due to dateutil/dateutil#233, which was fixed with dateutil/dateutil#234. The mitigation is to use There will be a 2.5.3 release soon, I am anticipating a new tzdata release soon and I was hoping to get the two to coincide. |
An other project seems to have some problems with updated version of python-dateutil man-group/arctic#118 |
Maybe I'm mis-understanding the problem then. In the linked PR, they were evidently counting on The changed behavior is that when you have a date like this: "2011-01-05", that can be parsed either as YYYY-MM-DD or YYYY-DD-MM, and both of those are date formats that are actually in use, so the The issue I referred to above is for dates like 2011-01-15, which is completely unambiguous. In that case, the Just remove the |
@pganssle |
Yes, I believe I misunderstood your issue. The issue I mentioned would be raising My understanding is that |
I believe this is fixed with the new options parser in #244. Please reopen if not. |
When using
pandas_datareader.data.Options
to get options data from yahoo, I'm only getting back a small selection even though the Yahoo! charts on the website contain the data I need. For example:Yahoo finance, however, shows far more expiration dates, such as '2016-06-17'. Maybe it's something Yahoo is doing, but it's also disconcerting for me, since I'm getting this right after upgrading pandas_datareader to the latest version.
The text was updated successfully, but these errors were encountered: