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

Feature - repair 100x price errors #1110

Merged
merged 3 commits into from
Oct 23, 2022
Merged

Feature - repair 100x price errors #1110

merged 3 commits into from
Oct 23, 2022

Conversation

ValueRaider
Copy link
Collaborator

Yahoo sometimes returns random prices 100x correct value. Only seen in London tickers, typically weekly data. Looks like Yahoo is mixing up currency units £ and pence. See issue #552 for detail.

Solution uses a scipy module to find these outliers. For Open/Close divide by 100, simple. For High/Low must recalculate because corrupted - 100 x low = new high. Recalculation fetches data at next resolution, e.g. if repairing weekly data fetch daily data for that week. Potential to trigger Yahoo spam detection, but normally only few outliers in a year of data so not expecting to trigger.

Deliberately not adding scipy to dependencies, assuming most users won't use this feature.

@ValueRaider ValueRaider merged commit 561f56c into dev Oct 23, 2022
@ValueRaider ValueRaider deleted the feature/outlier-repair branch October 23, 2022 23:16
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.

1 participant