fix(import): reconcile unit price when CSV amount disagrees with qty*price#768
Merged
fix(import): reconcile unit price when CSV amount disagrees with qty*price#768
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
…price Brokers report bond prices as percentage-of-par (e.g. 97.05) but the app needs fraction-of-par (0.9705). When the computed amount (qty*price) significantly exceeds the CSV-provided amount (>2% ratio), trust the CSV amount and derive the correct unit price from it. Closes #755
f8aeb45 to
f6f8178
Compare
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.
Changes
csvAmount / quantityto handle bonds and securities priced as percentage-of-parContext
Brokers may report prices in different conventions (e.g., bonds as percentage-of-par vs. absolute value). This change ensures accurate price calculation by using the CSV amount as the source of truth when a significant mismatch is detected.