LessonThis is a lesson restated in new words. Any figure in it is an example from the source, not this desk's record.
Implied volatility is the volatility input that makes a pricing model match a traded option price. In the Black-Scholes framework the model maps five numbers to a price: the riskless rate, the strike, the spot, the time to expiration, and volatility. The first four are observable for a listed contract. The traded price is also observable. Volatility is the remaining dial. A surface of those dials, across strikes and maturities, is the implied-volatility surface, and the lesson says that surface is quoted as Black-Scholes volatility.
Why it matters
There is no ticker that returns "the" volatility to drop into a formula. There is a market price, set the way other traded prices are set, and there is a model price. They are different objects. The lesson's illustration of a market price is a deep in-the-money Apple contract with a last price of 54.25, noted as expensive in part because listed contracts are usually in blocks of 100. The worked example is a different, near-the-money contract with a last price of $3. Turning that $3 into a volatility is the exercise. The same inversion, repeated on a grid of vanilla options, is the surface.
The idea in plain words
Geometric Brownian motion is the share-price model inside this framework: a relative drift plus volatility times a Brownian shock. Solving it produces the European closed form in the five inputs. A proxy exists for the riskless rate. The strike and the maturity are written on the contract. The spot is a quote. Volatility is not. Given the traded premium, you search for the volatility that sends the formula to that premium.
The worked contract uses an Apple spot of 145.38, a strike of 145, six days until 10 June 2022 so that time is 6/252, and a riskless rate of 0.001 because the lesson treats the rate as negligible. The market premium is $3. A trial volatility of about 10 percent produces a model price of about 1.0985, short of 3. The absolute gap at a trial of 0.1 is about 1.90. Nudging the trial by hand moves the model price around the target of 3. That hand search is the definition, made tedious.
The systematic version minimizes the absolute gap. A function takes a volatility, prices the call in qfin's Black-Scholes class with the four known inputs, and returns the absolute difference from $3. SciPy's least_squares, started at 0.1, returns about 0.3137. The lesson reads that as about 31.38 percent. Feeding 0.313759 back into the formula produces a price that rounds to 3 at five decimal places. The option chain's own implied figure for the contract is given as 36.23. The lesson says the difference depends on the other inputs you chose, including the small rate and the 6/252 clock.
How to use it
Set the spot, strike, time, and rate from the contract you are looking at. Wrap the model price minus the market price, in absolute value, as a function of volatility only. Call least_squares with that function and a starting guess. Read the solved volatility and price the call once more. A match to the market premium, within rounding, is the check the lesson prints.
The qfin constructor in the session takes spot, volatility, strike, time, and the rate, in that order. A hand trial at 10 percent is only a way to see the model price undershoot $3. The solver's start at 0.1 is the same neighborhood, and the answer it reports is 0.3137, not the start.
A surface is this solve on each strike and maturity, plotted with volatility on the vertical axis. The lesson shows that picture and then does the single-contract arithmetic so the picture has a definition.
What usually goes wrong
The chain's 36.23 and the solved 31.38 can differ because the solve is conditional on spot 145.38, strike 145, time 6/252, rate 0.001, and a $3 premium. A different clock or rate moves the volatility that hits $3.
A trial of 10, rather than 0.10, is a different input. The model price near 1.0985 belongs to the 10 percent trial. A volatility backed out of a different model is not the Black-Scholes surface the lesson describes. The deep in-the-money last of 54.25 is a separate illustration, not the premium this solver fits. The formula used here is the European one.
Questions people ask
What is implied volatility?
The volatility you must feed the model, together with the known rate, strike, spot, and time, to match the option's traded price.
What did the Apple solve return?
About 0.3137, or 31.38 percent, for spot 145.38, strike 145, time 6/252, rate 0.001, and a $3 premium. The repriced model value rounds to 3.
Why might the chain say 36.23?
The lesson's solve uses the inputs above. It says a different choice of the remaining inputs moves the backed-out volatility, and it reports 36.23 as the chain's nearby figure.