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

### Describe bug #1185

Open
arvldln opened this issue Nov 1, 2024 · 0 comments
Open

### Describe bug #1185

arvldln opened this issue Nov 1, 2024 · 0 comments

Comments

@arvldln
Copy link

arvldln commented Nov 1, 2024

Describe bug

yf.download() returning incorrect index

Simple code that reproduces your problem

import yfinance as yf
data = yf.download('SPY')
data.head()

image

Debug log

DEBUG Entering download()
DEBUG Disabling multithreading because DEBUG logging enabled
DEBUG Entering history()
DEBUG Entering history()
DEBUG SPY: Yahoo GET parameters: {'period1': '1925-11-20 12:49:42-05:00', 'period2': '2024-10-26 13:49:42-04:00', 'interval': '1d', 'includePrePost': False, 'events': 'div,splits,capitalGains'}
DEBUG Entering get()
DEBUG Entering _make_request()
DEBUG url=https://query2.finance.yahoo.com/v8/finance/chart/SPY
DEBUG params={'period1': -1392099018, 'period2': 1729964982, 'interval': '1d', 'includePrePost': False, 'events': 'div,splits,capitalGains'}
DEBUG Entering _get_cookie_and_crumb()
DEBUG cookie_mode = 'basic'
DEBUG Entering _get_cookie_and_crumb_basic()
DEBUG reusing cookie
DEBUG reusing crumb
DEBUG Exiting _get_cookie_and_crumb_basic()
DEBUG Exiting _get_cookie_and_crumb()
DEBUG response code=200
DEBUG Exiting _make_request()
DEBUG Exiting get()
DEBUG SPY: yfinance received OHLC data: 1993-01-29 14:30:00 -> 2024-10-25 13:30:00
DEBUG SPY: OHLC after cleaning: 1993-01-29 09:30:00-05:00 -> 2024-10-25 09:30:00-04:00
DEBUG SPY: OHLC after combining events: 1993-01-29 00:00:00-05:00 -> 2024-10-25 00:00:00-04:00
DEBUG SPY: yfinance returning OHLC: 1993-01-29 00:00:00-05:00 -> 2024-10-25 00:00:00-04:00
DEBUG Exiting history()
DEBUG Exiting history()
DEBUG Exiting download()

Bad data proof

No response

yfinance version

0.2.48

Python version

No response

Operating system

Windows

Originally posted by @Neopabo in ranaroussi/yfinance#2101

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