Skip to content

Expiration date being parsed incorrectly #207

@jasonstrimpel

Description

@jasonstrimpel

Expiration dates are being parsed incorrectly.

Example.

The following symbol "IBM160715C00060000" is being parsed as 2015-07-16 (2015/June/16) when it should be parsed as 2016-07-15 (2016/June/15)

In pandas-datareader/pandas_datareader/yahoo/options.py, the to_datetime method call on line 680 should be called as follows:

frame["Expiry"] = to_datetime(frame.Rootexp.str[-6:], yearfirst=True)

to_datetime is defined pandas/pandas/tseries/tools.py on line 171.

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