Skip to content
Work Practice Products Coding interviews Machine learning coding Quant developer HFT course Blog Method Why me About Enquire Book a call

Practice · Quant prep · Stochastic differential equations

Stochastic differential equation interview questions

50 questions with worked solutions. Geometric Brownian motion, Ornstein–Uhlenbeck and CIR, hitting times, Fokker–Planck, simulation schemes and Girsanov.

1 easy · 32 medium · 17 hard · Question type reported at: Goldman SachsMorgan StanleyJ.P. MorganCitadel

Practise timed: 25 questions · 90s each All Quant prep topics


1 Easy Type asked atGoldman SachsMorgan StanleyJ.P. Morgan
Which process solves dSt=μSt dt+σSt dWtdS_t=\mu S_t\,dt+\sigma S_t\,dW_t with S0>0S_0>0?
  1. S0eμt+σWt\displaystyle S_0e^{\mu t+\sigma W_t}
  2. S0e(μ−12σ2)t+σWt\displaystyle S_0e^{(\mu-\frac12\sigma^2)t+\sigma W_t}
  3. S0e(μ+12σ2)t+σWt\displaystyle S_0e^{(\mu+\frac12\sigma^2)t+\sigma W_t}
  4. S0(1+μt+σWt)S_0(1+\mu t+\sigma W_t)
Show answer
Answer: S0e(μ−12σ2)t+σWtS_0e^{(\mu-\frac12\sigma^2)t+\sigma W_t}
Apply Itô's lemma to ln⁡S\ln S: dln⁡S=dSS−12(dS)2S2=μ dt+σ dW−12σ2dtd\ln S=\tfrac{dS}{S}-\tfrac12\tfrac{(dS)^2}{S^2}=\mu\,dt+\sigma\,dW-\tfrac12\sigma^2dt. Integrating, ln⁡St=ln⁡S0+(μ−12σ2)t+σWt\ln S_t=\ln S_0+(\mu-\tfrac12\sigma^2)t+\sigma W_t. The −12σ2-\tfrac12\sigma^2 is the Itô correction: without it the first option has drift μ+12σ2\mu+\tfrac12\sigma^2, not μ\mu.
2 Medium Type asked atGoldman SachsMorgan StanleyJ.P. Morgan
dS=0.1 S dt+0.2 S dWdS=0.1\,S\,dt+0.2\,S\,dW with S0=50S_0=50. What is E[S2]\mathbb E[S_2]?
Show answer
Answer: 50e0.2≈61.0750e^{0.2}\approx61.07
Take expectations in the SDE: the dWdW term has mean zero, so m(t)=E[St]m(t)=\mathbb E[S_t] solves m′=0.1 mm'=0.1\,m. Hence m(2)=50e0.1⋅2=50e0.2≈61.07m(2)=50e^{0.1\cdot2}=50e^{0.2}\approx61.07. The volatility does not enter the mean at all.
3 Medium Type asked atGoldman SachsMorgan StanleyJ.P. Morgan
dS=0.1 S dt+0.2 S dWdS=0.1\,S\,dt+0.2\,S\,dW with S0=50S_0=50. What is Var⁡(S2)\operatorname{Var}(S_2)?
Show answer
Answer: 2500e0.4(e0.08−1)≈310.62500e^{0.4}(e^{0.08}-1)\approx310.6
St2S_t^2 is again a geometric Brownian motion: Itô gives d(S2)=(2μ+σ2)S2dt+2σS2dWd(S^2)=(2\mu+\sigma^2)S^2dt+2\sigma S^2dW, so E[St2]=S02e(2μ+σ2)t\mathbb E[S_t^2]=S_0^2e^{(2\mu+\sigma^2)t}. Then Var⁡(St)=S02e2μt(eσ2t−1)=2500 e0.4(e0.08−1)≈310.6\operatorname{Var}(S_t)=S_0^2e^{2\mu t}\big(e^{\sigma^2t}-1\big)=2500\,e^{0.4}(e^{0.08}-1)\approx310.6.
4 Medium Type asked atGoldman SachsMorgan StanleyJ.P. Morgan
dS=0.08 S dt+0.4 S dWdS=0.08\,S\,dt+0.4\,S\,dW with S0=100S_0=100. What is the median of S1S_1?
Show answer
Answer: 100100
ln⁡S1\ln S_1 is normal with mean ln⁡100+(0.08−12⋅0.16)=ln⁡100\ln100+(0.08-\tfrac12\cdot0.16)=\ln100, and the exponential of a normal's median is the median of the exponential. So the median is 100e0=100100e^{0}=100, while the mean is 100e0.08≈108.3100e^{0.08}\approx108.3. The gap between the two is volatility drag: the typical path does worse than the average one.
5 Medium Type asked atGoldman SachsMorgan StanleyJ.P. Morgan
dS=0.05 S dt+0.2 S dWdS=0.05\,S\,dt+0.2\,S\,dW. What is P(S1>S0)P(S_1>S_0)?
Show answer
Answer: Φ(0.15)≈0.560\Phi(0.15)\approx0.560
S1>S0S_1>S_0 exactly when ln⁡(S1/S0)=(0.05−0.02)+0.2W1>0\ln(S_1/S_0)=(0.05-0.02)+0.2W_1>0, i.e. W1>−0.15W_1>-0.15. So the probability is Φ(0.15)≈0.560\Phi(0.15)\approx0.560. Only the log-drift μ−12σ2=0.03\mu-\tfrac12\sigma^2=0.03 matters, not μ\mu itself.
6 Hard Type asked atGoldman SachsMorgan StanleyJ.P. Morgan
dS=0.01 S dt+0.3 S dWdS=0.01\,S\,dt+0.3\,S\,dW with S0=1S_0=1. What happens to StS_t as t→∞t\to\infty?
  1. St→∞S_t\to\infty almost surely
  2. St→0S_t\to0 almost surely, although E[St]→∞\mathbb E[S_t]\to\infty
  3. StS_t converges to a non-degenerate limit
  4. St→S0S_t\to S_0 almost surely
Show answer
Answer: St→0S_t\to0 almost surely
ln⁡St=(μ−12σ2)t+σWt=−0.035 t+0.3Wt\ln S_t=(\mu-\tfrac12\sigma^2)t+\sigma W_t=-0.035\,t+0.3W_t. Since Wt/t→0W_t/t\to0, the negative drift wins and ln⁡St→−∞\ln S_t\to-\infty: every path goes to zero. Yet E[St]=e0.01t\mathbb E[S_t]=e^{0.01t} grows, carried by ever rarer, ever larger paths. This is why the growth rate of wealth, μ−12σ2\mu-\tfrac12\sigma^2, and not μ\mu, decides what happens to a typical investor.
7 Medium Type asked atGoldman SachsMorgan StanleyJ.P. Morgan
dX=X dWdX=X\,dW with X0=1X_0=1. What is E[X22]\mathbb E[X_2^2]?
Show answer
Answer: e2≈7.389e^2\approx7.389
The solution is Xt=eWt−t/2X_t=e^{W_t-t/2}, a martingale with mean 1. Its square is e2Wt−te^{2W_t-t}, and E[e2Wt]=e2t\mathbb E[e^{2W_t}]=e^{2t}, so E[Xt2]=et\mathbb E[X_t^2]=e^{t}; at t=2t=2 that is e2e^2. Equivalently, d(X2)=X2dt+2X2dWd(X^2)=X^2dt+2X^2dW gives m′=mm'=m. The mean stays at 1 while the second moment grows exponentially: the distribution spreads out and its mass drifts towards zero.
8 Hard Type asked atGoldman SachsMorgan StanleyJ.P. Morgan
A portfolio keeps a constant fraction ff of its wealth in a stock with dS/S=μ dt+σ dWdS/S=\mu\,dt+\sigma\,dW and the rest in cash earning rr. With μ−r=0.06\mu-r=0.06 and σ=0.2\sigma=0.2, which ff maximises the long-run growth rate of wealth?
Show answer
Answer: f∗=μ−rσ2=1.5f^*=\dfrac{\mu-r}{\sigma^2}=1.5
Wealth follows dV/V=(r+f(μ−r))dt+fσ dWdV/V=\big(r+f(\mu-r)\big)dt+f\sigma\,dW, a geometric Brownian motion, so its long-run growth rate is the log-drift g(f)=r+f(μ−r)−12f2σ2g(f)=r+f(\mu-r)-\tfrac12f^2\sigma^2. Setting g′(f)=0g'(f)=0 gives f∗=(μ−r)/σ2=0.06/0.04=1.5f^*=(\mu-r)/\sigma^2=0.06/0.04=1.5: 150% in the stock, borrowing to fund it. This is the continuous-time Kelly fraction. At f=2f∗f=2f^* the growth rate falls back to rr, which is why practitioners bet a fraction of Kelly.
9 Medium Type asked atGoldman SachsMorgan StanleyJ.P. Morgan
SS follows dS=μS dt+σS dWdS=\mu S\,dt+\sigma S\,dW with μ=0.05\mu=0.05, σ=0.2\sigma=0.2. S2S^2 is also a geometric Brownian motion. What is its drift rate (the coefficient of S2 dtS^2\,dt)?
Show answer
Answer: 2μ+σ2=0.142\mu+\sigma^2=0.14
Itô on f(S)=S2f(S)=S^2: d(S2)=2S dS+(dS)2=2μS2dt+2σS2dW+σ2S2dtd(S^2)=2S\,dS+(dS)^2=2\mu S^2dt+2\sigma S^2dW+\sigma^2S^2dt. The drift rate is 2μ+σ2=0.1+0.04=0.142\mu+\sigma^2=0.1+0.04=0.14 and the volatility is 2σ2\sigma. In general SnS^n has drift nμ+12n(n−1)σ2n\mu+\tfrac12n(n-1)\sigma^2.
10 Hard Type asked atGoldman SachsMorgan StanleyJ.P. Morgan
SS follows dS=μS dt+σS dWdS=\mu S\,dt+\sigma S\,dW with μ=0.05\mu=0.05, σ=0.2\sigma=0.2. Y=1/SY=1/S is also a geometric Brownian motion. What is its drift rate?
Show answer
Answer: −μ+σ2=−0.01-\mu+\sigma^2=-0.01
For f(S)=1/Sf(S)=1/S, f′=−1/S2f'=-1/S^2 and f′′=2/S3f''=2/S^3. Itô gives dY=−1S2dS+1S3(dS)2=Y[(−μ+σ2)dt−σ dW]dY=-\tfrac{1}{S^2}dS+\tfrac{1}{S^3}(dS)^2=Y\big[(-\mu+\sigma^2)dt-\sigma\,dW\big]. The drift rate is −0.05+0.04=−0.01-0.05+0.04=-0.01. The +σ2+\sigma^2 is why the reciprocal of an exchange rate does not simply have the opposite drift (Siegel's paradox).
11 Hard Type asked atGoldman SachsMorgan StanleyJ.P. Morgan
Two geometric Brownian motions with S01=S02=1S^1_0=S^2_0=1, zero drift, volatilities 0.20.2 and 0.30.3, and correlation ρ=0.5\rho=0.5 between their Brownian motions. What is E[S11S12]\mathbb E[S^1_1S^2_1]?
Show answer
Answer: eρσ1σ2=e0.03≈1.030e^{\rho\sigma_1\sigma_2}=e^{0.03}\approx1.030
By the product rule d(S1S2)=S1dS2+S2dS1+d⟨S1,S2⟩d(S^1S^2)=S^1dS^2+S^2dS^1+d\langle S^1,S^2\rangle, and d⟨S1,S2⟩=ρσ1σ2S1S2dtd\langle S^1,S^2\rangle=\rho\sigma_1\sigma_2S^1S^2dt. Taking expectations, m′=ρσ1σ2 mm'=\rho\sigma_1\sigma_2\,m, so m(1)=e0.5⋅0.2⋅0.3=e0.03m(1)=e^{0.5\cdot0.2\cdot0.3}=e^{0.03}. Each factor alone is a martingale, but the product is not unless ρ=0\rho=0.
12 Medium Type asked atGoldman SachsMorgan StanleyJ.P. Morgan
dX=−0.5 X dt+dWdX=-0.5\,X\,dt+dW with X0=4X_0=4. What is E[X2]\mathbb E[X_2]?
Show answer
Answer: 4e−1≈1.4724e^{-1}\approx1.472
The mean solves m′=−0.5 mm'=-0.5\,m, so m(t)=4e−0.5tm(t)=4e^{-0.5t} and m(2)=4e−1≈1.47m(2)=4e^{-1}\approx1.47. The noise is additive and has mean zero, so it does not affect the mean.

PDF · Edition 2 · £79

The Quant Careers Report

How 13 trading firms interview, what they state they pay interns and graduates, and the graduation dates each programme accepts. With five timed practice papers and worked solutions.

Buy the report — £79 See what is inside

13 Medium Type asked atGoldman SachsMorgan StanleyJ.P. Morgan
dX=−X dt+2 dWdX=-X\,dt+2\,dW with X0=0X_0=0. What is Var⁡(X1)\operatorname{Var}(X_1)?
Show answer
Answer: 2(1−e−2)≈1.7292(1-e^{-2})\approx1.729
The solution is Xt=∫0te−(t−s) 2 dWsX_t=\int_0^t e^{-(t-s)}\,2\,dW_s. By the Itô isometry Var⁡(Xt)=4∫0te−2(t−s)ds=2(1−e−2t)\operatorname{Var}(X_t)=4\int_0^te^{-2(t-s)}ds=2(1-e^{-2t}). At t=1t=1 that is 2(1−e−2)≈1.732(1-e^{-2})\approx1.73, already 86% of the stationary variance σ2/(2θ)=2\sigma^2/(2\theta)=2.
14 Medium Type asked atGoldman SachsMorgan StanleyJ.P. Morgan
For the Ornstein–Uhlenbeck process dX=−θX dt+σ dWdX=-\theta X\,dt+\sigma\,dW, which process has no drift?
  1. e−θtXt\displaystyle e^{-\theta t}X_t
  2. eθtXt\displaystyle e^{\theta t}X_t
  3. Xt2\displaystyle X_t^2
  4. Xt+θtX_t+\theta t
Show answer
Answer: eθtXte^{\theta t}X_t
d(eθtX)=θeθtX dt+eθtdX=σeθtdWd(e^{\theta t}X)=\theta e^{\theta t}X\,dt+e^{\theta t}dX=\sigma e^{\theta t}dW: the drift cancels exactly. Integrating gives the solution Xt=e−θtX0+σ∫0te−θ(t−s)dWsX_t=e^{-\theta t}X_0+\sigma\int_0^te^{-\theta(t-s)}dW_s. This integrating factor is how every linear SDE with additive noise is solved.
15 Medium Type asked atGoldman SachsMorgan StanleyJ.P. Morgan
XX is a stationary Ornstein–Uhlenbeck process, dX=−0.5 X dt+dWdX=-0.5\,X\,dt+dW. What is Cov⁡(Xt,Xt+2)\operatorname{Cov}(X_t,X_{t+2})?
Show answer
Answer: e−1≈0.368e^{-1}\approx0.368
The stationary variance is σ2/(2θ)=1\sigma^2/(2\theta)=1. From the solution, Xt+h=e−θhXt+(noise independent of Xt)X_{t+h}=e^{-\theta h}X_t+(\text{noise independent of }X_t), so the covariance is e−θhVar⁡(Xt)=e−0.5⋅2=e−1e^{-\theta h}\operatorname{Var}(X_t)=e^{-0.5\cdot2}=e^{-1}. Correlation decays exponentially with the lag, at rate θ\theta.
16 Medium Type asked atGoldman SachsMorgan StanleyJ.P. Morgan
dX=2(5−X) dt+dWdX=2(5-X)\,dt+dW with X0=1X_0=1. What is E[X0.5]\mathbb E[X_{0.5}]?
Show answer
Answer: 5−4e−1≈3.5285-4e^{-1}\approx3.528
The mean solves m′=2(5−m)m'=2(5-m), so the gap to 5 decays like e−2te^{-2t}: m(t)=5+(1−5)e−2tm(t)=5+(1-5)e^{-2t}. At t=0.5t=0.5, 5−4e−1≈3.535-4e^{-1}\approx3.53.
17 Medium Type asked atGoldman SachsMorgan StanleyJ.P. Morgan
A spread follows dX=κ(m−X) dt+σ dWdX=\kappa(m-X)\,dt+\sigma\,dW with κ=0.7\kappa=0.7 per day. What is the half-life of a deviation from mm, in days?
Show answer
Answer: ln⁡2/κ≈0.99\ln2/\kappa\approx0.99
The expected deviation E[Xt]−m\mathbb E[X_t]-m decays like e−κte^{-\kappa t}. It halves when e−κt=12e^{-\kappa t}=\tfrac12, at t=ln⁡2/κ=0.693/0.7≈0.99t=\ln2/\kappa=0.693/0.7\approx0.99 days. Pairs traders estimate κ\kappa by regressing daily changes on levels; the half-life tells them how long a position should take to work.
18 Medium Type asked atGoldman SachsMorgan StanleyJ.P. Morgan
dX=−3X dt+3 dWdX=-3X\,dt+3\,dW. What is E[X2]\mathbb E[X^2] under the stationary distribution?
Show answer
Answer: σ2/(2θ)=1.5\sigma^2/(2\theta)=1.5
Itô gives d(X2)=(−6X2+9) dt+6X dWd(X^2)=(-6X^2+9)\,dt+6X\,dW, so m=E[X2]m=\mathbb E[X^2] satisfies m′=−6m+9m'=-6m+9. In stationarity m′=0m'=0, so m=9/6=1.5m=9/6=1.5. The same calculation in general gives σ2/(2θ)\sigma^2/(2\theta): noise feeds variance in at rate σ2\sigma^2, and mean reversion drains it at rate 2θ2\theta.
19 Medium Type asked atGoldman SachsMorgan StanleyJ.P. Morgan
For dX=−θX dt+σ dWdX=-\theta X\,dt+\sigma\,dW, what is d(Xt2)d(X_t^2)?
  1. −2θX2dt+2σX dW\displaystyle -2\theta X^2dt+2\sigma X\,dW
  2. (σ2−2θX2) dt+2σX dW\displaystyle (\sigma^2-2\theta X^2)\,dt+2\sigma X\,dW
  3. (σ2−θX2) dt+σX dW\displaystyle (\sigma^2-\theta X^2)\,dt+\sigma X\,dW
  4. −2θX2dt+σ2dW\displaystyle -2\theta X^2dt+\sigma^2dW
Show answer
Answer: (σ2−2θX2) dt+2σX dW(\sigma^2-2\theta X^2)\,dt+2\sigma X\,dW
With f(x)=x2f(x)=x^2, f′=2xf'=2x, f′′=2f''=2: d(X2)=2X dX+(dX)2=2X(−θX dt+σ dW)+σ2dtd(X^2)=2X\,dX+(dX)^2=2X(-\theta X\,dt+\sigma\,dW)+\sigma^2dt. The σ2dt\sigma^2dt from (dX)2(dX)^2 is the term people drop; it is what keeps the variance from decaying to zero.
20 Hard Type asked atGoldman SachsMorgan StanleyJ.P. Morgan
In the Vasicek model dr=0.5(0.04−r) dt+0.01 dWdr=0.5(0.04-r)\,dt+0.01\,dW, what is the probability that the short rate is negative under the stationary distribution?
Show answer
Answer: Φ(−4)≈3.2×10−5\Phi(-4)\approx3.2\times10^{-5}
The stationary distribution is normal with mean b=0.04b=0.04 and variance σ2/(2a)=0.0001/1\sigma^2/(2a)=0.0001/1, so standard deviation 0.010.01. Zero is four standard deviations below the mean: P(r<0)=Φ(−4)≈3.2×10−5P(r<0)=\Phi(-4)\approx3.2\times10^{-5}. Small, but not zero, which is the standard objection to Gaussian short-rate models and one reason for CIR.
21 Medium Type asked atGoldman SachsMorgan StanleyJ.P. Morgan
In the CIR model dr=κ(θ−r) dt+σr dWdr=\kappa(\theta-r)\,dt+\sigma\sqrt r\,dW with κ=1\kappa=1, θ=0.05\theta=0.05, σ=0.1\sigma=0.1, r0=0.02r_0=0.02, what is E[r1]\mathbb E[r_1]?
Show answer
Answer: 0.05−0.03e−1≈0.03900.05-0.03e^{-1}\approx0.0390
Take expectations: the dWdW term has mean zero whatever multiplies it, so m′=κ(θ−m)m'=\kappa(\theta-m), exactly as for Vasicek. Then m(1)=0.05+(0.02−0.05)e−1≈0.0390m(1)=0.05+(0.02-0.05)e^{-1}\approx0.0390. The square root changes the distribution, not the mean.
22 Medium Type asked atGoldman SachsMorgan StanleyJ.P. Morgan
Which CIR parameters (κ,θ,σ)(\kappa,\theta,\sigma) guarantee that rr never reaches zero?
  1. (0.5,  0.03,  0.2)(0.5,\;0.03,\;0.2)
  2. (1.0,  0.04,  0.3)(1.0,\;0.04,\;0.3)
  3. (2.0,  0.05,  0.4)(2.0,\;0.05,\;0.4)
  4. (0.8,  0.05,  0.3)(0.8,\;0.05,\;0.3)
Show answer
Answer: (2.0,  0.05,  0.4)(2.0,\;0.05,\;0.4)
The Feller condition is 2κθ≥σ22\kappa\theta\ge\sigma^2: near zero the pull towards θ\theta, of size κθ\kappa\theta, must beat the noise. The four choices give 2κθ=0.03, 0.08, 0.20, 0.082\kappa\theta=0.03,\,0.08,\,0.20,\,0.08 against σ2=0.04, 0.09, 0.16, 0.09\sigma^2=0.04,\,0.09,\,0.16,\,0.09. Only (2.0,0.05,0.4)(2.0,0.05,0.4) satisfies it. When it fails, zero is reached but the process reflects off it rather than going negative, so CIR rates still never turn negative; they can just touch zero.
23 Hard Type asked atGoldman SachsMorgan StanleyJ.P. Morgan
For the CIR process dr=2(0.05−r) dt+0.2r dWdr=2(0.05-r)\,dt+0.2\sqrt r\,dW, what is the variance of the stationary distribution?
Show answer
Answer: θσ2/(2κ)=0.0005\theta\sigma^2/(2\kappa)=0.0005
Itô on r2r^2: d(r2)=(2κθr−2κr2+σ2r)dt+(… ) dWd(r^2)=\big(2\kappa\theta r-2\kappa r^2+\sigma^2r\big)dt+(\dots)\,dW. In stationarity E[r]=θ\mathbb E[r]=\theta, so 0=2κθ2+σ2θ−2κ E[r2]0=2\kappa\theta^2+\sigma^2\theta-2\kappa\,\mathbb E[r^2], giving Var⁡=E[r2]−θ2=θσ2/(2κ)=0.05⋅0.04/4=0.0005\operatorname{Var}=\mathbb E[r^2]-\theta^2=\theta\sigma^2/(2\kappa)=0.05\cdot0.04/4=0.0005.
24 Hard Type asked atGoldman SachsMorgan StanleyJ.P. Morgan
The stationary distribution of dr=κ(θ−r) dt+σr dWdr=\kappa(\theta-r)\,dt+\sigma\sqrt r\,dW is a gamma distribution. With κ=1\kappa=1, θ=0.04\theta=0.04, σ=0.2\sigma=0.2, what is its shape parameter?
Show answer
Answer: 2κθ/σ2=22\kappa\theta/\sigma^2=2
The stationary density solves the Fokker–Planck equation and comes out as p(r)∝r2κθ/σ2−1e−2κr/σ2p(r)\propto r^{2\kappa\theta/\sigma^2-1}e^{-2\kappa r/\sigma^2}: a gamma distribution with shape 2κθ/σ22\kappa\theta/\sigma^2 and rate 2κ/σ22\kappa/\sigma^2. Here the shape is 0.08/0.04=20.08/0.04=2. Its mean, shape over rate, is θ\theta, as it must be; and the shape exceeds 1 exactly when the Feller condition holds strictly, which is why the density then vanishes at zero.
25 Hard Type asked atGoldman SachsMorgan StanleyJ.P. Morgan
dX=−V′(X) dt+σ dWdX=-V'(X)\,dt+\sigma\,dW for a smooth potential VV that grows at infinity. What is the stationary density?
  1. ∝e−V(x)\displaystyle \propto e^{-V(x)}
  2. ∝e−2V(x)/σ2\displaystyle \propto e^{-2V(x)/\sigma^2}
  3. ∝e−V(x)/σ2\displaystyle \propto e^{-V(x)/\sigma^2}
  4. ∝V′(x)−1\displaystyle \propto V'(x)^{-1}
Show answer
Answer: ∝e−2V(x)/σ2\propto e^{-2V(x)/\sigma^2}
A stationary density makes the Fokker–Planck flux vanish: V′(x)p+σ22p′=0V'(x)p+\tfrac{\sigma^2}{2}p'=0, so p′/p=−2V′/σ2p'/p=-2V'/\sigma^2 and p∝e−2V/σ2p\propto e^{-2V/\sigma^2}. For V=12θx2V=\tfrac12\theta x^2 this is the normal with variance σ2/(2θ)\sigma^2/(2\theta), the Ornstein–Uhlenbeck answer. Lower noise concentrates the mass in the wells of VV, which is the idea behind simulated annealing and Langevin sampling.
26 Medium Type asked atGoldman SachsMorgan StanleyJ.P. Morgan
What does the generator of dX=−X dt+dWdX=-X\,dt+dW give when applied to f(x)=x2f(x)=x^2?
  1. −2x2\displaystyle -2x^2
  2. 1−2x2\displaystyle 1-2x^2
  3. 2x−2x2\displaystyle 2x-2x^2
  4. 1−x2\displaystyle 1-x^2
Show answer
Answer: 1−2x21-2x^2
The generator is Lf=μ(x)f′+12σ2(x)f′′=−x⋅2x+12⋅2=1−2x2Lf=\mu(x)f'+\tfrac12\sigma^2(x)f''=-x\cdot2x+\tfrac12\cdot2=1-2x^2. It is the drift of f(Xt)f(X_t) in Itô's lemma, so ddtE[Xt2]=1−2 E[Xt2]\tfrac{d}{dt}\mathbb E[X_t^2]=1-2\,\mathbb E[X_t^2], and the stationary second moment is 12\tfrac12.
27 Medium Type asked atGoldman SachsMorgan StanleyJ.P. Morgan
dX=X dt+2X dWdX=X\,dt+2X\,dW. What is d(ln⁡Xt)d(\ln X_t)?
  1. dt+2 dWdt+2\,dW
  2. −dt+2 dW-dt+2\,dW
  3. 3 dt+2 dW3\,dt+2\,dW
  4. −dt+2X dW-dt+2X\,dW
Show answer
Answer: −dt+2 dW-dt+2\,dW
dln⁡X=dXX−(dX)22X2=(dt+2 dW)−12⋅4 dt=−dt+2 dWd\ln X=\tfrac{dX}{X}-\tfrac{(dX)^2}{2X^2}=(dt+2\,dW)-\tfrac12\cdot4\,dt=-dt+2\,dW. With μ=1\mu=1 and σ=2\sigma=2 the log has negative drift μ−12σ2=−1\mu-\tfrac12\sigma^2=-1, so although E[Xt]=X0et\mathbb E[X_t]=X_0e^{t} grows, almost every path tends to zero.
28 Medium Type asked atGoldman SachsMorgan StanleyJ.P. Morgan
For which constant cc is Wt3+c tWtW_t^3+c\,tW_t a martingale?
Show answer
Answer: c=−3c=-3
By Itô, d(W3)=3W2dW+3W dtd(W^3)=3W^2dW+3W\,dt and d(tW)=W dt+t dWd(tW)=W\,dt+t\,dW. The drift of W3+ctWW^3+ctW is (3+c)W(3+c)W, which vanishes for every path only when c=−3c=-3. W3−3tWW^3-3tW is the third Hermite polynomial in (W,t)(W,t); the same construction gives W2−tW^2-t and W4−6tW2+3t2W^4-6tW^2+3t^2.
29 Medium Type asked atGoldman SachsMorgan StanleyJ.P. Morgan
Zt=exp⁡ ⁣(θWt−12θ2t)Z_t=\exp\!\left(\theta W_t-\tfrac12\theta^2t\right) for a constant θ\theta. Which SDE does it satisfy?
  1. dZ=θZ dWdZ=\theta Z\,dW
  2. dZ=12θ2Z dt+θZ dW\displaystyle dZ=\tfrac12\theta^2Z\,dt+\theta Z\,dW
  3. dZ=−12θ2Z dt+θZ dW\displaystyle dZ=-\tfrac12\theta^2Z\,dt+\theta Z\,dW
  4. dZ=θ dWdZ=\theta\,dW
Show answer
Answer: dZ=θZ dWdZ=\theta Z\,dW
With Z=f(t,W)Z=f(t,W), ft=−12θ2Zf_t=-\tfrac12\theta^2Z, fW=θZf_W=\theta Z, fWW=θ2Zf_{WW}=\theta^2Z. Itô: dZ=(−12θ2Z+12θ2Z)dt+θZ dW=θZ dWdZ=\big(-\tfrac12\theta^2Z+\tfrac12\theta^2Z\big)dt+\theta Z\,dW=\theta Z\,dW. No drift, so ZZ is a martingale with mean 1; it is the density process used in Girsanov's theorem.
30 Medium Type asked atGoldman SachsMorgan StanleyJ.P. Morgan
The Stratonovich SDE dX=σX∘dWdX=\sigma X\circ dW is the same process as which Itô SDE?
  1. dX=σX dWdX=\sigma X\,dW
  2. dX=12σ2X dt+σX dW\displaystyle dX=\tfrac12\sigma^2X\,dt+\sigma X\,dW
  3. dX=−12σ2X dt+σX dW\displaystyle dX=-\tfrac12\sigma^2X\,dt+\sigma X\,dW
  4. dX=σ2X dt+σX dW\displaystyle dX=\sigma^2X\,dt+\sigma X\,dW
Show answer
Answer: dX=12σ2X dt+σX dWdX=\tfrac12\sigma^2X\,dt+\sigma X\,dW
For dX=b(X)∘dWdX=b(X)\circ dW the Itô form adds the drift 12b(X)b′(X)\tfrac12b(X)b'(X). With b=σxb=\sigma x that is 12σ2X\tfrac12\sigma^2X. So the Stratonovich solution is X0eσWtX_0e^{\sigma W_t}, with no −12σ2t-\tfrac12\sigma^2t, exactly as ordinary calculus would suggest. That is the appeal of Stratonovich calculus, and also why physicists and financial modellers sometimes talk past each other.
31 Hard Type asked atGoldman SachsMorgan StanleyJ.P. Morgan
dX=0.5 dt+dWdX=0.5\,dt+dW with X0=0X_0=0. What is the probability that XX reaches +1+1 before −1-1?
Show answer
Answer: e−1e−e−1≈0.731\dfrac{e-1}{e-e^{-1}}\approx0.731
Find a function ss with s(Xt)s(X_t) a martingale: 12s′′+μs′=0\tfrac12s''+\mu s'=0 gives the scale function s(x)=e−2μx/σ2=e−xs(x)=e^{-2\mu x/\sigma^2}=e^{-x}. Optional stopping: s(0)=p s(1)+(1−p) s(−1)s(0)=p\,s(1)+(1-p)\,s(-1), so p=s(−1)−s(0)s(−1)−s(1)=e−1e−e−1≈0.731p=\dfrac{s(-1)-s(0)}{s(-1)-s(1)}=\dfrac{e-1}{e-e^{-1}}\approx0.731. Without drift the answer would be 12\tfrac12.
32 Hard Type asked atGoldman SachsMorgan StanleyJ.P. Morgan
dX=0.5 dt+dWdX=0.5\,dt+dW with X0=0X_0=0. What is the expected time until XX first leaves (−1,1)(-1,1)?
Show answer
Answer: ≈0.924\approx0.924
Xt−0.5tX_t-0.5t is a martingale, so at the exit time TT, E[XT]=0.5 E[T]\mathbb E[X_T]=0.5\,\mathbb E[T]. XTX_T is +1+1 with probability p≈0.731p\approx0.731 (previous question) and −1-1 otherwise, so E[XT]=2p−1≈0.462\mathbb E[X_T]=2p-1\approx0.462 and E[T]≈0.924\mathbb E[T]\approx0.924. A check: the function u(x)=Ex[T]u(x)=\mathbb E_x[T] solves 12u′′+12u′=−1\tfrac12u''+\tfrac12u'=-1 with u(±1)=0u(\pm1)=0, and u(0)u(0) gives the same number. Without drift the answer would be 1⋅1=11\cdot1=1; the drift shortens the wait.
33 Medium Type asked atGoldman SachsMorgan StanleyJ.P. Morgan
dX=0.5 dt+dWdX=0.5\,dt+dW with X0=0X_0=0. What is the probability that XX ever reaches −1-1?
Show answer
Answer: e−1≈0.368e^{-1}\approx0.368
Let the upper barrier go to infinity in the gambler's-ruin formula. With s(x)=e−2μx/σ2=e−xs(x)=e^{-2\mu x/\sigma^2}=e^{-x}, P(hit −a)=lim⁡b→∞s(0)−s(b)s(−a)−s(b)=1ea=e−1P(\text{hit }-a)=\lim_{b\to\infty}\dfrac{s(0)-s(b)}{s(-a)-s(b)}=\dfrac{1}{e^{a}}=e^{-1} for a=1a=1. In general a Brownian motion drifting up at μ\mu ever falls by aa with probability e−2μa/σ2e^{-2\mu a/\sigma^2}: the maximum fall is exponentially distributed.
34 Medium Type asked atGoldman SachsMorgan StanleyJ.P. Morgan
dX=0.5 dt+dWdX=0.5\,dt+dW with X0=0X_0=0. What is the expected time for XX to first reach +2+2?
Show answer
Answer: 2/0.5=42/0.5=4
Xt−0.5tX_t-0.5t is a martingale and the hitting time TT is finite with finite mean because of the upward drift. Optional stopping gives E[XT]−0.5 E[T]=0\mathbb E[X_T]-0.5\,\mathbb E[T]=0, and XT=2X_T=2, so E[T]=4\mathbb E[T]=4. With zero drift the level is still reached with probability 1 but the expected time is infinite.
35 Hard Type asked atGoldman SachsMorgan StanleyJ.P. Morgan
Tanaka's formula writes ∣Wt∣=∫0tsign⁡(Ws) dWs+Lt|W_t|=\int_0^t\operatorname{sign}(W_s)\,dW_s+L_t, where LL is the local time at zero. What is E[L1]\mathbb E[L_1]?
Show answer
Answer: 2/π≈0.798\sqrt{2/\pi}\approx0.798
The stochastic integral has mean zero, so E[L1]=E∣W1∣=2/π\mathbb E[L_1]=\mathbb E|W_1|=\sqrt{2/\pi}. ∣x∣|x| is not twice differentiable at 0, and LL is what Itô's lemma would have produced from the "second derivative" 2δ02\delta_0: a measure of how long the path spends near zero. By Lévy's theorem LtL_t has the same law as max⁡s≤tWs\max_{s\le t}W_s.
36 Hard Type asked atGoldman SachsMorgan StanleyJ.P. Morgan
Which SDE has a solution in law (a weak solution) but no strong solution?
  1. dX=X dWdX=X\,dW
  2. dX=sign⁡(X) dWdX=\operatorname{sign}(X)\,dW, X0=0X_0=0
  3. dX=−X dt+dWdX=-X\,dt+dW
  4. dX=dt+dWdX=dt+dW
Show answer
Answer: dX=sign⁡(X) dWdX=\operatorname{sign}(X)\,dW
Tanaka's example. Any Brownian motion XX solves it with the driving process W=∫sign⁡(X) dXW=\int\operatorname{sign}(X)\,dX, which is itself a Brownian motion by Lévy's characterisation, so a weak solution exists and its law is unique. But WW only remembers ∣X∣|X|, so XX cannot be built from WW path by path: there is no strong solution. The other three have Lipschitz coefficients and unique strong solutions.
37 Medium Type asked atGoldman SachsMorgan StanleyJ.P. Morgan
Why does the equation dX=3X2/3 dtdX=3X^{2/3}\,dt, X0=0X_0=0, have more than one solution, for example Xt=0X_t=0 and Xt=t3X_t=t^3?
  1. The drift grows too fast at infinity
  2. The drift is not Lipschitz at x=0x=0
  3. There is no noise term
  4. The initial condition is zero
Show answer
Answer: The drift is not Lipschitz at 0
The existence and uniqueness theorem needs coefficients that are Lipschitz (locally, with linear growth for global existence). 3x2/33x^{2/3} has an infinite slope at 0, so a solution can sit at 0 for any length of time and then leave along (t−c)3(t-c)^3. Adding noise σ dW\sigma\,dW does not by itself rescue uniqueness for degenerate cases; the Lipschitz condition (or Yamada–Watanabe's Hölder-12\tfrac12 condition on the diffusion, which is why CIR is fine) is what does.
38 Medium Type asked atGoldman SachsMorgan StanleyJ.P. Morgan
What is the strong order of convergence of the Euler–Maruyama scheme for a general SDE with smooth coefficients?
  1. 12\displaystyle \tfrac12
  2. 11
  3. 32\displaystyle \tfrac32
  4. 22
Show answer
Answer: 12\tfrac12
The pathwise error E∣XT−XTΔt∣\mathbb E|X_T-X^{\Delta t}_T| falls like Δt1/2\Delta t^{1/2}: the scheme ignores the (ΔW)2−Δt(\Delta W)^2-\Delta t term of size Δt\Delta t per step, and those errors add up like a random walk. The weak order (error in expectations of smooth functions) is 1. For additive noise the missing term vanishes and the strong order rises to 1.
39 Medium Type asked atGoldman SachsMorgan StanleyJ.P. Morgan
The Milstein scheme for dS=μS dt+σS dWdS=\mu S\,dt+\sigma S\,dW adds which correction to the Euler step?
  1. 12σ2S Δt\displaystyle \tfrac12\sigma^2S\,\Delta t
  2. 12σ2S((ΔW)2−Δt)\displaystyle \tfrac12\sigma^2S\big((\Delta W)^2-\Delta t\big)
  3. σ2S (ΔW)2\displaystyle \sigma^2S\,(\Delta W)^2
  4. 12σS((ΔW)2−Δt)\displaystyle \tfrac12\sigma S\big((\Delta W)^2-\Delta t\big)
Show answer
Answer: 12σ2S((ΔW)2−Δt)\tfrac12\sigma^2S\big((\Delta W)^2-\Delta t\big)
Milstein adds 12b b′((ΔW)2−Δt)\tfrac12b\,b'\big((\Delta W)^2-\Delta t\big), where bb is the diffusion coefficient. Here b=σSb=\sigma S and b′=σb'=\sigma, giving 12σ2S((ΔW)2−Δt)\tfrac12\sigma^2S\big((\Delta W)^2-\Delta t\big). The term has mean zero, so it does not bias the step, but it raises the strong order from 12\tfrac12 to 1.
40 Medium Type asked atGoldman SachsMorgan StanleyJ.P. Morgan
One Milstein step for dS=0.1 S dt+0.2 S dWdS=0.1\,S\,dt+0.2\,S\,dW from S=100S=100, with Δt=0.01\Delta t=0.01 and ΔW=0.05\Delta W=0.05. What is the new value?
Show answer
Answer: 101.085101.085
Euler gives 100+0.1⋅100⋅0.01+0.2⋅100⋅0.05=101.1100+0.1\cdot100\cdot0.01+0.2\cdot100\cdot0.05=101.1. The Milstein correction is 12⋅0.04⋅100⋅(0.0025−0.01)=−0.015\tfrac12\cdot0.04\cdot100\cdot(0.0025-0.01)=-0.015. So 101.085101.085. The exact solution from the same ΔW\Delta W is 100e(0.1−0.02)0.01+0.2⋅0.05≈101.0859100e^{(0.1-0.02)0.01+0.2\cdot0.05}\approx101.0859: Milstein is ten times closer than Euler.
41 Medium Type asked atGoldman SachsMorgan StanleyJ.P. Morgan
For dS=0.1 S dt+0.2 S dWdS=0.1\,S\,dt+0.2\,S\,dW, what is the exact value of St+0.01S_{t+0.01} given St=100S_t=100 and Wt+0.01−Wt=0.05W_{t+0.01}-W_t=0.05?
Show answer
Answer: 100e0.0108≈101.086100e^{0.0108}\approx101.086
Geometric Brownian motion can be stepped exactly: St+Δt=Ste(μ−12σ2)Δt+σΔW=100e0.0008+0.01=100e0.0108≈101.086S_{t+\Delta t}=S_te^{(\mu-\frac12\sigma^2)\Delta t+\sigma\Delta W}=100e^{0.0008+0.01}=100e^{0.0108}\approx101.086. When an exact transition exists, use it; discretisation error is then zero at any step size.
42 Hard Type asked atGoldman SachsMorgan StanleyJ.P. Morgan
dX=(0.5X+1) dt+0.3X dWdX=(0.5X+1)\,dt+0.3X\,dW with X0=1X_0=1. What is E[X2]\mathbb E[X_2]?
Show answer
Answer: e+2(e−1)≈6.155e+2(e-1)\approx6.155
The noise term has mean zero whatever multiplies it, so the mean obeys the deterministic equation m′=0.5m+1m'=0.5m+1. With m(0)=1m(0)=1: m(t)=e0.5t+2(e0.5t−1)m(t)=e^{0.5t}+2(e^{0.5t}-1), which at t=2t=2 is e+2(e−1)≈6.155e+2(e-1)\approx6.155. The volatility 0.30.3 affects the variance and the distribution, not the mean; spotting that saves solving the SDE.
43 Hard Type asked atGoldman SachsMorgan StanleyJ.P. Morgan
On [0,1)[0,1), dX=−X1−t dt+dWdX=-\dfrac{X}{1-t}\,dt+dW with X0=0X_0=0. What is Var⁡(X1/4)\operatorname{Var}(X_{1/4})?
Show answer
Answer: t(1−t)=316t(1-t)=\tfrac3{16}
Solve with the integrating factor 11−t\tfrac1{1-t}: d ⁣(X1−t)=dW1−td\!\left(\tfrac{X}{1-t}\right)=\tfrac{dW}{1-t}, so Xt=(1−t)∫0tdWs1−sX_t=(1-t)\int_0^t\tfrac{dW_s}{1-s}. By the Itô isometry Var⁡(Xt)=(1−t)2(11−t−1)=t(1−t)\operatorname{Var}(X_t)=(1-t)^2\left(\tfrac1{1-t}-1\right)=t(1-t), which is 316\tfrac3{16} at t=14t=\tfrac14. This SDE is the Brownian bridge: the drift pulls harder as t→1t\to1 and pins the path to 0 at time 1.
44 Medium Type asked atGoldman SachsMorgan StanleyJ.P. Morgan
What is Var⁡ ⁣(∫01es dWs)\operatorname{Var}\!\left(\displaystyle\int_0^1e^{s}\,dW_s\right)?
Show answer
Answer: 12(e2−1)≈3.195\tfrac12(e^2-1)\approx3.195
An Itô integral of a deterministic function is normal with mean 0, and by the Itô isometry its variance is ∫01e2sds=12(e2−1)\int_0^1e^{2s}ds=\tfrac12(e^2-1). Integrals of this form are exactly the noise terms in solutions of linear SDEs such as the Ornstein–Uhlenbeck process.
45 Medium Type asked atGoldman SachsMorgan StanleyJ.P. Morgan
dX=a dt+3 dWdX=a\,dt+3\,dW for some drift aa. What is the quadratic variation of XX over [0,2][0,2]?
Show answer
Answer: σ2T=18\sigma^2T=18
Only the dWdW part contributes: d⟨X⟩=(3 dW)2=9 dtd\langle X\rangle=(3\,dW)^2=9\,dt, so the quadratic variation over [0,2][0,2] is 18 whatever the drift. This is why volatility can be estimated from high-frequency data far more precisely than drift: drift is invisible at small scales, quadratic variation is not.
46 Medium Type asked atGoldman SachsMorgan StanleyJ.P. Morgan
SS follows dS=μS dt+0.3 S dWdS=\mu S\,dt+0.3\,S\,dW. What is the quadratic variation of ln⁡S\ln S over [0,4][0,4]?
Show answer
Answer: σ2T=0.36\sigma^2T=0.36
dln⁡S=(μ−12σ2)dt+σ dWd\ln S=(\mu-\tfrac12\sigma^2)dt+\sigma\,dW, so d⟨ln⁡S⟩=σ2dtd\langle\ln S\rangle=\sigma^2dt and the quadratic variation over [0,4][0,4] is 0.09⋅4=0.360.09\cdot4=0.36. The realised variance of log returns estimates exactly this, and variance swaps pay it.
47 Medium Type asked atGoldman SachsMorgan StanleyJ.P. Morgan
dX=2 dW1dX=2\,dW^1 and dY=3 dW2dY=3\,dW^2 with X0=Y0=0X_0=Y_0=0, where W1,W2W^1,W^2 are Brownian motions with correlation 0.50.5. What is E[X1Y1]\mathbb E[X_1Y_1]?
Show answer
Answer: 2⋅3⋅0.5=32\cdot3\cdot0.5=3
By the product rule d(XY)=X dY+Y dX+d⟨X,Y⟩d(XY)=X\,dY+Y\,dX+d\langle X,Y\rangle, and d⟨X,Y⟩=2⋅3⋅ρ dt=3 dtd\langle X,Y\rangle=2\cdot3\cdot\rho\,dt=3\,dt. The first two terms have mean zero, so E[X1Y1]=3\mathbb E[X_1Y_1]=3. The covariation, not the separate variances, carries the correlation.
48 Hard Type asked atGoldman SachsMorgan StanleyJ.P. Morgan
dS=μS dt+σS dWdS=\mu S\,dt+\sigma S\,dW under P\mathbb P. Under Q\mathbb Q with dQdP∣FT=e−λWT−12λ2T\dfrac{d\mathbb Q}{d\mathbb P}\Big|_{\mathcal F_T}=e^{-\lambda W_T-\frac12\lambda^2T}, what is the SDE for SS?
  1. dS=μS dt+σS dW~dS=\mu S\,dt+\sigma S\,d\widetilde W
  2. dS=(μ−σλ)S dt+σS dW~dS=(\mu-\sigma\lambda)S\,dt+\sigma S\,d\widetilde W
  3. dS=(μ+σλ)S dt+σS dW~dS=(\mu+\sigma\lambda)S\,dt+\sigma S\,d\widetilde W
  4. dS=μS dt+(σ−λ)S dW~dS=\mu S\,dt+(\sigma-\lambda)S\,d\widetilde W
Show answer
Answer: dS=(μ−σλ)S dt+σS dW~dS=(\mu-\sigma\lambda)S\,dt+\sigma S\,d\widetilde W
By Girsanov, W~t=Wt+λt\widetilde W_t=W_t+\lambda t is a Q\mathbb Q-Brownian motion. Substituting dW=dW~−λ dtdW=d\widetilde W-\lambda\,dt gives dS=(μ−σλ)S dt+σS dW~dS=(\mu-\sigma\lambda)S\,dt+\sigma S\,d\widetilde W. The volatility is unchanged; only the drift moves. Choosing λ=(μ−r)/σ\lambda=(\mu-r)/\sigma, the market price of risk, makes the drift rr: the risk-neutral measure.
49 Hard Type asked atGoldman SachsMorgan StanleyJ.P. Morgan
dX=dWdX=dW and u(t,x)=E ⁣[e−r(T−t)XT2∣Xt=x]u(t,x)=\mathbb E\!\left[e^{-r(T-t)}X_T^2\mid X_t=x\right]. With x=1x=1, T−t=2T-t=2 and r=0.05r=0.05, what is uu?
Show answer
Answer: e−0.1(1+2)≈2.715e^{-0.1}(1+2)\approx2.715
Given Xt=xX_t=x, XTX_T is normal with mean xx and variance T−tT-t, so E[XT2]=x2+(T−t)\mathbb E[X_T^2]=x^2+(T-t) and u=e−r(T−t)(x2+(T−t))=3e−0.1≈2.715u=e^{-r(T-t)}\big(x^2+(T-t)\big)=3e^{-0.1}\approx2.715. By Feynman–Kac the same uu solves ut+12uxx−ru=0u_t+\tfrac12u_{xx}-ru=0 with u(T,x)=x2u(T,x)=x^2, which you can check by differentiating.
50 Hard Type asked atGoldman SachsMorgan StanleyJ.P. Morgan
u(t,x)=E[g(XT)∣Xt=x]u(t,x)=\mathbb E[g(X_T)\mid X_t=x] for dX=−θX dt+σ dWdX=-\theta X\,dt+\sigma\,dW. Which equation does uu satisfy?
  1. ut−θx ux+12σ2uxx=0\displaystyle u_t-\theta x\,u_x+\tfrac12\sigma^2u_{xx}=0
  2. ut+θx ux+12σ2uxx=0\displaystyle u_t+\theta x\,u_x+\tfrac12\sigma^2u_{xx}=0
  3. ut−θx ux−12σ2uxx=0\displaystyle u_t-\theta x\,u_x-\tfrac12\sigma^2u_{xx}=0
  4. ut=∂x(θx u)+12σ2uxx\displaystyle u_t=\partial_x(\theta x\,u)+\tfrac12\sigma^2u_{xx}
Show answer
Answer: ut−θxux+12σ2uxx=0u_t-\theta xu_x+\tfrac12\sigma^2u_{xx}=0
u(t,Xt)u(t,X_t) is a martingale (tower property), so its Itô drift must vanish: ut+Lu=0u_t+Lu=0 with the generator Lu=−θx ux+12σ2uxxLu=-\theta x\,u_x+\tfrac12\sigma^2u_{xx}, and terminal condition u(T,⋅)=gu(T,\cdot)=g. This is the backward (Kolmogorov) equation. The last option is the forward, Fokker–Planck equation, which governs the density of XtX_t instead.

The methods behind these questions, with worked examples: how to solve a stochastic differential equation.


Keep practising

Want someone to work through these with you? Quant interview preparation, one to one, or book a free 20-minute call.