Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot successfully retrieve data after 2022 in .download and .history. 1mo 3mo #1895

Open
nokemono opened this issue Mar 31, 2024 · 0 comments

Comments

@nokemono
Copy link

Describe bug

Cannot successfully retrieve data after 2022 in .download and .history.
'interval=1mo'
and
'interval=3mo'
do not seem to work correctly.

Simple code that reproduces your problem

import yfinance as yf

yf.enable_debug_mode()

stock_symbol = 'AAPL'

stock_data = yf.download(stock_symbol, period="max", interval='1mo', actions=True)

print(stock_data)

Debug log

DEBUG Entering download()
DEBUG Disabling multithreading because DEBUG logging enabled
DEBUG Entering history()
DEBUG Entering history()
DEBUG AAPL: Yahoo GET parameters: {'period1': '1925-04-24 19:00:00-05:00', 'period2': '2024-03-31 03:48:09-04:00', 'interval': '1mo', 'includePrePost': False, 'events': 'div,splits,capitalGains'}
DEBUG Entering get()
DEBUG url=https://query2.finance.yahoo.com/v8/finance/chart/AAPL
DEBUG params={'period1': -1410220800, 'period2': 1711871289, 'interval': '1mo', 'includePrePost': False, 'events': 'div,splits,capitalGains'}
DEBUG Entering _get_cookie_and_crumb()
DEBUG cookie_mode = 'basic'
DEBUG Entering _get_cookie_and_crumb_basic()
DEBUG loaded persistent cookie
DEBUG reusing cookie
DEBUG crumb = 'C4zbuQbf2Zp'
DEBUG Exiting _get_cookie_and_crumb_basic()
DEBUG Exiting _get_cookie_and_crumb()
DEBUG response code=200
DEBUG Exiting get()
DEBUG AAPL: yfinance received OHLC data: 1985-01-01 05:00:00 -> 2024-03-28 20:00:00
DEBUG AAPL: OHLC after cleaning: 1985-01-01 00:00:00-05:00 -> 2024-03-01 00:00:00-05:00
DEBUG AAPL: OHLC after combining events: 1985-01-01 00:00:00-05:00 -> 2024-03-01 00:00:00-05:00
DEBUG AAPL: yfinance returning OHLC: 1985-01-01 00:00:00-05:00 -> 2024-03-01 00:00:00-05:00
DEBUG Exiting history()
DEBUG Exiting history()
DEBUG Exiting download()
Open High ... Dividends Stock Splits
Date ...
1985-01-01 0.520100 0.555814 ... 0.00 0.0
1985-02-01 0.511171 0.549114 ... 0.00 0.0
1985-03-01 0.444200 0.464285 ... 0.00 0.0
1985-04-01 0.386171 0.410714 ... 0.00 0.0
1985-05-01 0.372771 0.397328 ... 0.00 0.0
... ... ... ... ... ...
2023-05-01 NaN NaN ... 0.24 0.0
2023-08-01 NaN NaN ... 0.24 0.0
2023-11-01 NaN NaN ... 0.48 0.0
2024-02-01 NaN NaN ... 0.24 0.0
2024-03-01 171.699997 172.229996 ... 0.00 0.0

[454 rows x 8 columns]
Press any key to continue . . .

Bad data proof

No response

yfinance version

0.2.37

Python version

No response

Operating system

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant