ranaroussi / yfinance

Download market data from Yahoo! Finance's API
https://aroussi.com/post/python-yahoo-finance
Apache License 2.0
12.1k stars 2.22k forks source link

earnings_dates not available #1932

Open yunhongz opened 2 weeks ago

yunhongz commented 2 weeks ago

Describe bug

The earnings_dates record is not available

Simple code that reproduces your problem

import yfinance as yf msft = yf.Ticker('MSFT') msft.earnings_dates

Debug log

image

Bad data proof

No response

yfinance version

yfinance 0.2.38

Python version

python3.10

Operating system

ubuntu

ValueRaider commented 2 weeks ago

Yahoo has changed table structure

                                  Event Name  Earnings Call Time  EPS Estimate  Reported EPS  Surprise(%)
0                   Q1 2024 Earnings Release   Time Not Supplied           NaN           NaN          NaN
1                      Q1 2024 Earnings Call                 TAS           NaN           NaN          NaN
2                   Q1 2024 Earnings Release   Time Not Supplied           NaN           NaN          NaN
3   at Bank of America Healthcare Conference                 TAS           NaN           NaN          NaN
4                Annual Shareholders Meeting                 TAS          1.95          1.59      -0.1846
5                   Q1 2024 Earnings Release   Time Not Supplied           NaN           NaN          NaN
6                   Q3 2023 Earnings Release  After Market Close           NaN           NaN          NaN
7                   Q4 2023 Earnings Release  After Market Close           NaN           NaN          NaN
8   at Bank of America Healthcare Conference                 TAS         -0.74           NaN          NaN
9                   Q1 2024 Earnings Release   Time Not Supplied           NaN           NaN          NaN
10               Annual Shareholders Meeting   Time Not Supplied           NaN           NaN          NaN
11                  Q4 2023 Earnings Release  After Market Close           NaN           NaN          NaN

Event name is nice addition, but losing dates a problem. Hoping for a way to get old structure.

Probably Yahoo has broken their redesign rollout, because their Find earnings for symbol search doesn't work: https://finance.yahoo.com/calendar/earnings?symbol=MSFT

hjlgood commented 2 weeks ago

Looks like yahoo fixed their problem. yfinance works fine now. I suggest you close this issue.

ValueRaider commented 2 weeks ago

I suspect it will return, I've seen this alternative table randomly rarely over last few weeks. Yahoo is up to something...

michaelmoopenn commented 2 weeks ago

For some tickers, it works and some others it doesn't. At this time, ENB.TO works, TSLA still gives the issue.

yunhongz commented 2 weeks ago

It returned to normal, interesting!