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')
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:
Debug log
N/A
Bad data proof
yfinance
version0.2.37
Python version
3.10.12
Operating system
Mac M1 Chip and Ubuntu 22.04 LTS