Skip to main content

coupon_bond_option

Function coupon_bond_option 

pub fn coupon_bond_option<R: Scalar>(
    params: &HullWhiteParameters<R>,
    curve: &dyn YieldCurve<R>,
    expiry: NaiveDate,
    pay_dates: &[NaiveDate],
    coupons: &[f64],
    strike: f64,
    kind: OptionKind,
) -> Result<R, CurveError>
Expand description

The price of a European option on a coupon bond, by Jamshidian’s decomposition, in mode R, with the strike paid on the expiry itself.

At expiry T the bond is Σ c_i P(T, t_i; r), monotone in the short rate, so the option exercises on one side of the r* at which the bond is worth strike, and is the sum of zero-bond options struck at K_i = P(T, t_i; r*). The same kernel with the strike paid later — a swaption whose swap starts a spot lag after expiry — prices the options on the forward bonds instead.

§Errors

Whatever the curve reports; CurveError::Malformed for an empty or mismatched schedule, or a critical-rate solve that does not converge.