Skip to content

URGENT!!! options data garbled and unusable #193

Closed
@aisthesis

Description

@aisthesis

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:

>>> from pandas_datareader.data import Options
>>> tsla = Options('tsla', 'yahoo')
>>> data = tsla.get_all_data()
>>> data.shape
(1064, 13)
>>> data.index.levels[1]
DatetimeIndex(['2008-04-16', '2015-04-16', '2016-09-16', '2017-06-16',
           '2019-01-18', '2020-01-17', '2020-05-16', '2022-04-16',
           '2029-04-16'],
          dtype='datetime64[ns]', name='Expiry', freq=None)
>>> data.index.levels[1].shape
(9,)

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions