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

Make basisPointValue() and yieldValueBasisPoint() behavior consistent with other BondFunctions methods #2

Closed
jez6 opened this issue Jan 29, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@jez6
Copy link
Owner

jez6 commented Jan 29, 2024

Most BondFunctions methods are overloaded, with one version converting its arguments and chaining to a different overload where defaults are handled and then a call made to static CashFlows methods to do the actual calculations -- e.g. BondFunctions::duration() and BondFunctions::duration() (v1.33).

basisPointValue() and yieldValueBasisPoint() have similarly paired overloads, however do not follow the same trampolining pattern: both methods instead directly call upstream CashFlows methods, which results in the settlement date not being set correctly in the overloads not taking an InterestRate object when passed to the underlying calculations unless explicitly passed in (settlement is defaulted in these methods’ declarations).

Make these two methods' behavior consistent with other BondFunctions methods and add tests to assert parity.

@jez6 jez6 self-assigned this Jan 29, 2024
@jez6 jez6 added the bug Something isn't working label Jan 29, 2024
@jez6
Copy link
Owner Author

jez6 commented Jan 30, 2024

Resolved in lballabio#1900

@jez6 jez6 closed this as completed Jan 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant