Function yield_to_call_of
fn yield_to_call_of(
bond: &CallableBond,
dirty: f64,
entry: &Callability,
settlement: NaiveDate,
basis: YieldBasis,
) -> Result<f64, CallYieldError>Expand description
The yield to a single exercise entry at dirty: the yield repricing the
scenario that redeems on the entry’s date at the entry’s price.
The existing solver over flows truncated at the redemption date — no second
solver and no second pricing body. A CallPrice::Clean entry adds accrued
to the redemption; a CallPrice::Dirty one does not.
§Errors
CallYieldError::MakeWhole for a curve-dependent redemption,
CallYieldError::Past for an entry not after settlement, and
CallYieldError::Solve when no yield reproduces the price.