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

Fix weekly/monthly prices across 2 rows #1070

Merged
merged 3 commits into from Oct 14, 2022
Merged

Fix weekly/monthly prices across 2 rows #1070

merged 3 commits into from Oct 14, 2022

Conversation

ValueRaider
Copy link
Collaborator

@ValueRaider ValueRaider commented Oct 2, 2022

Yahoo sometimes returns this week price data across two rows - todays data separated from rest-of-week. Seems to depend on the clock time (e.g. evening after exchange closed) and what ticker/exchange. Happens with monthly too.

yf.Ticker("IMP.JO").history(start="2022-06-10",end="2022-06-25", interval="1wk")

                               Open          High           Low  ...        Volume  Dividends  Stock Splits

2022-06-06 00:00:00+00:00 30215.279297 30609.310547 26762.648438 ... 112969275959 0 0
2022-06-13 00:00:00+00:00 26737.578125 26795.589844 17708.623047 ... 309685915250 0 0
2022-06-20 00:00:00+00:00 20553.371094 21620.628906 19689.169922 ... 114551561992 0 0
2022-06-24 20:41:00+00:00 21112.822266 21327.408203 20786.849609 ... 25183909888 0 0

Fix merges these rows - min/max/sum as appropriate.

Similar bug in daily data except only volume is different - last row slightly higher and matches website. Fix is to drop second-to-last row. #573

@ValueRaider ValueRaider changed the base branch from main to dev October 4, 2022 22:07
@ValueRaider ValueRaider changed the base branch from dev to main October 4, 2022 22:08
@ValueRaider ValueRaider changed the base branch from main to dev October 5, 2022 13:15
@ValueRaider ValueRaider merged commit 4734e92 into dev Oct 14, 2022
@ValueRaider ValueRaider deleted the fix/weekly-prices branch October 16, 2022 19:25
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

Successfully merging this pull request may close these issues.

None yet

1 participant