Skip to main content

yield_to_maturity_scenario

Function yield_to_maturity_scenario 

pub fn yield_to_maturity_scenario(
    instrument: &AnyInstrument,
    dirty_price: f64,
    settlement: NaiveDate,
    convention: YieldQuoteConvention,
    day_count: Option<DayCountFraction>,
) -> Result<f64, BondReadingError>
Expand description

The yield of the redemption-at-par-on-maturity scenario at dirty_price.

ยงErrors

BondReadingError: not a callable, no single basis, or an unbracketable price.