Skip to main content

black_scholes_greeks_checked

Function black_scholes_greeks_checked 

Source
pub fn black_scholes_greeks_checked(
    s: f64,
    r: f64,
    b: f64,
    vol: f64,
    is_call: bool,
    k: f64,
    t: f64,
    db_dr: f64,
) -> Result<BlackScholesGreeksResult, OptionValuationError>
Expand description

Computes validated Greeks with an explicit sensitivity of carry to the interest rate.

db_dr is zero for fixed carry and one for carry defined as r - q, even when r == q. Rho measures the price change for a one percentage point rate move. The exact implementation is used when the fast result is nonfinite or inconsistent.

ยงErrors

Returns an error if:

  • Model inputs are invalid.
  • Valuation results are nonfinite or inconsistent.