Volume I · Chapter 1
The Binomial No-Arbitrage Pricing Model
Price an option by building a mix of stock and cash that pays exactly what the option pays. The option’s price is the cost of that mix.
Picture it
You and a friend bet on rain: if it rains, you get 10; if not, nothing. An umbrella company’s share price jumps on rainy days. Buy just the right number of its shares and you end up with exactly the bet’s payoff, rain or shine. So the bet is worth what those shares cost today. Your forecast and your friend’s forecast never come into it.
Start with one period: the stock moves up by a factor u or down by a factor d, and cash grows at rate r. For there to be no free lunch, the safe return must sit between the two stock outcomes: d < 1 + r < u.
Hold Δ shares and put the rest in cash, and choose Δ so the portfolio matches the option in both outcomes. The cost of that portfolio is the only price that avoids arbitrage. Rearranged, it is a discounted average of the two payoffs with weights p̃ and q̃: the risk-neutral probabilities. The real chance of an up move never enters.
With many periods you repeat the same step backwards through the tree, node by node. The hedge Δ changes at every node, which is dynamic hedging in its simplest form. Payoffs that depend on the whole path (lookbacks, Asians) use the same backward step with a bigger state.
Vn = p̃ Vn+1(H) + q̃ Vn+1(T)1 + r, p̃ = 1 + r − du − d, Δn = Vn+1(H) − Vn+1(T)Sn+1(H) − Sn+1(T)
Reading the formula: u, d: how much the stock can rise or fall in one step · r: interest earned per step · p̃, q̃: pricing weights (not a forecast) · V: option value · Δ: shares to hold to copy the option
Live modelILLUSTRATIVE INPUTS
A binomial tree with S₀ = 100 and strike 100. Change u, d, r and the number of periods; push r past u to see the arbitrage warning.
The hard parts, step by step
The ideas in this chapter that most people get stuck on, each with a picture, the derivation line by line, worked numbers and the trap to avoid.
Deriving the one-period price, line by line
Picture it
You are solving two equations for two unknowns, like working out how many coins of two kinds make two totals. The unknowns are how many shares to hold (Δ) and how much cash to start with (X0). The two equations say “match the option if the stock goes up” and “match it if the stock goes down”.
Step by step
- X1 = Δ0 S1 + (1 + r)(X0 − Δ0 S0)Hold Δ0 shares; whatever money is left (possibly negative, a loan) sits in cash and earns r.
- X1(H) = V1(H), X1(T) = V1(T)Replication: the portfolio must pay exactly what the option pays, in both outcomes.
- Δ0 = V1(H) − V1(T)S1(H) − S1(T)Subtract one equation from the other: the cash part cancels, leaving only the shares.
- X0 = 11 + r[p̃ V1(H) + q̃ V1(T)]Put Δ0 back into either equation and tidy up.
- p̃ = 1 + r − du − d, q̃ = u − 1 − ru − dThese weights simply fall out of the algebra. Nobody chose them as forecasts.
Worked numbers
S0 = 100, u = 1.2, d = 0.9, r = 5%, call with strike 100. The stock ends at 120 or 90, so the call pays 20 or 0.
- Δ0 = (20 − 0) / (120 − 90) = 0.6667 shares
- p̃ = (1.05 − 0.9) / 0.3 = 0.5, so the price is 0.5 × 20 / 1.05 = 9.524
- Buy 0.6667 shares (66.67) and borrow 57.14 to pay for most of them.
- Up: 0.6667 × 120 − 57.14 × 1.05 = 80 − 60 = 20 ✓ Down: 60 − 60 = 0 ✓
Common mistake: Plugging in the real chance of an up move. Also forgetting that the cash leg is usually a loan: for a call you borrow to buy shares.
Why the pricing weights must sit between 0 and 1
Picture it
If cash always does at least as well as the stock, nobody should hold the stock: you could short it, put the money in the bank, and never lose. The condition d < 1 + r < u is exactly “neither asset beats the other in every outcome”.
Step by step
- p̃ > 0 ⇔ d < 1 + rIf even the down move beats cash, borrow and buy the stock: you can only gain.
- p̃ < 1 ⇔ 1 + r < uIf cash beats even the up move, short the stock and invest the money: you can only gain.
- 0 < p̃ < 1 ⇔ no arbitrageSo the weights look like probabilities exactly when the model has no free lunch.
Worked numbers
Take u = 1.04, d = 0.9, r = 5%, so cash beats even the up move.
- Short 1 share at 100 and put 100 in the bank: it grows to 105.
- Buying the share back costs at most 100 × 1.04 = 104.
- Profit of at least 1 with no risk: an arbitrage. Here p̃ = (1.05 − 0.9) / 0.14 = 1.07, outside 0 to 1.
Common mistake: Calling p̃ “the probability the stock goes up”. It is a pricing weight that happens to add up like a probability.
Many periods: the wealth equation and a hedge that changes every step
Picture it
Pricing over many periods is one-period pricing done again and again, starting at the end and walking back to today. The hedge is not set once: after every move you re-solve the little two-equation problem at your new node.
Step by step
- Xn+1 = Δn Sn+1 + (1 + r)(Xn − Δn Sn)The wealth equation. It is self-financing: you only rebalance between stock and cash, never add or take out money.
- VN = payoff(SN)At expiry the value is just the payoff.
- Vn = p̃ Vn+1(H) + q̃ Vn+1(T)1 + rAt every earlier node, apply the one-period formula to the two values just after it.
- Δn = Vn+1(H) − Vn+1(T)Sn+1(H) − Sn+1(T)Each node gets its own hedge, worked out from the two branches leaving it.
Worked numbers
Two periods, same inputs, strike 100. The stock ends at 144, 108 or 81, so the call pays 44, 8 or 0.
- After an up move: V1(H) = (0.5 × 44 + 0.5 × 8) / 1.05 = 24.762, hedge Δ1(H) = (44 − 8) / (144 − 108) = 1.000
- After a down move: V1(T) = (0.5 × 8 + 0.5 × 0) / 1.05 = 3.810, hedge Δ1(T) = 8 / (108 − 81) = 0.296
- Today: V0 = (0.5 × 24.762 + 0.5 × 3.810) / 1.05 = 13.605, hedge Δ0 = (24.762 − 3.810) / 30 = 0.698
- Follow this hedge along any path and you end with exactly 44, 8, 8 or 0, the call’s payoff.
Common mistake: Keeping today’s hedge for the whole life of the option. The hedge moves with the stock: it went from 0.698 to 1.000 after an up move and to 0.296 after a down move.
Path-dependent options: why the tree stops being small
Picture it
A plain option only cares where the stock ends, so “up then down” and “down then up” land on the same node. A lookback option remembers the highest price along the way, so those two paths are different situations and can no longer share a node.
Step by step
- staten = (Sn, Mn), Mn = maxk≤n SkCarry whatever the payoff needs to remember. Here that is the running maximum.
- Vn(s, m) = p̃ Vn+1(us, max(m, us)) + q̃ Vn+1(ds, m)1 + rSame backward step, but each value now depends on the extra state as well.
- plain tree: N + 1 end nodes; all paths: 2NA good state variable keeps the problem far smaller than listing every path.
Worked numbers
- 3 periods: 4 end nodes for a plain option, 8 distinct paths.
- 20 periods: 21 end nodes versus 1,048,576 paths.
- A lookback needs only the pairs (price, running max) that can actually occur, which grows far more slowly than 2N.
Common mistake: Pricing a path-dependent payoff on the ordinary recombining tree as if only today’s price mattered.
Interview questions
Why does the real-world chance of an up move not affect the option price?
Because the option can be copied with stock and cash in every state. The cost of the copy depends only on the two possible outcomes, not on how likely they are, and any other price lets someone lock in a riskless profit.
One period, S₀ = 100, u = 1.1, d = 0.9, r = 0. What is the risk-neutral probability, and what is an at-the-money call worth?
p̃ = (1 − 0.9)/(1.1 − 0.9) = 0.5. The call pays 10 or 0, so it is worth 0.5 × 10 = 5.
Stochastic Calculus for Quants: Interview Playbook →
Volume I · Chapter 2
Probability Theory on Coin Toss Space
Make “expected value” and “what we know so far” precise on coin tosses, and meet the martingale: a process whose best forecast of tomorrow is today.
Picture it
A martingale is a fair game. If you toss a fair coin for 1 rupee a time, your expected money after the next toss is exactly what you have now, whatever you did before. Risk-neutral pricing turns every traded asset, once interest is stripped out, into such a fair game. Conditional expectation is simply your best guess given the tosses you have already seen, updated as each new toss comes in.
Everything lives on the set of possible coin-toss sequences. On that one set we can put two probability measures, the real-world one and the risk-neutral one, and compute expectations under each. A random variable is any number the tosses decide, such as the stock price after three tosses. Its expectation weights each outcome by its probability, and its variance, E[(X − E[X])2], measures how widely it spreads around that average.
Conditional expectation is the best estimate of a quantity given the first n tosses. Two rules carry most of the weight: the tower property (your forecast of a later forecast is today’s forecast) and taking out what is already known.
A martingale is a process whose conditional expectation of tomorrow equals today. Under the risk-neutral measure the discounted stock price is a martingale, and so is the discounted value of any self-financing portfolio. That gives the risk-neutral pricing formula. When the future depends on the past only through today’s state (the Markov property), prices become functions of the current stock price, which keeps the algorithms small.
Sn(1 + r)n = Ẽn[Sn+1(1 + r)n+1], Vn = Ẽn[VN(1 + r)N−n]
Reading the formula: Sn: stock price after n tosses · (1 + r)n: what 1 in cash grows to · Ẽn[…]: best guess under the pricing weights, given the first n tosses · VN: the payoff at the end
Live modelILLUSTRATIVE INPUTS
The distribution of the discounted stock price after N tosses under the real-world p and the risk-neutral p̃. Move p: the risk-neutral mean stays at S₀ = 100.
The hard parts, step by step
The ideas in this chapter that most people get stuck on, each with a picture, the derivation line by line, worked numbers and the trap to avoid.
Conditional expectation: your best guess, given what you have seen
Picture it
Halfway through a cricket match, your forecast of the final score depends on the overs already bowled. Conditional expectation is exactly that: an average over the tosses you have not seen yet, holding fixed the ones you have. Because it depends on what you have seen, it is itself random, one number per possible history.
Step by step
- En[X] = average of X over the tosses after n, with the first n held fixedThe definition. “What we know at time n” (a filtration) is just the first n tosses.
- En[aX + bY] = a En[X] + b En[Y]Linearity: averages add up.
- En[YX] = Y En[X] if Y is known at time nTaking out what is known: anything already decided acts like a constant.
- En[Em[X]] = En[X], n ≤ mTower property: your forecast today of a later forecast is today’s forecast.
- En[X] = E[X] if X depends only on tosses after nIndependence: what you have seen tells you nothing about it.
Worked numbers
Throughout: S0 = 100, u = 1.2, d = 0.9, r = 5% per period, so p̃ = q̃ = 0.5. Where a real-world probability is needed we use p = 0.6 (illustrative).
- After a head (S1 = 120): E1[S2] = 0.6 × 144 + 0.4 × 108 = 129.6
- After a tail (S1 = 90): E1[S2] = 0.6 × 108 + 0.4 × 81 = 97.2
- Tower check: E0[E1[S2]] = 0.6 × 129.6 + 0.4 × 97.2 = 116.64 = 100 × 1.082 ✓
Common mistake: Treating En[X] as a single number. Before the first toss it is a random variable: 129.6 or 97.2 depending on the first toss.
Why the discounted stock price is a martingale under p̃
Picture it
A martingale is a fair game: tomorrow’s expected value equals today’s. Under the pricing weights, the stock is expected to grow exactly like cash, so once you divide by cash growth, nothing is left over: the game is fair.
Step by step
- Ẽn[Sn+1] = p̃ u Sn + q̃ d SnTomorrow the stock is u Sn or d Sn.
- p̃ u + q̃ d = 1 + rPlug in p̃ = (1 + r − d)/(u − d): the pricing weights are built to make this true.
- Ẽn[Sn+1(1 + r)n+1] = (1 + r) Sn(1 + r)n+1 = Sn(1 + r)nDivide by the next period’s cash growth and the extra (1 + r) cancels.
Worked numbers
Throughout: S0 = 100, u = 1.2, d = 0.9, r = 5% per period, so p̃ = q̃ = 0.5. Where a real-world probability is needed we use p = 0.6 (illustrative).
- p̃ u + q̃ d = 0.5 × 1.2 + 0.5 × 0.9 = 1.05 = 1 + r ✓
- From S1 = 120: (0.5 × 144 + 0.5 × 108) / 1.05 = 120, so the discounted price does not drift.
Common mistake: Saying the stock itself is a martingale. It is the discounted stock, under p̃, that is fair. Under the real p = 0.6 it drifts upward.
Why every hedged portfolio is a martingale, and the pricing formula that follows
Picture it
If the stock is a fair game, then any strategy of buying and selling it, financed only by cash, is also a fair game: you cannot turn fair bets into an expected profit by changing your stake. And if the portfolio copies the option, the option’s price must be the fair-game value of its payoff.
Step by step
- Xn+1(1 + r)n+1 = Xn(1 + r)n + Δn(Sn+1(1 + r)n+1 − Sn(1 + r)n)Rewrite the wealth equation in discounted terms: new wealth = old wealth + shares × change in discounted price.
- Ẽn[bracket] = 0The bracket is the change in a martingale, so its expectation is zero; Δn is known at n and comes out.
- discounted Xn is a martingaleSo expected discounted wealth never changes.
- Vn = Ẽn[VN(1 + r)N−n]If XN = VN, the martingale property gives the risk-neutral pricing formula.
Worked numbers
Throughout: S0 = 100, u = 1.2, d = 0.9, r = 5% per period, so p̃ = q̃ = 0.5. Where a real-world probability is needed we use p = 0.6 (illustrative).
- Two-period call, strike 100: paths HH, HT, TH, TT pay 44, 8, 8, 0, each with weight 0.25.
- V0 = (0.25 × 44 + 0.5 × 8 + 0.25 × 0) / 1.052 = 15 / 1.1025 = 13.605
- The same answer as working backwards through the tree in Chapter 1 ✓
Common mistake: Thinking risk-neutral pricing is an assumption about investors. It is a consequence: hedged portfolios are fair games under p̃.
Jensen’s inequality: why an option is worth more than its payoff at the average
Picture it
Average a curve that bends upwards and you land above the curve evaluated at the average. A call payoff bends upwards (flat, then rising), so the average payoff beats the payoff at the average price. That gap is the value of optionality.
Step by step
- φ convex ⇒ E[φ(X)] ≥ φ(E[X])Jensen’s inequality. Convex means the chord between two points lies above the curve.
- φ(s) = (s − K)+ is convexThe call payoff.
- Ẽ[(SN − K)+] ≥ (Ẽ[SN] − K)+So the expected payoff is at least the payoff at the forward price.
Worked numbers
Throughout: S0 = 100, u = 1.2, d = 0.9, r = 5% per period, so p̃ = q̃ = 0.5. Where a real-world probability is needed we use p = 0.6 (illustrative).
- Ẽ[S2] = 100 × 1.052 = 110.25, so the payoff at the average is 110.25 − 100 = 10.25
- The average payoff is 0.25 × 44 + 0.5 × 8 = 15, which is larger ✓
Common mistake: Writing E[max(S − K, 0)] = max(E[S] − K, 0). That throws away exactly the time value of the option.
Markov processes: why prices become functions of today’s price
Picture it
If the future depends on the past only through where the stock is now, then two different histories that end at the same price must have the same option value. So instead of tracking every path, you only need a table of values by price.
Step by step
- Vn = vn(Sn)For a payoff that depends only on SN, the value at time n is a function of today’s price alone.
- vn(s) = p̃ vn+1(us) + q̃ vn+1(ds)1 + rThe backward step, written as a function of price instead of path.
- extra state when needed: (Sn, Mn), (Sn, running sum), …Path-dependent payoffs stay Markov once you add what they remember.
Worked numbers
Throughout: S0 = 100, u = 1.2, d = 0.9, r = 5% per period, so p̃ = q̃ = 0.5. Where a real-world probability is needed we use p = 0.6 (illustrative).
- HT and TH both reach S2 = 108, so both carry the value v2(108) = 8.
- v1(120) = 24.762 and v1(90) = 3.810, two numbers instead of a value for every path.
Common mistake: Assuming every process is Markov. The running maximum on its own is not; you need the pair (price, maximum).
Interview questions
Is the stock price a martingale under the real-world measure?
Usually not. It grows on average at its real expected return. Only the discounted price, under the risk-neutral measure, is a martingale.
State the tower property in one line.
For n ≤ m, En[Em[X]] = En[X]: your forecast today of a later forecast is just today’s forecast.
Stochastic Calculus for Quants: Interview Playbook →
Volume I · Chapter 3
State Prices
Every possible future state has a price today. An option’s price is its payoff in each state times that state’s price, added up.
Picture it
Imagine a shop that sells one ticket for each possible future: “pays 1 if the market crashes”, “pays 1 if it booms”, and so on. The ticket prices are the state prices. Any investment is just a basket of these tickets, so its price is the sum of its tickets. Crash tickets cost the most for how likely they are, because everyone wants money when times are bad. It is the same reason insurance costs more than the expected claim.
The Radon–Nikodym derivative Z is the ratio of risk-neutral to real-world probability, state by state. It converts one expectation into the other: Ẽ[X] = E[Z X].
Divide Z by the growth of cash and you get the state price density ζ. Now prices are real-world expectations of payoff times ζ. When the stock is expected to beat cash, ζ is highest in the states where the stock has done badly: insurance against bad states is expensive.
The same object solves the investor’s problem: choose the best terminal wealth in terms of ζ, subject to its price being today’s wealth, then replicate it. That is the martingale (or dual) approach to portfolio choice.
Z = P̃(ω)P(ω), ζ = Z(1 + r)N, V0 = E[ζ VN] = ∑ω ζ(ω) VN(ω) P(ω)
Reading the formula: ω: one possible future (one sequence of tosses) · P, P̃: real-world and pricing probabilities of it · Z: their ratio · ζ: the ticket price of that future per unit of real probability · VN: the payoff
Live modelILLUSTRATIVE INPUTS
Bars show how likely each number of heads is; the line is the state-price density. The prices of all states add up to the discount factor.
The hard parts, step by step
The ideas in this chapter that most people get stuck on, each with a picture, the derivation line by line, worked numbers and the trap to avoid.
The Radon–Nikodym derivative Z: switching between two sets of probabilities
Picture it
Think of Z as an exchange rate between two currencies of probability. For each future path it tells you how much more (or less) weight the pricing measure gives that path than the real world does. Multiply by Z and a real-world average becomes a pricing average.
Step by step
- Z(ω) = P̃(ω)P(ω)One number per path: pricing probability over real probability.
- Z > 0, E[Z] = 1Both measures agree on what is possible, and Z re-weights without creating or losing total probability.
- Ẽ[X] = E[Z X]Change of measure: any pricing expectation is a real-world expectation re-weighted by Z.
Worked numbers
Two tosses with real-world p = 0.6 (illustrative) and pricing weight p̃ = 0.5, same stock as before.
- Z(HH) = 0.25 / 0.36 = 0.694 Z(HT) = Z(TH) = 0.25 / 0.24 = 1.042 Z(TT) = 0.25 / 0.16 = 1.563
- E[Z] = 0.36 × 0.694 + 0.48 × 1.042 + 0.16 × 1.563 = 1 ✓
- Bad paths get more weight: the pricing measure is pessimistic compared with the real world.
Common mistake: Forgetting that Z must be strictly positive. If one measure says a path is impossible and the other does not, there is no Z and pricing breaks.
Z over time and the change of measure inside a conditional expectation
Picture it
Before the game ends you do not know the final Z, so you track your best guess of it, Zn. When you change measure halfway through, you must divide by what you already know about Z, a bit like re-normalising after you learn the first toss.
Step by step
- Zn = En[Z]The Radon–Nikodym process: a martingale under the real-world measure.
- Ẽn[Y] = En[Z Y]ZnBayes’ rule for conditional expectations. Dividing by Zn corrects for the information already revealed.
Worked numbers
Two tosses with real-world p = 0.6 (illustrative) and pricing weight p̃ = 0.5, same stock as before.
- Z1(H) = 0.6 × 0.694 + 0.4 × 1.042 = 0.833 = 0.5 / 0.6 Z1(T) = 1.25 = 0.5 / 0.4
- After a head: (0.6 × 0.694 × 144 + 0.4 × 1.042 × 108) / 0.833 = (60 + 45) / 0.833 = 126
- Direct check: 0.5 × 144 + 0.5 × 108 = 126 ✓
Common mistake: Using En[Z Y] without dividing by Zn. That gives 105 instead of 126 here.
State prices: pricing with real-world probabilities
Picture it
Each future path has a ticket price today. Divide that ticket price by how likely the path really is and you get ζ, the price per unit of probability. Prices are then ordinary real-world averages of payoff times ζ.
Step by step
- ζ(ω) = Z(ω)(1 + r)NThe state price density: Z and discounting rolled into one.
- price of a path’s ticket = ζ(ω) P(ω)The cost today of receiving 1 if and only if that path happens.
- V0 = E[ζ VN] = ∑ω ζ(ω) P(ω) VN(ω)Any payoff is a basket of tickets.
Worked numbers
Two tosses with real-world p = 0.6 (illustrative) and pricing weight p̃ = 0.5, same stock as before.
- ζ(HH) = 0.694 / 1.1025 = 0.630 ζ(HT) = ζ(TH) = 0.945 ζ(TT) = 1.417
- Call price: 0.36 × 0.630 × 44 + 0.48 × 0.945 × 8 = 9.977 + 3.628 = 13.605 ✓
Common mistake: Thinking ζ is the same in every state. It is highest in bad states, which is why insurance against bad states is expensive.
Optimal investment with state prices (log utility)
Picture it
Instead of picking trades period by period, pick the final wealth you want in each possible future, subject to its price matching your money today. Then build the trades that deliver it. The state prices turn a hard multi-period problem into one shopping problem.
Step by step
- maximise E[log XN] subject to E[ζ XN] = X0Best expected utility you can afford.
- 1XN(ω) = λ ζ(ω)Lagrange multiplier: set the derivative of utility equal to λ times the price, path by path.
- XN = X0ζPut this into the budget: E[ζ · 1/(λζ)] = 1/λ = X0.
- then replicate XNAny payoff can be replicated in this model, so the wealth you chose is achievable.
Worked numbers
Two tosses with real-world p = 0.6 (illustrative) and pricing weight p̃ = 0.5, same stock as before.
- X0 = 100: XN(HH) = 100 / 0.630 = 158.76, XN(HT) = XN(TH) = 105.84, XN(TT) = 70.56
- Budget check: 0.36 × 0.630 × 158.76 + 0.48 × 0.945 × 105.84 + 0.16 × 1.417 × 70.56 = 100 ✓
- You take less wealth in the expensive bad states and more in the cheap good ones.
Common mistake: Pricing the budget with real-world probabilities. The budget must use ζ; otherwise the plan is not affordable.
Interview questions
Why are state prices higher in bad states?
Money is worth more to investors when they are poor. When the stock’s expected return beats the safe rate, the risk-neutral measure moves probability toward the down states, so their prices per unit of real probability go up.
What is the price of a security that pays 1 in every state at time N?
1/(1 + r)N, the discount factor. The state prices must add up to it.
Stochastic Calculus for Quants: Interview Playbook →
Volume I · Chapter 4
American Derivative Securities
When the holder can exercise at any time, the price comes from the best stopping rule: at every node, compare “exercise now” with “keep the option”.
Picture it
Think of a discount coupon you can use on any day before it expires. Each day you ask: is using it now worth more than keeping the chance to use it later? Usually waiting wins, because the future might be better. But for a put that is already deep in the money, cashing in now lets you start earning interest on the strike, and that beats waiting.
The backward step changes by one word: at each node the value is the larger of the payoff from exercising now and the discounted risk-neutral expectation of tomorrow’s value.
A stopping time is a rule for when to stop that uses only the information so far. The American price is the best expected discounted payoff over all such rules. Its discounted price is a supermartingale, falling on average, and a martingale up to the optimal exercise time.
For a call on a stock that pays no dividends, with positive rates, early exercise never helps, so the American call is worth the same as the European one. A put is different: deep in the money, receiving the strike now and earning interest on it beats waiting.
Vn = max{g(Sn), p̃ Vn+1(H) + q̃ Vn+1(T)1 + r}, V0 = maxτ Ẽ[g(Sτ)(1 + r)τ]
Reading the formula: g(Sn): what you get if you exercise now · the fraction: what keeping the option is worth · τ: a rule for when to stop, using only what you know so far · max over τ: the best such rule
Live modelILLUSTRATIVE INPUTS
A one-year American put, S₀ = 100, strike 100. Red nodes are where exercising now beats waiting. Raise the rate and watch the region and the premium grow.
The hard parts, step by step
The ideas in this chapter that most people get stuck on, each with a picture, the derivation line by line, worked numbers and the trap to avoid.
Stopping times: rules that never peek into the future
Picture it
A stopping time is a rule like “sell the first day the price drops below 90”. You can always tell, on the day, whether the rule says stop. “Sell on the day of the highest price” is not a stopping time, because you only know it was the highest afterwards.
Step by step
- τ is a stopping time ⇔ whether {τ = n} happened is known from the first n tossesThe formal test.
- first time Sn ≤ 90 ✓Decided using only prices seen so far.
- time of the maximum of Sn ✗Needs the whole future path.
Worked numbers
- Path H then T: prices 100, 120, 108. “First time price ≤ 100” is never triggered: you know at every step.
- “Time of the maximum” on that path is 1, but at time 1 you cannot know 120 will be the top until you see 108.
Common mistake: Choosing exercise using information you would not have yet, for example exercising “at the bottom”. Such strategies are not allowed, and pricing with them gives the wrong number.
The American algorithm, node by node
Picture it
At every node you compare two things: the cash you get by exercising now, and the value of keeping the option one more step. You keep the larger, and you work back from expiry.
Step by step
- VN = g(SN)At expiry it is just the payoff, here g(s) = (100 − s)+.
- Vn = max{g(Sn), p̃ Vn+1(H) + q̃ Vn+1(T)1 + r}Exercise now versus continue.
- V0 = maxτ Ẽ[g(Sτ)(1 + r)τ]Equivalently, the best stopping rule’s discounted expected payoff.
Worked numbers
American put with strike 100 on the two-period tree (S0 = 100, u = 1.2, d = 0.9, r = 5%, p̃ = 0.5).
- At expiry the stock is 144, 108 or 81, so the put pays 0, 0 or 19.
- Node S1 = 90: continue = 0.5 × 19 / 1.05 = 9.048, exercise = 10 → exercise, V = 10.
- Node S1 = 120: both are 0.
- Today: continue = 0.5 × 10 / 1.05 = 4.762, exercise = 0 → American put 4.762.
- European put (no early exercise): 4.308, so the early-exercise premium is 0.454.
Common mistake: Forgetting the max at intermediate nodes, which gives the European price instead.
Supermartingales and the best time to exercise
Picture it
An American option is a fair game while you should still hold it, and turns into a losing game once you have passed the best exercise point. So its discounted value drifts down on average (a supermartingale), and stays level exactly until the optimal time to stop.
Step by step
- discounted Vn is a supermartingale under p̃Its expected value tomorrow is at most today’s.
- τ* = min{n : Vn = g(Sn)}Optimal rule: exercise the first time the option is worth only its payoff.
- discounted Vn ∧ τ* is a martingaleUp to τ*, nothing is lost by waiting.
Worked numbers
American put with strike 100 on the two-period tree (S0 = 100, u = 1.2, d = 0.9, r = 5%, p̃ = 0.5).
- From today: Ẽ[V1] / 1.05 = (0.5 × 0 + 0.5 × 10) / 1.05 = 4.762 = V0: fair up to time 1.
- At S1 = 90: Ẽ1[V2] / 1.05 = 9.048 < V1 = 10: waiting now loses value, so τ* = 1 on that path.
Common mistake: Holding past τ*. Once value equals payoff and continuing is worth less, every extra step loses money on average.
General American derivatives: when the payoff depends on the path
Picture it
A voucher that pays the gap between the highest price you have seen and today’s price. Two holders can stand at the same price today and still hold vouchers of different value, because one of them saw a higher peak on the way. The option has to remember the path, not just where the price is now.
Step by step
- Gn = maxk≤n Sk − SnThe exercise value depends on the whole path so far, so paths that meet at the same price cannot be merged.
- VN = GN, Vn = max(Gn, p̃ Vn+1(H) + q̃ Vn+1(T)1 + r)The same backward rule as before, applied on every path: exercise now, or keep the fair value of waiting.
- Vn ≥ Gn, and discounted Vn is a supermartingale under p̃The price never falls below what exercising gives, and on average it never grows faster than cash.
- V is the smallest process with both propertiesAnything that dominates the payoff and is a discounted supermartingale costs at least as much. The price is the cheapest such process (the Snell envelope).
- τ* = min{n : Vn = Gn}Exercise the first time the option is worth no more than its exercise value.
Worked numbers
Two periods, S0 = 4, u = 2, d = 1/2, r = 25%, so p̃ = (1.25 − 0.5)/(2 − 0.5) = 0.5.
- Paths HT and TH both end at S2 = 4, but pay 4 (the peak was 8) and 0 (the peak was 4). TT pays 3, HH pays 0.
- At S1 = 8: V1 = max(0, (0.5 × 0 + 0.5 × 4)/1.25) = 1.6: hold.
- At S1 = 2: exercising pays 4 − 2 = 2, waiting is worth (0.5 × 0 + 0.5 × 3)/1.25 = 1.2, so V1 = 2 and τ* = 1 on that path.
- Today: V0 = (0.5 × 1.6 + 0.5 × 2)/1.25 = 1.44.
Common mistake: Pricing it on the price-only tree. Merging HT and TH at S = 4 averages a payoff of 4 with a payoff of 0, and the value comes out wrong.
Why an American call on a non-dividend stock is never exercised early
Picture it
Exercising a call early means paying the strike now instead of later, losing the interest on it, and giving up the protection the option gives if the stock falls. With no dividends, there is nothing to gain in return.
Step by step
- g(s) = (s − K)+ is convex with g(0) = 0The call payoff.
- g(λs) ≤ λ g(s), 0 ≤ λ ≤ 1A consequence of convexity and g(0) = 0.
- discounted g(Sn) is a submartingale under p̃Using Jensen with the discounted stock martingale: the discounted payoff drifts up on average.
- waiting to N is optimal, so American call = European callA submartingale is best stopped as late as possible (optional sampling).
Worked numbers
- Same tree, call with strike 100: American = European = 13.605.
- At S1 = 120: exercising gives 20 but holding is worth 24.762.
Common mistake: Applying this to puts, or to calls on dividend-paying stocks. Both can be worth exercising early.
Interview questions
Why is an American call on a non-dividend stock never exercised early?
Before expiry it is worth at least S − K discounted to today, which is more than S − K when rates are positive. Exercising throws away that interest and the option’s protection against a fall.
What happens to the early-exercise premium of a put when interest rates rise?
It rises. Getting the strike early earns more interest, so exercising early becomes worth more.
Equity Derivatives Quant Notes & Code →
Volume I · Chapter 5
Random Walk
The symmetric random walk is the discrete twin of Brownian motion. How long it takes to hit a level is the key to barrier options and perpetual American options.
Picture it
Someone takes one random step left or right each second. They will almost surely reach a lamppost one step to their right, but on average it takes forever, because a few walks wander very far left before coming back. To count how often the walk reaches a level, mirror each path after it first touches the level: every path that touched it and ended below has a twin that ends above.
Toss a fair coin and step up or down by one. The first time the walk reaches level m is a random time τm. It is finite with probability one, yet its expected value is infinite.
A well-chosen exponential martingale, together with the rule that a martingale stopped at a sensible time keeps its expectation, gives the distribution of τm through its generating function.
The reflection principle counts paths: every path that touches m and ends below it pairs with one that ends the same distance above. That gives the maximum’s distribution in closed form. The same tools price a perpetual American put: exercise the first time the stock falls to a threshold.
P(maxk≤n Mk ≥ m) = P(Mn = m) + 2 P(Mn > m), E[ατm] = (1 − √(1 − α2)α)m
Reading the formula: Mn: position after n steps · max Mk: the highest point reached so far · τm: the first time the walk reaches level m · α: a number between 0 and 1 that tracks how long that takes
Live modelSIMULATED
Simulated symmetric random walks. Walks that reach the level are green; the share that reach it is checked against the reflection-principle formula.
The hard parts, step by step
The ideas in this chapter that most people get stuck on, each with a picture, the derivation line by line, worked numbers and the trap to avoid.
Sure to hit +1, yet the average time is infinite
Picture it
The walker always gets to the lamppost eventually, but now and then they wander off a very long way first. Those rare, enormous detours are long enough to make the average time infinite, even though almost every walk arrives fairly soon.
Step by step
- P(τ1 ≤ n) → 1 as n → ∞Hitting is certain in the long run.
- E[ατ1] = 1 − √(1 − α2)αThe generating function (derived in the next topic).
- let α ↑ 1: the value → 1So P(τ1 < ∞) = 1.
- the slope at α = 1 is infinite ⇒ E[τ1] = ∞Differentiating gives the mean, and the square root makes the slope blow up.
Worked numbers
- Chance of reaching +1 within 1 step: 50%; within 9: 75.4%; within 99: 92.0%; within 999: 97.5%.
- It keeps creeping towards 100%, but so slowly that the average time never settles.
Common mistake: Thinking “certain to happen” means “happens in finite expected time”. Here it does not.
Deriving the hitting-time formula with a martingale
Picture it
Find a quantity that stays fair as the walk moves. Stop it when the walk first reaches m. Because the game is fair, its expected value at that moment equals its value at the start, and that one equation gives the whole distribution of the hitting time.
Step by step
- Sn = eσMn (2eσ + e−σ)nFor any σ > 0 this is a martingale: one step multiplies eσM by eσ or e−σ on average (eσ + e−σ)/2, and the second factor cancels it.
- E[Sτm] = S0 = 1Optional sampling, justified because M stays at most m before τm.
- eσm E[ατm] = 1, α = 2/(eσ + e−σ)At τm the walk sits exactly at m.
- E[ατm] = (e−σ)m = (1 − √(1 − α2)α)mSolve α = 2/(eσ + e−σ) for e−σ.
Worked numbers
- α = 0.9, m = 1: (1 − √0.19) / 0.9 = 0.6268
- Check by adding up the exact first-passage probabilities, αn × P(τ1 = n), over all n: 0.6268 ✓
Common mistake: Using optional sampling without checking it applies. It needs the stopped process to stay bounded (or a similar condition).
The reflection principle, by counting paths
Picture it
Take any path that touches level m and later ends below it. Flip everything after the first touch upside down: it now ends the same distance above m. Every path that ends above m pairs with one that touched m and ends below, so the paths that touch m are easy to count.
Step by step
- paths that touch m and end at b < m ↔ paths ending at 2m − bThe reflection pairing, one for one.
- P(maxk≤n Mk ≥ m) = P(Mn = m) + 2 P(Mn > m)Paths ending above m count twice (themselves and their twins); paths ending exactly at m once.
Worked numbers
- 4 steps, level 2: P(M4 = 2) = 4/16 and P(M4 > 2) = P(M4 = 4) = 1/16.
- Formula: 4/16 + 2 × 1/16 = 6/16 = 0.375
- Listing all 16 paths by hand: exactly 6 touch level 2 ✓
Common mistake: Doubling the paths that end exactly at m. They are their own reflection and count only once.
The perpetual American put: when to exercise if the option never expires
Picture it
With no expiry, the only question is how low to let the stock fall before cashing in. Fix a trigger level, work out what the put is worth if you exercise the first time the stock hits it, then choose the trigger that gives the most.
Step by step
- trigger L = S0 dj: exercise the first time the stock falls j stepsEvery exercise rule of this shape is a stopping time.
- value(j) = (K − L) · Ẽ[(1 + r)−τ]Payoff at the trigger, discounted by how long it takes to get there.
- Ẽ[(1 + r)−τ] = fj, f = 1 − √(1 − 4p̃q̃α2)2p̃α, α = 1/(1 + r)Each one-step fall takes an independent random time; f solves f = α(q̃ + p̃ f2).
- choose j to maximise value(j)Too high a trigger gives up the chance of a bigger payoff; too low means waiting too long.
Worked numbers
K = 100, S0 = 100, u = 1.2, d = 1/1.2, r = 5% (so p̃ = 0.591, f = 0.5769).
- j = 1 (L = 83.33): value = 9.615
- j = 2 (L = 69.44): value = 10.170 ← best
- j = 3 (L = 57.87): value = 8.090
- Check by brute force (repeated backward induction on a long price ladder): 10.170, exercising at 69.44 ✓
Common mistake: Exercising as soon as the put is in the money. Here the best trigger is well below the strike.
Interview questions
A symmetric random walk starts at 0. Will it hit +1, and how long does it take on average?
It hits +1 with probability one, but the expected time is infinite: rare, very long excursions below zero drag the mean up without bound.
What does the reflection principle say?
Take any path that reaches m and ends at b < m, and reflect it after its first visit to m. It now ends at 2m − b. This pairs paths one for one and gives the distribution of the running maximum.
The Stochastic Calculus Visual Lab →
Volume I · Chapter 6
Interest-Rate-Dependent Assets
Let the interest rate itself be random on the tree. Bonds, forwards, futures, caps and floors are then priced by discounting along each path.
Picture it
Picture a savings account whose interest rate is reset every year at random. What is a promise of 1 in ten years worth today? It depends on every rate along the way, so you average over all the possible rate paths, discounting year by year along each one. That average is the zero-coupon bond price, and the bond prices together give the yield curve.
The discount factor is now a product of one-period discounts along the path, each at that node’s rate. A zero-coupon bond’s price is the risk-neutral expectation of that product. Roll 1 back from maturity, discounting at each node.
With random rates, forward and futures prices separate. The forward price weighs payoffs by discounting; the futures price, marked to market every period, is a plain risk-neutral expectation. They agree only when rates are not random.
Caps, floors and swaps follow from the same backward step, and the tree’s parameters are fixed by matching the bond prices seen in the market.
B0,m = Ẽ[∏k=0m−1 11 + Rk], Futn,m = Ẽn[Sm], Forn,m = Ẽn[Dm Sm]Dn Bn,m
Reading the formula: Rk: the interest rate in period k · ∏: multiply the one-period discounts together · B0,m: price today of 1 paid at period m · D: the discount factor up to a date · Fut, For: futures and forward prices
Live modelILLUSTRATIVE INPUTS
A recombining short-rate tree: each period the rate is multiplied by the up or down factor with risk-neutral chance one half. Bars are zero-coupon bond prices; the line is the yield curve they imply.
The hard parts, step by step
The ideas in this chapter that most people get stuck on, each with a picture, the derivation line by line, worked numbers and the trap to avoid.
A zero-coupon bond from a rate tree, step by step
Picture it
A promise of 1 in two years is worth less today the higher rates turn out to be. So you start with 1 at maturity, walk back one year at a time, and at each node discount by that node’s own rate.
Step by step
- Dn = ∏k<n 11 + RkThe discount factor along a path: one-period discounts multiplied together.
- Bn,m = Ẽn[DmDn]Price at n of 1 paid at m.
- roll back: B = average of the two next values1 + rate at this nodeIn practice: start with 1 at maturity and work backwards.
Worked numbers
Rate tree: r0 = 4%, next period 5% (up) or 3.4% (down), each with pricing weight 0.5.
- One-period bond: B0,1 = 1 / 1.04 = 0.96154
- At time 1 the remaining one-period bond is 1/1.05 = 0.95238 (up) or 1/1.034 = 0.96712 (down).
- B0,2 = 0.5 × (0.95238 + 0.96712) / 1.04 = 0.92284, a two-period yield of 4.097%
Common mistake: Discounting the whole way with today’s rate. When rates are random, each period uses its own rate along the path.
Forward price versus futures price when rates are random
Picture it
A futures contract settles gains and losses every period. If the asset tends to be worth more exactly when rates are high, your futures gains get reinvested at high rates and your losses are funded at low rates. That makes the futures position slightly more attractive, so its price sits a little above the forward.
Step by step
- For0,m = Ẽ[Dm Sm]B0,mThe forward price: the fixed price agreed today that makes the contract worth zero.
- Fut0,m = Ẽ[Sm]The futures price: a plain pricing-weight average, no discounting.
- equal when rates are not randomThen Dm is a constant and cancels.
Worked numbers
Rate tree: r0 = 4%, next period 5% (up) or 3.4% (down), each with pricing weight 0.5.
Asset worth 100 × (1 + r1) at time 2, so it rises with rates.
- Forward: (100 / 1.04) / 0.92284 = 104.194
- Futures: 100 × (1 + 0.5 × (5% + 3.4%)) = 104.200
- The futures price is higher by 0.006, as the picture says.
Common mistake: Treating forward and futures prices as identical in a model where rates move.
The swap rate: the fixed rate that makes a swap worth zero
Picture it
In a swap you pay a fixed rate and receive whatever the floating rate turns out to be. The floating side is worth exactly what it costs to deposit 1 now and take back 1 at the end, so pricing it needs no model at all. The swap rate just balances the fixed side against that.
Step by step
- floating leg value = 1 − B0,mReceiving each period’s rate on 1 is the same as holding 1 now and owing 1 at maturity.
- fixed leg value = K ∑k=1m B0,kA fixed payment K each period, discounted with today’s bond prices.
- swap rate = 1 − B0,mB0,1 + … + B0,mSet the two legs equal and solve for K.
Worked numbers
Rate tree: r0 = 4%, next period 5% (up) or 3.4% (down), each with pricing weight 0.5.
- Two-period swap rate = (1 − 0.92284) / (0.96154 + 0.92284) = 4.095%
- Check: receiving r1 at time 2 is worth 0.5 × (0.05/(1.04 × 1.05) + 0.034/(1.04 × 1.034)) = 0.03870 = B0,1 − B0,2 ✓
Common mistake: Building a rate model to value the floating leg. Its value comes straight from today’s bond prices.
Caps and floors, and the parity that links them
Picture it
A caplet pays you if the rate ends above a level K, like insurance against rates rising. A floorlet pays if it ends below K. Holding a caplet and selling a floorlet gives you exactly the rate minus K, whatever happens, so their prices must line up with a simple swap payment.
Step by step
- caplet = Ẽ[Dm (R − K)+], floorlet = Ẽ[Dm (K − R)+]Price each with the pricing weights, discounting along each path.
- caplet − floorlet = Ẽ[Dm (R − K)]Because (x)+ − (−x)+ = x: the cap–floor parity.
Worked numbers
Rate tree: r0 = 4%, next period 5% (up) or 3.4% (down), each with pricing weight 0.5.
Strike K = 4% on the time-1 rate, paid at time 2.
- Caplet: 0.5 × (5% − 4%) / (1.04 × 1.05) = 0.004579
- Floorlet: 0.5 × (4% − 3.4%) / (1.04 × 1.034) = 0.002790
- Difference 0.001789 = value of receiving (r1 − 4%) at time 2 ✓
Common mistake: Discounting the caplet with the up-state rate in every state. Each state uses the rates along its own path.
Forward measures: pricing in bond units
Picture it
Count money in zero-coupon bonds that mature on the payment date, instead of in bank-account cash. In those units the awkward random discounting disappears: today’s price is just the bond price times an average of the payoff, with the weights tilted towards the low-rate states, where that bond is worth more.
Step by step
- Dm = 1(1 + R0)···(1 + Rm−1), B0,m = Ẽ[Dm]The zero-coupon bond price is the average discount factor.
- P̃m(ω) = P̃(ω) · Dm(ω)B0,mA change of measure with Z = Dm/B0,m, which averages to 1, exactly as in Chapter 3.
- V0 = Ẽ[Dm Vm] = B0,m Ẽm[Vm]Price = bond price × forward-measure average. At a later time n: Vn = Bn,m Ẽmn[Vm].
- Forn,m = Sn / Bn,m is a martingale under P̃mSo the forward price today is the forward-measure average of the asset price at m: For0,m = Ẽm[Sm].
Worked numbers
R0 = 10%, then R1 = 15% after H or 5% after T, p̃ = 0.5. A payment at time 2 of 100 × max(R1 − 10%, 0): 5 after H, 0 after T.
- Discount factors: D2 = 1/(1.10 × 1.15) = 0.7905 after H, 1/(1.10 × 1.05) = 0.8658 after T, so B0,2 = 0.8282.
- Forward measure: P̃2(H) = 0.5 × 0.7905 / 0.8282 = 0.4773, P̃2(T) = 0.5227.
- Price: 0.8282 × (0.4773 × 5) = 0.8282 × 2.3864 = 1.9763, the same as Ẽ[D2 V2] = 0.5 × 0.7905 × 5.
Common mistake: Multiplying the risk-neutral average payoff by the bond price: 0.8282 × 2.5 = 2.0704 is wrong when rates are random, because the payoff and the discount factor move together.
Interview questions
Why can futures and forward prices differ?
Futures settle gains and losses every day. If the asset tends to rise when rates rise, gains are reinvested at higher rates and losses are funded at lower ones, so the futures price sits above the forward. With non-random rates they are equal.
How do you get a zero-coupon bond price from a short-rate tree?
Put 1 at maturity and work backwards: at each node, average the two next values with the risk-neutral probabilities and discount at that node’s rate.
Yield Curve Quant Notes & Lab →