yfinance
yfinance copied to clipboard
Prices with incorrect decimals
When downloading prices for stocks, I see that prices are a
When downloading stock prices from:
https://finance.yahoo.com/quote/KAHOT.OL/history?p=KAHOT.OL
I see that some prices are shown with many decimals like this: 3/4/2022 25.360001 26.299999 24.219999 24.219999 24.219999 3395776
The numbers should have been: 2022-03-04 25.36 26.3 24.22 24.22 3395776
Why are prices shown incorrectly?
I understand why adjusted historical prices may end up with many decimals due to splits / dividends, but this is not the case here.
Yahoo website is showing "incorrect" numbers because it's rounding the prices.
If you want yfinance to round then turn on Ticker(rounding=True)