Quotes That Are Not Flat
Given a price for each strike, the volatility that the Black-Scholes formula needs can differ from strike to strike; in the invented quotes of the page it runs from 24.99% at the lowest strike to 20.01% at the highest, a spread of 498 basis points.
The question
The previous lesson started from one volatility and read it back. Now start from the other end: take a price for each strike as given, and ask which volatility the formula needs to produce that price. If the answers differ, no single volatility makes all the prices.
The quotes in the example are made up, to show a pattern: calls at strikes 80, 90, 100, 110 and 120 for one year, with spot 100 and a rate of 5%. The volatility asked for in each case is called the implied volatility. It is a way of writing a price, and not a forecast. It is a description of an arithmetic model and not investment advice.
Work it by hand
Take the strike 100. The formula with a volatility of 20% prices the call at 10.45, and the quote is 10.45: the implied volatility is 20%. At strike 90 the formula with 20% gives 16.70. The quote there is 17.26, which is higher. A call is worth more when the volatility is higher, so the volatility needed at 90 is above 20%.
Do the same for each strike and the answers differ. The page leaves the arithmetic to the engine: its calibration.implied_vol searches for the volatility whose Black-Scholes price equals the quote.
Run it
The program takes the strikes and the quotes as lists, the spot, the rate and a flat vol. The loop from line 4 builds the call at each strike (line 5) and asks the engine for the volatility implied by the quote (line 6); the same loop stores the flat volatility for the picture. Line 12 takes the implied volatility at the first strike minus the one at the last, and line 13 returns it in whole basis points, where 100 basis points are 1 percentage point.

let m = model.black_scholes(spot, rate, 0.0, vol);
let engine = pricing.analytic();
let implied = float_list(); let flat = float_list();
for (i in range(0, strikes.len())) {
let c = instrument.european_call(strikes.at(i), 1.0);
let v = calibration.implied_vol(c, m, engine, quotes.at(i));
implied.add(lmf.round(v, 6));
flat.add(vol);
}
lmcode_return_put("implied", implied);
lmcode_return_put("flat", flat);
let gap = implied.at(0) - implied.at(strikes.len() - 1);
let answer = int(math_round(lmf.round(gap, 4) * 10000.0));
{
"answer": 498,
"implied": [
0.249868,
0.220085,
0.199984,
0.189879,
0.200074
],
"flat": [
0.2,
0.2,
0.2,
0.2,
0.2
]
}You can change the spot, the rate, vol and the lists. A quotes list shorter than strikes stops at line 6 with "FloatList.at: index out of range: 1" (two strikes, one quote).
Each quote must be a price that some volatility between 0.0001 and 5 can produce: a quote of 0 stops at the same line with "price 0 is outside the range reachable with volatility in [0.0001, 5]", and so does a price below the discounted intrinsic value, such as 19 at strike 80, or above the spot, such as 1000. A vol of 0 stops at line 1 with "model.black_scholes: volatility must be positive".
Your turn
A desk is given a call quote for each strike and wants to know where the model needs the highest volatility. The program below is meant to return the position, counting from 1, of the strike whose quote implies the highest volatility, for the strikes and quotes in the lists, one year and the spot and rate given. Decide whether it does, and find the candidates that do. Check runs each candidate on the lists shown and on six others. The quotes are made up.

let m = model.black_scholes(spot, rate, 0.0, 0.2);
let engine = pricing.analytic();
let best = 0.0 - 1.0; let at = 0;
for (i in range(0, strikes.len())) {
if (quotes.at(i) > best) { best = quotes.at(i); at = i; }
}
let answer = at + 1;
{
"answer": 1
}The lists strikes and quotes give a call quote for each strike (one year; spot and rate given). Return the position, counting from 1, of the strike whose quote implies the highest Black-Scholes volatility.
Read the result carefully
The quotes of this page were invented to show a pattern; they are not observations. A pattern in implied volatilities says that these prices cannot come from one Black-Scholes volatility. It does not say which strike is cheap or dear, and it does not say what a price should be.
Implied volatility depends on the model it is read through: it is the volatility of the Black-Scholes formula and of nothing else. The engine's implied_vol works only for Black-Scholes models; a model with a moving variance needs another route, which the next chapter takes. It is a description of an arithmetic model and not investment advice.
The formula behind an implied volatility, and how a price is turned back into one, is worked through in Black-Scholes Step by Step.
Recap
- Implied volatility is the volatility that makes the Black-Scholes price equal a given price.
- If the quotes at different strikes imply different volatilities, no single volatility fits them all.
- In the example the implied volatility falls from 24.99% at strike 80 to 18.99% at strike 110 and then rises to 20.01% at strike 120.
- It describes a price; it is not a forecast.