-
-
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
Fix prices 30m resampling #2027
Fix prices 30m resampling #2027
Conversation
Solution that checks the offset of the opening time of the stock exchange (mod 30 minutes) and adds it to the quotes
Hypothetical - can |
The
|
KeyError was possible, I encountered it:
I'll try to provide arguments to reproduce, but this is rare so could take a long time to repeat. |
Reproduce:
|
Revert PR #2027, breaks with prepost=True
Solves #2026 to fix interval offset of the indian stock exchange
Solution that checks the offset of the opening time of the stock exchange (mod 30 minutes) and adds it to the quotes
That issue addresses #1436 and #1447.
Solution
The only change lies in
yfinance/scrapers/history.py
.If ìnterval='30m'
, we find the time that the stock exchange opens. If it opens at a time
t.minutes % 30 != 0` we add that offset to the quote.