Function strike_integral
fn strike_integral<R: Scalar>(
convention: VolConvention,
forward: R,
at: R,
call: bool,
spreads: Option<&[f64]>,
sd_at: &impl Fn(f64) -> Result<R, PricingError>,
) -> Result<R, PricingError>Expand description
∫ of the call from at (a spread to the forward, in the mode) up, or of
the put from below up to it, over the smile quoted at spreads (flat at
the at-the-money vol when there is none): the flat wings in closed form,
the smile between its pillars by Gauss–Legendre. The piece the strike
bounds is integrated in the mode, so its moving end differentiates.