Skip to main content

yield_to_call

Function yield_to_call 

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

The yield to the exercise entry on date at dirty_price, under the basis convention resolves to on the bond’s frequency, re-based on day_count where one is given.

§Errors

BondReadingError: not a callable, no entry on date, no single basis, or a make-whole, past or unbracketable scenario.