Function z_spread
pub fn z_spread(
bond: &FixedRateBond,
market: &MarketContext,
price: f64,
basis: PriceBasis,
security_spread: Option<&str>,
) -> Result<f64, BondReadingError>Expand description
A fixed-rate bond’s z-spread at price (clean or dirty by basis) over
its currency’s discount curve on market, overlaid by the security spread
under security_spread where one is named.
§Errors
BondReadingError::Pricing where the market lacks the curve, or the price cannot be
bracketed.