Stochastic Calculus
Brownian motion, Ito’s rule and the ideas behind Black-Scholes.
01Brownian motion at two times
W is a standard Brownian motion with W_0 = 0. What are the mean and the variance of W_4? What is the covariance of W_2 and W_5? What is the probability that W_4 is above 2?
Hint
W_t is normal with mean 0 and variance t. For the covariance, write W_5 as W_2 plus an independent increment.
Answer
W_4 has mean 0 and variance 4. The covariance of W_2 and W_5 is 2. The probability that W_4 exceeds 2 is about 0.159.
Solution
By definition W_4 is normal with mean 0 and variance 4, so its standard deviation is 2.
W_5 = W_2 + (W_5 - W_2), and the increment is independent of W_2. So Cov(W_2, W_5) = Var(W_2) = 2. In general the covariance is the smaller of the two times.
W_4 > 2 means W_4 / 2 > 1 for a standard normal, which has probability 1 - Φ(1), about 0.159.
02Ito on the log of a price
A price follows dS = μS dt + σS dW with μ = 0.08 and σ = 0.20 per year, and starts at S_0 = 100. Use Ito’s rule to find the dynamics of ln S. What are the median and the mean of the price after 10 years?
Hint
For f(S) = ln S you need f′ = 1/S and f″ = -1/S^2, and (dS)^2 = σ^2 S^2 dt.
Answer
d(ln S) = 0.06 dt + 0.20 dW. After 10 years the median price is about 182.21 and the mean is about 222.55.
Solution
Ito’s rule gives d(ln S) = dS/S - (1/2)(dS)^2/S^2 = μ dt + σ dW - (1/2)σ^2 dt.
So ln S has the constant drift μ - σ^2/2 = 0.08 - 0.02 = 0.06 and the volatility 0.20.
ln S_10 is normal with mean ln 100 + 0.6, so the median of S_10 is 100 e^0.6, about 182.21.
The mean is S_0 e^(μT) = 100 e^0.8, about 222.55. The mean sits above the median because the lognormal has a long right tail.
The gap of σ^2/2 per year is the volatility drag of module 10 of the course.
03The hedging argument
A stock follows dS = μS dt + σS dW, and money in the bank grows at the rate r. Derive the partial differential equation for the price V(S, t) of an option by holding the option and a short position of Δ shares. Then check it with numbers for a call with S = 100, K = 100, r = 0.03, σ = 0.20 and one year left.
Hint
Apply Ito’s rule to V. Choose Δ so that the dW terms cancel. A portfolio without risk has to earn the bank rate.
Answer
The equation is V_t + (1/2)σ^2 S^2 V_SS + rS V_S - rV = 0. For the call the closed form price is about 9.41, and its time decay, gamma and delta satisfy the equation up to rounding.
Solution
Ito’s rule gives dV = (V_t + μS V_S + (1/2)σ^2 S^2 V_SS) dt + σS V_S dW.
The portfolio Π = V - ΔS changes by dΠ = dV - Δ dS. With Δ = V_S the dW terms and the μ terms cancel, which leaves dΠ = (V_t + (1/2)σ^2 S^2 V_SS) dt.
This change has no randomness, so it must equal the bank return rΠ dt = r(V - S V_S) dt, or else there is an arbitrage.
Setting the two equal gives V_t + (1/2)σ^2 S^2 V_SS + rS V_S - rV = 0. The drift μ has dropped out.
For the call, the closed form gives V ≈ 9.413, V_S ≈ 0.599, V_SS ≈ 0.0193 and V_t ≈ -5.380. Then -5.380 + 0.5 × 0.04 × 10,000 × 0.0193 + 3 × 0.599 - 0.03 × 9.413 is 0 up to rounding.
from math import erf, exp, log, sqrt def call(S, K=100, r=0.03, s=0.2, T=1.0): N = lambda x: 0.5 * (1 + erf(x / sqrt(2))) d1 = (log(S / K) + (r + s * s / 2) * T) / (s * sqrt(T)) return S * N(d1) - K * exp(-r * T) * N(d1 - s * sqrt(T)) S, h, r, s = 100.0, 0.01, 0.03, 0.2 V = call(S) V_S = (call(S + h) - call(S - h)) / (2 * h) V_SS = (call(S + h) - 2 * V + call(S - h)) / h ** 2 V_t = -(call(S, T=1 + 1e-5) - call(S, T=1 - 1e-5)) / 2e-5 print(round(V, 3), round(V_t + 0.5 * s * s * S * S * V_SS + r * S * V_S - r * V, 6))
Full collection This category has 12 more questions with worked solutions (4 easy, 4 medium, 4 hard). They open with Foundations or Pro. See pricing, or sign in to your account.
Compare your own answer with the worked solution.