Skip to main content

callable_oas_with

Function callable_oas_with 

pub fn callable_oas_with<R: Scalar>(
    bond: &CallableBond,
    view: &PricingView<'_, R>,
    clean_price: f64,
) -> Result<f64, PricingError>
Expand description

The continuous OAS implied by a quoted clean price — a passive solve.

The solve runs through the derivative-free projection: a spread is a passive quantity, and a solve through an active view would record a lattice per iterate for derivatives nothing reads. The lattice is built once on the projection and re-rolled per iteration, and the iterates are Brent’s: the price is smooth and monotone in the spread, so an interpolated step lands in a handful of rollbacks where bisection halves for tens.

§Errors

PricingError::UnbracketedSolve when no spread in the bracket reprices the quote; the lattice and curve errors otherwise.