Guides · options

Back out implied volatility from an option price

Implied volatility is the volatility that, plugged into Black-Scholes, reproduces the observed market price. There is no closed-form formula — it is a numerical inversion. POST /v1/options/implied-vol does the inversion for you and returns the annualized vol, or a 422 if no volatility can explain the price.

01One POST, one number

A 3-month European call, spot 100, strike 105, risk-free rate 3%, trading at 2.10:

python
import requests

r = requests.post("https://quantbox.dev/v1/options/implied-vol",
    headers={"X-API-Key": KEY},
    json={"option_type": "call", "spot": 100, "strike": 105,
          "rate": 0.03, "expiry_years": 0.25, "market_price": 2.10})
print(r.json())
response
{
  "implied_volatility": 0.1892,
  "conventions": {
    "exercise": "european only",
    "volatility": "annualized, decimal (0.20 = 20%)",
    "rate": "continuously compounded, act/365"
  }
}

Read it as: the market is pricing this option as if the underlying's annualized volatility were 18.92%. The conventions object ships with every response, because an implied vol without its compounding and day-count assumptions is not a number you can compare to anything.

02Same thing in curl

curl -s https://quantbox.dev/v1/options/implied-vol \
  -H "X-API-Key: $KEY" -H "Content-Type: application/json" \
  -d '{"option_type":"call","spot":100,"strike":105,
       "rate":0.03,"expiry_years":0.25,"market_price":2.10}'

03No-arbitrage bounds: why some prices have no implied vol

Not every positive number is a valid option price. For a call with continuous dividend yield q, any arbitrage-free price must sit between max(S·e^-qT − K·e^-rT, 0) and S·e^-qT; for a put, between max(K·e^-rT − S·e^-qT, 0) and K·e^-rT. Outside those bounds, no volatility — from zero to infinity — reproduces the price, and a naive root-finder will grind and fail.

Quant-Box checks the bounds before inverting. A price outside them returns an HTTP 422 with a plain-language message saying which bound was violated — not a solver stack trace.

The usual ways to end up there: a stale quote below intrinsic value, mixing units (price in cents against a spot in dollars), or a deep in-the-money option whose time value has shrunk below the tick size. In each case the 422 is the API telling you the input is the problem, not the solver.

04Conventions that matter

European only. This endpoint inverts Black-Scholes-Merton, so it has no exercise field. Quoting convention in most listed markets is European-style implied vol anyway. To price American options in the forward direction, use /v1/options/price with "exercise": "american".

Continuously compounded rates, act/365. If your rate is annually compounded, convert first: r = ln(1 + r_annual).

Decimals, not percents. rate: 0.03 means 3%. The output follows the same rule: 0.1892 means 18.92%.

Dividends. dividend_yield is an optional continuous yield (default 0). Discrete dividend schedules are not supported.

Positive market price required. market_price must be strictly greater than zero — the schema rejects zero and negative prices before the solver ever runs.

05Using the number

Round-trip check. Feed the returned vol into /v1/options/price with the same spot, strike, rate and expiry: you land back on the market price you started from (up to the rounding of the returned vol). That round trip is the definition of implied volatility, and it is a cheap sanity test for your integration.

Build a smile. One call per strike gives you the implied-vol smile for an expiry; one call per (strike, expiry) pair gives you the raw points of a surface. Note that Quant-Box stops there — it inverts single prices and does not fit smile or surface parameterizations (SABR, SVI). See where the API's scope ends.

Greeks at the implied vol. Pricing with the implied vol instead of a historical estimate gives you greeks consistent with where the market actually trades.

Try it against the real API. Sign up with an email, get a key instantly, and the playground runs this exact call in your browser.

Get a free API key

500 calls/month free · no credit card · full schemas in /docs

Related: Price an option in 5 lines of Python · QuantLib as a service: hosted API vs self-hosting · Price a bond from a yield or a curve · Bootstrap a yield curve over HTTP