Skip to main content

yield_discount

Function yield_discount 

pub(crate) fn yield_discount<R: Scalar>(basis: YieldBasis, y: R, t: f64) -> R
Expand description

The yield discount factor v(t) in mode R.

One body for all three compoundings, so the derivative the mode takes is the derivative of the formula the price actually used.

Takes the whole YieldBasis rather than a compounding and a period count side by side: the two are one convention, and a caller able to pair them freely can only get the pairing wrong.