Skip to content

Google data source broken for mutual funds #220

@illbebach

Description

@illbebach
import pandas_datareader.data as web
import datetime

start = datetime.datetime(2010, 1, 1)
end = datetime.datetime(2013, 1, 27)

f = web.DataReader("F", 'google', start, end)  # this works
f = web.DataReader("VFINX", 'google', start, end)  # this dies

output

Traceback (most recent call last):
  File "google_bug.py", line 9, in <module>
    f = web.DataReader("VFINX", 'google', start, end)
  File "C:\Anaconda2\lib\site-packages\pandas_datareader\data.py", line 105, in DataReader
    session=session).read()
  File "C:\Anaconda2\lib\site-packages\pandas_datareader\base.py", line 173, in read
    df = self._read_one_data(self.url, params=self._get_params(self.symbols))
  File "C:\Anaconda2\lib\site-packages\pandas_datareader\base.py", line 80, in _read_one_data
    out = self._read_url_as_StringIO(url, params=params)
  File "C:\Anaconda2\lib\site-packages\pandas_datareader\base.py", line 91, in _read_url_as_StringIO
    response = self._get_response(url, params=params)
  File "C:\Anaconda2\lib\site-packages\pandas_datareader\base.py", line 117, in _get_response
    raise RemoteDataError('Unable to read URL: {0}'.format(url))
pandas_datareader._utils.RemoteDataError: Unable to read URL: http://www.google.com/finance/historical

Google supplies "Date, Open, High, Low, Close, Volume" columns for stocks, but only "Date, Close" for mutual funds.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions