Expand description
§Implied volatility
Invert a European market premium → annualized σ for BSM, Black ’76, or Garman–Kohlhagen (same Newton + bisection core).
§Trading perspective
The market does not quote “model vol”; it quotes prices. IV is the σ that makes the model match that price — the language of surfaces, skew, and “IV crush”.
| Use | How |
|---|---|
| Mark a book | Mid → IV → store on the contract |
| Relative value | Compare IV across strikes/expiries (skew, term structure) |
| Events | IV vs realized (realized from underlier returns / TA path) |
Gotchas desks already know: American early exercise, discrete dividends, and wide markets break naive European IV — treat results as model-dependent.
§Engineering perspective
- Solver: Newton–Raphson on vega, Brent bracketed fallback (not plain bisection).
- Model
volfield is ignored as a seed (only other market/contract inputs matter). - Prefer
*State::set_vol_from_pricein live loops so IV is stored once. - Hot path cost: a handful of model evaluations — fine per quote; batch chains may parallelize across strikes in your engine.
§Word problem
Market call mid is ~10.45 with S=K=100, T=1, r=5%, q=0. What is IV?
Expect: about 20%.
use finance_solution::derivatives::{
bsm_implied_vol, BsmParams, OptionType,
};
let p = BsmParams::atm_one_year(100.0, 0.05, 0.20);
let iv = bsm_implied_vol(p, OptionType::Call, 10.4506).unwrap();
assert!((iv - 0.20).abs() < 1e-3);Functions§
- bsm_
implied_ vol - Solve for annualized vol given a target BSM premium.