Skip to content

followup on Yahoo DataReader issues #356

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

Closed
jreback opened this issue Jul 2, 2017 · 16 comments
Closed

followup on Yahoo DataReader issues #356

jreback opened this issue Jul 2, 2017 · 16 comments

Comments

@jreback
Copy link
Contributor

jreback commented Jul 2, 2017

in #355 I xfailed a couple of tests as they were not pulling data. These should be investigated before the release.

cc @rgkimball

@jreback jreback added this to the 0.5.0 milestone Jul 2, 2017
@jrovegno
Copy link

jrovegno commented Jul 4, 2017

When I put
pdr.get_data_yahoo('SPY')
I get this error
ConnectionError: HTTPConnectionPool(host='ichart.finance.yahoo.com', port=80): Max retries exceeded with url: /table.csv?s=SPY&a=0&b=1&c=2010&d=6&e=4&f=2017&g=d&ignore=.csv (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x0000000009DE1198>: Failed to establish a new connection: [Errno 11004] getaddrinfo failed',))

Similar problem in the docs.

@gliptak
Copy link
Contributor

gliptak commented Jul 4, 2017

@jreback Do you plan to publish 0.5.0 soon? Thanks

https://pypi.python.org/pypi/pandas-datareader

@jreback
Copy link
Contributor Author

jreback commented Jul 4, 2017

yes if this can be resolved soon

@gliptak
Copy link
Contributor

gliptak commented Jul 4, 2017

I cannot reproduce this above with current master (installed as pip install git+git://github.com/pydata/pandas-datareader.git):

➜ pip list | grep pandas-datareader
pandas-datareader (0.5.0)
➜ jupyter-console                  
Jupyter console 5.1.0

Python 2.7.12+ (default, Sep 17 2016, 12:08:02) 
Type "copyright", "credits" or "license" for more information.

IPython 5.4.1 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.



In [1]: import pandas_datareader as pdr

In [2]: pdr.get_data_yahoo('SPY').tail()
Out[2]: 
                  Open        High         Low       Close   Adj Close  \
Date                                                                     
2017-06-27  243.039993  243.380005  241.309998  241.330002  241.330002   
2017-06-28  242.500000  243.720001  242.229996  243.490005  243.490005   
2017-06-29  243.660004  243.720001  239.960007  241.350006  241.350006   
2017-06-30  242.279999  242.710007  241.580002  241.800003  241.800003   
2017-07-03  242.880005  243.380005  242.210007  242.210007  242.210007   

               Volume  
Date                   
2017-06-27   82247700  
2017-06-28   70042600  
2017-06-29  103933000  
2017-06-30   86820700  
2017-07-03   39147200  

In [3]: 

@rgkimball
Copy link
Contributor

rgkimball commented Jul 4, 2017 via email

@jreback
Copy link
Contributor Author

jreback commented Jul 4, 2017

you have to run the test and see what is xfailed

these r all related to dividends in yahoo

@gliptak
Copy link
Contributor

gliptak commented Jul 4, 2017

Yahoo works inconsistently ... For example:

https://github.com/pydata/pandas-datareader/blob/master/pandas_datareader/tests/yahoo/test_yahoo.py#L215 (SPLIT) returns 0.0 and 0.14285714

https://github.com/pydata/pandas-datareader/blob/master/pandas_datareader/tests/yahoo/test_yahoo.py#L112 returns 251 and 252 (missing and containing 2013-12-31)

How would you see the tests updated re this above? Thanks

https://travis-ci.org/gliptak/pandas-datareader/jobs/250111075

@jreback
Copy link
Contributor Author

jreback commented Jul 4, 2017

(pandas) bash-3.2$ ./test.sh 
=========================================================================================== test session starts ===========================================================================================
platform darwin -- Python 3.6.1, pytest-3.1.2, py-1.4.34, pluggy-0.4.0
rootdir: /Users/jreback/pandas-datareader, inifile:
plugins: cov-2.3.1, xdist-1.16.0
collected 110 items 

pandas_datareader/tests/test_base.py ....
pandas_datareader/tests/test_data.py .sX...
pandas_datareader/tests/test_edgar.py ssss
pandas_datareader/tests/test_enigma.py ssss
pandas_datareader/tests/test_eurostat.py ....
pandas_datareader/tests/test_famafrench.py ......
pandas_datareader/tests/test_fred.py ..s..s.
pandas_datareader/tests/test_nasdaq.py .
pandas_datareader/tests/test_oanda.py ss
pandas_datareader/tests/test_oecd.py ...
pandas_datareader/tests/test_tsp.py ..
pandas_datareader/tests/test_wb.py ........
pandas_datareader/tests/google/test_google.py ............
pandas_datareader/tests/google/test_options.py .........
pandas_datareader/tests/io/test_jsdmx.py ..
pandas_datareader/tests/io/test_sdmx.py .
pandas_datareader/tests/yahoo/test_options.py ...............
pandas_datareader/tests/yahoo/test_yahoo.py ......sss..x..XX..X.
========================================================================================= short test summary info =========================================================================================
XFAIL pandas_datareader/tests/yahoo/test_yahoo.py::TestYahoo::()::test_get_data_interval
  failing after #355
XPASS pandas_datareader/tests/test_data.py::TestDataReader::()::test_read_yahoo_dividends failing after #355
XPASS pandas_datareader/tests/yahoo/test_yahoo.py::TestYahoo::()::test_get_date_ret_index failing after #355
XPASS pandas_datareader/tests/yahoo/test_yahoo.py::TestYahoo::()::test_get_data_yahoo_actions failing after #355
XPASS pandas_datareader/tests/yahoo/test_yahoo.py::TestYahoo::()::test_yahoo_DataReader failing after #355

right so the XPASS ones you can prob just take the decorator off and add the @skip_on_exception(RemoteDataError). these happened to fail at times and were annoying. they look correct though.

the get_data_interval is consistenty failing though so should be fixed (not sure what is wrong)

@jreback
Copy link
Contributor Author

jreback commented Jul 4, 2017

I think for the inconsistencies you can just make the test less strict, e.g. accept 251 or 252 (odd that yahoo is like that), just add a comment about this.

@jreback jreback added the testing label Jul 4, 2017
@rgkimball
Copy link
Contributor

rgkimball commented Jul 4, 2017 via email

@gliptak
Copy link
Contributor

gliptak commented Jul 4, 2017

@rgkimball https://github.com/pydata/pandas-datareader/blob/master/pandas_datareader/yahoo/daily.py#L100

As example values, self.start comes in as 2010-01-01 00:00:00 and self.end comes in as 2013-01-27 00:00:00

Maybe self.end to be modified to 2013-01-27 23:59:59? Just during conversion or earlier in the code?

This doesn't introduce time zones (yet) ...

@jreback
Copy link
Contributor Author

jreback commented Jul 7, 2017

if someone has a chance.....this (and #296) are remaining for 0.5.0

@gliptak
Copy link
Contributor

gliptak commented Jul 11, 2017

Yahoo get_components is also broken #238

@gliptak
Copy link
Contributor

gliptak commented Jul 13, 2017

@jreback Could current master be released as 0.5.0? It is an improvement, as Yahoo currently doesn't work altogether ... Thanks

@jreback
Copy link
Contributor Author

jreback commented Jul 14, 2017

I think the remainer of the xfails should be addressed. Then can do the release.

@jreback jreback modified the milestones: 0.6.0, 0.5.0 Jul 22, 2017
@bashtage
Copy link
Contributor

Yahoo has been deprecated.

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

No branches or pull requests

5 participants