Function hull_white::bond_price_now [−][src]
pub fn bond_price_now(bond_maturity: f64, yield_curve: &Fn(f64) -> f64) -> f64
Returns price of a zero coupon bond at current date
Examples
let bond_maturity = 2.0; let yield_curve = |t:f64|0.05*t; //yield curve returns the "raw" yield (not divided by maturity) let bond_price = hull_white::bond_price_now( bond_maturity, &yield_curve );