pub fn py_imply_vol_and_greeks(
s: f64,
r: f64,
b: f64,
is_call: bool,
k: f64,
t: f64,
price: f64,
db_dr: f64,
) -> PyResult<BlackScholesGreeksResult>Expand description
Computes implied volatility and greeks using the fast implementations.
This function uses compute_greeks after implying volatility.
db_dr is zero for fixed carry and one for carry defined as r - q, including r == q.
Rho is per percentage point.
The exact implementation is used when the fast kernel cannot reprice the solved premium
within 0.01 percent.
ยงErrors
Returns an error if:
- Model inputs or the premium are invalid.
- The premium has no finite positive implied volatility.
- Results are nonfinite, inconsistent, or fail the 0.01 percent repricing tolerance.