Function yield_discount
pub(crate) fn yield_discount<R: Scalar>(basis: YieldBasis, y: R, t: f64) -> RExpand 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.