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

Inconsistent floating point values in history method #1871

Open
melgazar9 opened this issue Feb 27, 2024 · 0 comments
Open

Inconsistent floating point values in history method #1871

melgazar9 opened this issue Feb 27, 2024 · 0 comments

Comments

@melgazar9
Copy link

Describe bug

Not sure if this is an issue with yahoo-finance in general, the yfinance package here, or potentially even pandas. Floating point numbers 3+ decimals out are consistently returned differently on different time intervals and tickers.

Simple code that reproduces your problem

I tried this both with and without caching and on mac and ubuntu. It is more inconsistent on mac but also happens on ubuntu. Here's a reproducible example:

import yfinance as yf

t = yf.Ticker('AAPL')
for i in range(20):
    t.history(start='2020-01-02', interval='1d')

Debug log

N/A

Bad data proof

Screenshot 2024-02-26 at 6 58 40 PM Screenshot 2024-02-26 at 6 48 20 PM

yfinance version

0.2.37

Python version

3.10.12

Operating system

Mac M1 Chip and Ubuntu 22.04 LTS

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