Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Yahoo Finance widget will not load data #291

@chrislee35

Description

@chrislee35

current yfinance version 0.2.52 API no longer has yf.pdr_override(). I can work around this issue by pinning version yfinance==0.2.38.
Please update orangecontrib/timeseries/datasources.py to use the new API.

Replace

    yf.pdr_override()
    f = pdr.get_data_yahoo(symbol, since, until)

With

  dat = yf.Ticker(symbol)
  dat.history(start=since, end=until)

There are 2 new columns, and it dropped the Adj Close column.

Before

                  Open        High         Low       Close   Adj Close    Volume
Date                                                                            
2020-01-02  158.779999  160.729996  158.330002  160.619995  153.630707  22622100
2020-01-03  158.320007  159.949997  158.059998  158.619995  151.717728  21116200

After

                                 Open        High         Low       Close    Volume  Dividends  Stock Splits
Date                                                                                                        
2020-01-02 00:00:00-05:00  151.870762  153.735906  151.440346  153.630692  22622100        0.0           0.0
2020-01-03 00:00:00-05:00  151.430809  152.989871  151.182113  151.717743  21116200        0.0           0.0

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