Implied volatility is one of those terms that gets used a lot and explained rarely, so I want to set it out properly here before the next post, where I work through a real example with numbers. The short version is that implied volatility is the market’s own estimate of how much an asset is going to move over the life of an option, and the reason it is called implied is that nobody states it directly. You have to pull it out of the option price.


Where the number comes from
An option pricing model takes a handful of inputs, which are the current price of the asset, the strike, the time to expiry, the interest rate, and the volatility, and produces a theoretical price for the option. That is the normal direction. Implied volatility runs the model the other way. You already know the price, because the market is quoting it, and you want to know what volatility the market must be assuming to arrive at that price. Historical volatility, which I covered in an earlier post, looks backwards at how the asset actually moved. Implied volatility looks forward, and it reflects what people are currently willing to pay for protection or for exposure.
The Black-Scholes formula
One of my favourite subjects at UCL was applied mathematics, and in particular partial differential equations. Black-Scholes is one of them: it describes how the price of a European option changes with the price of the underlying and with time. The solution for a European call is
\[C = S\,N(d_1) – K e^{-rT} N(d_2)\] \[d_1 = \frac{\ln(S/K) + \left(r + \frac{\sigma^2}{2}\right)T}{\sigma\sqrt{T}}, \qquad d_2 = d_1 – \sigma\sqrt{T}\]where C is the price of the call, S the current price of the underlying, K the strike, T the time to expiry in years, r the risk-free interest rate, σ the volatility, and N the cumulative distribution function of the standard normal distribution.
Every input apart from σ can be read off a screen. The option price is quoted, the spot price is quoted, the strike and expiry are in the contract, and the interest rate is close enough to a Treasury yield. So σ is the only unknown, and the problem is that it appears inside the normal distribution function, which means you cannot rearrange the formula and solve for it directly.
Solving for it
Since there is no closed form you solve it numerically. You pick a starting value for σ, usually something near the recent historical volatility, run it through the formula, compare the price you get with the price the market is quoting, and adjust σ until the two agree. The standard way to do the adjusting is Newton-Raphson, which updates the guess like this:
\[\sigma_{\text{new}} = \sigma_{\text{old}} – \frac{f(\sigma_{\text{old}})}{f'(\sigma_{\text{old}})}\]Here f(σ) is the gap between the theoretical price and the market price, and f’(σ) is the derivative of the option price with respect to volatility. Options traders call that derivative vega, and conveniently it has a closed form:
\[f(\sigma) = C_{\text{theoretical}}(\sigma) – C_{\text{market}}, \qquad f'(\sigma) = \text{Vega} = S\sqrt{T}\,N'(d_1)\]where N’(d1) is the probability density function of the standard normal. Because vega tells you both the direction and roughly the size of the next step, the method usually converges in a handful of iterations. You stop when the gap between the theoretical and market prices is smaller than some tolerance you have chosen, and the σ you are left with is the implied volatility.
In practice nobody does this by hand. SciPy in Python has the normal distribution and the root finders you need, R has packages that do the same, and any serious trading platform or Bloomberg terminal has a solver built in. But it is worth having done it by hand at least once, because it makes clear what the number is and is not.
Calculating it yourself
The whole procedure fits in a short Python script. It needs nothing beyond the standard library: the normal distribution comes from the error function in the math module, so there is nothing to install.
from math import log, sqrt, exp, erf, pi
def norm_cdf(x):
return 0.5 * (1 + erf(x / sqrt(2)))
def norm_pdf(x):
return exp(-x * x / 2) / sqrt(2 * pi)
def bs_call(S, K, T, r, sigma):
d1 = (log(S / K) + (r + sigma ** 2 / 2) * T) / (sigma * sqrt(T))
d2 = d1 - sigma * sqrt(T)
return S * norm_cdf(d1) - K * exp(-r * T) * norm_cdf(d2)
def vega(S, K, T, r, sigma):
d1 = (log(S / K) + (r + sigma ** 2 / 2) * T) / (sigma * sqrt(T))
return S * sqrt(T) * norm_pdf(d1)
def implied_vol(price, S, K, T, r, sigma=0.2, tol=1e-8):
# A call is worth at least S minus the discounted strike, and never more than S
if not max(S - K * exp(-r * T), 0) < price < S:
raise ValueError("no volatility produces this price")
# Newton-Raphson first
for _ in range(50):
diff = bs_call(S, K, T, r, sigma) - price
if abs(diff) < tol:
return sigma
v = vega(S, K, T, r, sigma)
if v < 1e-8:
break
sigma -= diff / v
if not 0 < sigma < 5:
break
# Bisection if Newton-Raphson stalls (vega near zero)
lo, hi = 1e-6, 5.0
for _ in range(200):
mid = (lo + hi) / 2
if bs_call(S, K, T, r, mid) > price:
hi = mid
else:
lo = mid
return (lo + hi) / 2
S, K, T, r = 100, 100, 30 / 365, 0.04
for s in (0.10, 0.20, 0.30):
print(f"volatility {s:.0%}: call worth £{bs_call(S, K, T, r, s):.2f}")
print(f"implied volatility at £2.50: {implied_vol(2.50, S, K, T, r):.2%}")
Run it and you get:
volatility 10%: call worth £1.31
volatility 20%: call worth £2.45
volatility 30%: call worth £3.59
implied volatility at £2.50: 20.43%
The example is a one-month at-the-money call on a £100 share with interest rates at 4 per cent, the same example as in the video above. Starting from a guess of 20 per cent, Newton-Raphson lands on 20.43 per cent in two steps. A call quoted at £2.50 is priced as if the share will move about 20.4 per cent a year, which is roughly 6 per cent over the month.
The code guards against two things. The first is a price that no volatility can produce. A call can never be worth less than the share price minus the discounted strike, or more than the share itself, and a quote outside that range usually means a stale or mistyped price. The second is vega close to zero, which happens with options far in or out of the money. There a tiny change in the price means a large change in volatility, Newton-Raphson can overshoot, and the code falls back to bisection, which is slower but cannot run away. Even so, for a deep out-of-the-money option quoted at a fraction of a penny, treat the implied volatility you get as a rough figure.
You can also run this code in your browser, without installing anything, on Kaggle.
What people use it for
The obvious use is pricing. If you know the implied volatility of options on an asset you can price other options on the same asset consistently, and you can see whether a particular contract is expensive or cheap relative to its neighbours.
The second use is as a reading of sentiment. When implied volatility rises, the market is paying more for options, which usually means more uncertainty about where the price is going. When it falls, people are expecting a quieter period. The VIX is nothing more than this idea applied to the S&P 500.
The third is trading volatility itself. Some strategies, straddles and strangles being the best known, are not really bets on direction at all. They are bets that the realised movement will be larger or smaller than what the implied volatility is pricing in. You cannot run those without this calculation.
And the fourth is risk. If the implied volatility of an asset is 40 per cent annualised, you can translate that into an expected range over any period you like, and that range is a reasonable starting point for how much a position might move against you.
In the next post I take a real 30-day Bitcoin option and do the calculation in Python, with the actual numbers, because the explanation above only really lands once you have seen it produce a figure.