-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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 results between two successive runs #1982
Comments
Try the branch in PR #1984 (how to run) |
I tried it. It did not fix the issue. Consider the following code
I ran this twice. Then I changed auto_adjust to False
I ran this twice. The files are different across all the four runs.
|
You should have seen a new warning message. |
Yes, I see the warning message. But it does not help with the reproducibility. For example
gives the warning message. But neither
nor
give results that are reproducible. |
It's not meant to fix the reproducibility. |
Describe bug
The OHLC data returned by yf.download() is not reproducible across multiple runs. For example, if I download OHLC data of SPY two times, the numbers are slightly different. Ideally, the numbers should be the same.
Simple code that reproduces your problem
Consider the following code. It downloads daily OHLC data for SPY and writes it to a file.
Run the code twice
Ideally, these two files should be the same. But they are not.
Debug log
Code with debug mode enabled
Output on the first run
Output from the second run
Differences
Bad data proof
No response
yfinance
version0.2.40
Python version
3.12.3
Operating system
Debian GNU/Linux 12 (bookworm)
The text was updated successfully, but these errors were encountered: