LessonThis is a lesson restated in new words. Any figure in it is an example from the source, not this desk's record.

A differential equation states how a function changes. Solving it means recovering the function. A stochastic differential equation does the same job with noise, so the answer is a distribution. For geometric Brownian motion the distribution is lognormal: the price is the starting price times an exponential of a normal draw.

Why it matters

The Black–Scholes equation is a partial differential equation from a continuous delta hedge that cancels geometric Brownian motion. A Heston equation needs a variance hedge and then a delta hedge, and it is solved numerically. The Carr–Madan transform is another route. Simulation instead draws terminal prices, applies the payoff, discounts, and averages. Inside one model those routes aim at the same price. The stochastic equation is what the hedge removed, or what the simulation samples.

The idea in plain words

Start with a deterministic sketch. The lecture uses a cost function 2 times x squared plus 1, with x thought of as a stock price. Its derivative is 4 times x, a slope in the same role as an option's delta. Integrate and the constant has vanished: you get 2 times x squared plus C, a family of parabolas. That is the general solution. The condition that the function equals 1 at x = 0 forces C = 1 and recovers the original curve. A closed form is right at every input. A numerical grid is right only where you built it. On the Black–Scholes equation, a Crank–Nicolson scheme with a small stock grid falls away past 100. A grid extended toward 10,000 tracks the closed form much more closely.

A partial differential equation is the same idea with more than one input. A partial derivative is the change in one input while the others are held still. The Black–Scholes equation has no randomness left in it because the hedge took the randomness out. The price you recover is one number for each set of inputs. Solve the stochastic equation instead and you classify the random price, you do not remove it.

How to use it

Geometric Brownian motion multiplies the drift and the shock by the price itself. Arithmetic Brownian motion, with the same parameters, does not. Drop the geometric paths from the lecture's chart and the remaining arithmetic paths look similar in style. The size difference was the multiplication.

Set X equal to the natural log of S. Apply Ito's lemma. The explicit time derivative of the log is zero. The first derivative in S is 1/S. The second is minus 1 over S squared. Substitute the geometric equation, dS equals mu S dt plus sigma S dW. The square of that increment keeps only the sigma squared S squared dt piece, because dt squared and dt times dW vanish, and dW squared becomes dt. The factors of S then cancel. What remains is a linear equation, the same shape as arithmetic Brownian motion: a constant drift, reduced by half of sigma squared, plus sigma times the Brownian increment.

Integrate. The left side is X at t minus X at 0. The drift integrates to a multiple of t. The shock integrates to sigma times Brownian motion, which starts at zero. Exponentiate to undo the log. S at t is S at 0 times an exponential of a normal. That is the definition of a lognormal price. The randomness is still there. This is not the Black–Scholes partial differential equation. It is the law of the underlying. A European payoff can use the terminal law directly. Average discounted payoffs and, with enough draws, the lecture's simulated price moves onto the Black–Scholes price. One illustrated comparison sits near 6.03 or 6.04 before the sample is enlarged.

What usually goes wrong

A path-dependent number does not care that you know the law at one time. The maximum along a path, the sort of question a barrier asks, forces you to walk the path. Discretizing the closed form and discretizing the equation with Euler–Maruyama are then two simulations. Closed-form paths put the chance of breaching 125 at 34 percent. A coarse Euler–Maruyama run put it at 40.2 percent, with a 95 percent interval from 30.9 to 44.5. A finer run moved to 33.2 percent. A rough-volatility model may have no closed form, so the discretization is the method. The P and Q measures are flagged and not developed.

Questions people ask

Why take the logarithm?

It turns a multiplicative equation into a linear one. After Ito's lemma, the factors of S cancel and the integral is elementary.

Does the solution tell you tomorrow's price?

It tells you the lognormal distribution of prices. A single number would be a different kind of equation, the hedged pricing equation.

When is the closed form not enough?

When the payoff uses the path, not only the terminal price. You then simulate either the formula or the original equation, and the two should approach the same probability as the grid gets finer.