You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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()
andBondFunctions::duration()
(v1.33).basisPointValue()
andyieldValueBasisPoint()
have similarly paired overloads, however do not follow the same trampolining pattern: both methods instead directly call upstreamCashFlows
methods, which results in the settlement date not being set correctly in the overloads not taking anInterestRate
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.The text was updated successfully, but these errors were encountered: