Repository navigation
Description
Describe bug
Downloadig with
yf.download(ticker, start = start, end = end)
everything is fine except the last day: only the volume appears in the last line.
Simple code that reproduces your problem
datar = yf.download(ticker, start = start, end = end)
Debug log with debug logging enabled
[100%**] 1 of 1 completed
DEBUG Disabling multithreading because DEBUG logging enabled
DEBUG Entering history()
DEBUG Entering history()
DEBUG MU: Yahoo GET parameters: {'period1': '2021-07-28 00:00:00-04:00', 'period2': '2026-07-27 00:00:00-04:00', 'interval': '1d', 'includePrePost': False, 'events': 'div,splits,capitalGains'}
DEBUG MU: yfinance received OHLC data: 2021-07-28 13:30:00 -> 2026-07-24 13:30:00
DEBUG MU: OHLC after cleaning: 2021-07-28 09:30:00-04:00 -> 2026-07-24 09:30:00-04:00
DEBUG MU: OHLC after combining events: 2021-07-28 00:00:00-04:00 -> 2026-07-24 00:00:00-04:00
DEBUG MU: yfinance returning OHLC: 2021-07-28 00:00:00-04:00 -> 2026-07-24 00:00:00-04:00
DEBUG Exiting history()
DEBUG Exiting history()
DEBUG Exiting download()
DEBUG Entering download()
DEBUG Disabling multithreading because DEBUG logging enabled
DEBUG Entering history()
DEBUG Entering history()
DEBUG MU: Yahoo GET parameters: {'period1': '2021-07-28 00:00:00-04:00', 'period2': '2026-07-27 00:00:00-04:00', 'interval': '1d', 'includePrePost': False, 'events': 'div,splits,capitalGains'}
DEBUG MU: yfinance received OHLC data: 2021-07-28 13:30:00 -> 2026-07-24 13:30:00
DEBUG MU: OHLC after cleaning: 2021-07-28 09:30:00-04:00 -> 2026-07-24 09:30:00-04:00
DEBUG MU: OHLC after combining events: 2021-07-28 00:00:00-04:00 -> 2026-07-24 00:00:00-04:00
DEBUG MU: yfinance returning OHLC: 2021-07-28 00:00:00-04:00 -> 2026-07-24 00:00:00-04:00
DEBUG Exiting history()
DEBUG Exiting history()
DEBUG Exiting download()
Bad data proof
Price Close High Low Open Volume
Ticker MU MU MU MU MU
Date
2026-07-20 865.460022 901.000000 858.900024 885.570007 37705200
2026-07-21 970.820007 982.880005 916.570007 925.349976 49369000
2026-07-22 959.479980 982.619995 936.059998 938.250000 31588600
2026-07-23 990.210022 1011.770020 964.400024 975.130005 40196300
2026-07-24 NaN NaN NaN NaN 40626435
yfinance version
1.5.2
Python version
3.12
Operating system
W8.11
Activity
llninja1 commentedon Jul 27, 2026
I see the same thing.
[140 rows x 5 columns]
Josejsi commentedon Jul 27, 2026
Confirming the same issue, reproduced independently on multiple unrelated symbols — so this isn't ticker-specific.
yfinance version: 1.5.2 (also present on 1.2.0 before upgrading — upgrading did not fix it)
curl_cffi version: 0.15.0
Python 3.12, Windows
Affected: ^GSPC, ^NYA, ^IXIC (indices), AAPL, MSFT, JPM, SPY — all show the same pattern as MU above: Volume present for 2026-07-24, all OHLC fields NaN.
As of 2026-07-27 (3+ days later) the gap has not self-resolved on any of these symbols.
Cross-checked the actual 2026-07-24 S&P 500 close against FRED and Investing.com — both have complete data for that session (7,411.98), so the underlying data exists; it seems to be specifically missing/malformed in Yahoo's chart API response consumed by yfinance.
Date
2026-07-23 00:00:00-04:00 321.730011 321.660004 40840800
2026-07-24 00:00:00-04:00 NaN NaN 47460975
ValueRaider commentedon Jul 27, 2026
Where is the proof that Yahoo has data?
We are not affiliated with Yahoo
llninja1 commentedon Jul 29, 2026
Here is an interesting twist. Asking for one ticker only has NaNs on the Jul 28, but the line for the 24th is just missing (no NaNs, no line at all). Using yf.download() for multiple tickers is shows NaNs on some tickers for both the Jul 24 and 28th.
Josejsi commentedon Jul 29, 2026
I can confirm a very strange pattern in Yahoo's daily history.
During the July 28 trading session, Yahoo was returning valid intraday daily bars for July 28. However, on July 29, those July 28 rows are still present but their OHLC and adjusted close values have become
NaN, with volume set to zero.At the same time, Yahoo is already returning valid intraday bars for July 29 for symbols such as
^GSPC,^IXIC,^VIX,SPY, andQQQ.Examples observed on July 29 at 09:39 EDT:
SPY: July 28 row exists, but OHLC isNaN; July 29 already has a valid intraday bar.QQQ: same behavior.^GSPC: July 28 row exists withNaN; July 29 has a valid intraday bar.^NYA: July 28 and July 29 rows exist, but both currently haveNaN.^VIX3M: several consecutive sessions are present only as rows withNaN.This suggests that a valid intraday bar may later be replaced or regenerated as an empty daily row. Therefore, checking only whether the date exists is not sufficient; consumers must also validate that
Closeis numeric and non-null.This is causing daily ingestion pipelines to see the current session while the previous completed session remains invalid.
plajos1 commentedon Aug 4, 2026
It is strange if you use:
yf.download(ticker, start=today, end=tomorrow, prepost=True)
then the data is OK, but if the period is longer than one day, the last day will only show the volume. This means that yahoo gives the data, but there is an error in the handling of it. Currently the solution is to download the data in two steps:
from start to day before yesterday and concat it with the last data which is read by the abovementioned method. I hope there will be a solution in the yfinance soon...
plajos1 commentedon Aug 18, 2026
Strange behaviour: running the program before ET 0:00:00 will give back the proper data for the last day. After that the last line filled with "nan"s and the proper volume value. During the day it changes and the OCHL data will appear in the last line too.
plajos1 commentedon Aug 18, 2026
If you use the 'repair' option, then the problem disappears:
yf.download(ticker, start = start, end = end, repair=True)
llninja1 commentedon Aug 18, 2026
I cannot get repair to work at all.
yf.download('AEI')
[100%**] 1 of 1 completed
Out[2]:
Price Close High Low Open Volume
Ticker AEI AEI AEI AEI AEI
Date
2026-07-20 1.14 1.250 1.140 1.180 10700
2026-07-21 1.14 1.190 1.140 1.160 3900
2026-07-22 1.10 1.210 1.060 1.180 19800
2026-07-23 1.08 1.150 1.060 1.060 7700
2026-07-24 1.09 1.140 1.080 1.140 4500
2026-07-27 1.05 1.140 1.050 1.140 5800
2026-07-28 1.04 1.070 1.030 1.050 9100
2026-07-29 1.05 1.050 1.030 1.040 10000
2026-07-30 1.06 1.090 1.050 1.090 4600
2026-07-31 1.02 1.055 1.000 1.050 8000
2026-08-03 1.05 1.110 1.030 1.034 13300
2026-08-04 1.09 1.280 1.070 1.070 24100
2026-08-05 1.09 1.090 1.080 1.080 2100
2026-08-06 1.24 1.240 1.110 1.140 11400
2026-08-07 1.18 1.215 1.110 1.120 9100
2026-08-10 1.07 1.140 1.050 1.120 6100
2026-08-12 1.12 1.167 1.060 1.120 3200
2026-08-13 1.17 1.200 1.090 1.090 30600
2026-08-14 1.34 1.370 1.175 1.175 20000
2026-08-17 NaN NaN NaN NaN 254027
yf.download('AEI', repair=True)
[100%**] 1 of 1 completed
Out[3]:
Empty DataFrame
Columns: [(Adj Close, AEI), (Close, AEI), (High, AEI), (Low, AEI), (Open, AEI), (Volume, AEI)]
Index: []
yf.download('AEI', start='2026-06-20', repair=True)
[100%**] 1 of 1 completed
Out[4]:
Empty DataFrame
Columns: [(Adj Close, AEI), (Close, AEI), (High, AEI), (Low, AEI), (Open, AEI), (Volume, AEI)]
Index: []
yf.download('AEI', start='2026-06-20', end='2026-08-17', repair=True)
[100%**] 1 of 1 completed
Out[5]:
Empty DataFrame
Columns: [(Adj Close, AEI), (Close, AEI), (High, AEI), (Low, AEI), (Open, AEI), (Volume, AEI)]
Index: []
llninja1 commentedon Aug 18, 2026
Interesing, there are also holes in the data from the 11th. At this point if it is Yahoo Finance and not yfinance, then I'm probably going to have to look into switching to another data service.
yf.download('AEI RIVN AM SPY AAPL').Close
[100%**] 5 of 5 completed
Out[11]:
Ticker AAPL AEI AM RIVN SPY
Date
2026-07-20 326.308563 1.14 22.366207 17.240000 742.090027
2026-07-21 327.457581 1.14 22.277138 17.760000 748.280029
2026-07-22 325.609192 1.10 22.613621 17.180000 747.409973
2026-07-23 321.382843 1.08 22.771967 16.459999 738.179993
2026-07-24 332.733032 1.09 22.514656 15.840000 738.929993
2026-07-27 336.619690 1.05 21.742723 16.480000 739.090027
2026-07-28 339.786926 1.04 21.525000 16.690001 740.859985
2026-07-29 337.898590 1.05 21.520000 16.330000 729.460022
2026-07-30 333.142670 1.06 21.549999 16.830000 741.690002
2026-07-31 308.643829 1.02 21.969999 15.220000 747.030029
2026-08-03 303.158569 1.05 21.980000 15.355000 757.669983
2026-08-04 309.113403 1.09 21.850000 15.760000 771.330017
2026-08-05 310.732025 1.09 21.160000 15.560000 769.789978
2026-08-06 312.140808 1.24 21.490000 15.380000 768.559998
2026-08-07 313.059998 1.18 21.270000 16.000000 773.260010
2026-08-10 308.260010 1.07 21.940001 16.389999 773.030029
2026-08-11 304.910004 NaN NaN 16.360001 770.559998
2026-08-12 302.250000 1.12 22.240000 15.930000 772.489990
2026-08-13 305.260010 1.17 22.080000 15.820000 777.880005
2026-08-14 305.929993 1.34 22.549999 15.360000 776.340027
2026-08-17 NaN NaN NaN NaN NaN
Josejsi commentedon Aug 18, 2026