Repository navigation
fix(history): keep the published adjusted close within Yahoo float noise - #79
Merged
Merged
Conversation
When the live catalog is unreachable the fund row comes from the previous index, which carries only the top-level category and the published net assets value. The run then published the coarse category as categoryPath and relabelled the retained net assets as SEC N-PORT-P, so a rerun with the same upstream data flipped the fund to updated. The published categoryPath and net assets source are now kept in that case.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Why
Yahoo returns adjclose as float32 and its last digits move with the request's period2, so a value on a cent boundary (31.544998 vs 31.545001) rounded to a different cent on each run: a rerun with identical upstream data rewrote history pages and marked funds updated, against the zero-diff rule. The published cent is now kept while the raw value stays within 0.005 + ADJ_CLOSE_NOISE (1e-4) of it; real changes are still written. Same rule as AAM
How it was checked