Skip to content

BUG: Fix yahoo options #244

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

Merged
merged 5 commits into from
Nov 10, 2016
Merged

Conversation

beluga9
Copy link
Contributor

@beluga9 beluga9 commented Sep 26, 2016

This updates yahoo_options to use the json endpoint that's now in use by the Yahoo Finance site (Issue #212)

It adds the following columns to the existing list of columns:

  • Last_Trade_Date: the last trade datetime
  • JSON: a JSON object containing the raw json, which can be useful if additional data is needed that is not in the DataFrame's columns

@beluga9 beluga9 changed the title Fix yahoo options Fix yahoo options (Issue #212) Sep 26, 2016
@beluga9 beluga9 changed the title Fix yahoo options (Issue #212) Fix yahoo options Sep 26, 2016
@femtotrader
Copy link
Contributor

Thanks @beluga9
Don't worry CI is failing because of EDGAR tests #226
Pinging @jtkiley

@duncangh
Copy link

Hi, I apologize if this is not the correct channel for this note, I am new to Github. I've retrofitted some of the original Options code to work on nasdaq's options pages. Also working to do the same for Financial Statement data from zacks.com (BS, IS and SCF). I would love to contribute to this project, but am new to source control. Feel free to contact me at [email protected] with feedback or suggestions.

Thank you all for developing such a great project. I am extremely impressed by the scope of data accessibility provided by datareader.

Best,
Graham H. Duncan
Nasdaq Options.txt

@femtotrader
Copy link
Contributor

femtotrader commented Oct 18, 2016

@beluga9 there are some (minor) flake8 errors

see
https://travis-ci.org/pydata/pandas-datareader/jobs/162668229

The command "nosetests -v --with-coverage --cover-package=pandas_datareader" exited with 0.
$ flake8 --ignore E501 pandas_datareader
pandas_datareader/yahoo/options.py:138:5: E303 too many blank lines (2)
pandas_datareader/yahoo/options.py:161:5: E303 too many blank lines (2)
pandas_datareader/yahoo/options.py:586:5: E303 too many blank lines (2)
pandas_datareader/yahoo/options.py:599:5: E303 too many blank lines (2)
pandas_datareader/yahoo/options.py:612:5: E303 too many blank lines (2)
pandas_datareader/yahoo/options.py:695:5: E303 too many blank lines (2)
pandas_datareader/yahoo/options.py:745:5: E303 too many blank lines (2)

Could you fix them?

That will be very nice.

('Ask', 'ask', float), ('Chg', 'change', float),
('PctChg', 'percentChange', float), ('Vol', 'volume', int),
('Open_Int', 'openInterest', int), ('IV', 'impliedVolatility', float),
('Last_Trade_Date', 'lastTradeDate', long)]:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

long is not valid with Python 3
Maybe you might add

import pandas.compat as compat 

and use compat.long

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just changed it to int as the long was not necessary.

@jamestbrown
Copy link

👍 This is amazing! Thank you!

@femtotrader
Copy link
Contributor

If everyone is ok I will merge this great PR in the next coming days.
Thanks @beluga9

@beluga9 beluga9 changed the title Fix yahoo options BUG: Fix yahoo options Nov 7, 2016
@femtotrader femtotrader merged commit 91d09a0 into pydata:master Nov 10, 2016
@jamestbrown
Copy link

Thanks!

@MaxGally
Copy link

MaxGally commented Dec 2, 2016

How can I upgrade to the latest version of pandas_datareader? I have run "pip install --upgrade pandas_datareader". If I run "import pandas_datareader as pd", "pd.version". I get '0.2.1'.
It looks that the Yahoo fix is in version 0.2.2.
My goal is to be able to query Yahoo in order to retrieve stop options values.
Thank you.

@femtotrader
Copy link
Contributor

femtotrader commented Dec 2, 2016

Latest version of pandas_datareader is not published on Pypi.
So you might install latest development version

See https://github.com/pydata/pandas-datareader#install-latest-development-version

@MaxGally
Copy link

MaxGally commented Dec 2, 2016

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants