Quantitative Finance Interviews
129

5.4 Brownian Motion and Stochastic Calculus

In this section, we briefly go over some problems for stochastic calculus, the counterpart of stochastic processes in continuous space. Since the basic definitions and theorems of Brownian motion and stochastic calculus are directly used as interview problems, we’ll simply integrate them into the problems instead of starting with an overview of definitions and theorems.

Brownian motion

A. Define and enumerate some properties of a Brownian motion?1

Solution: This is the most basic Brownian motion question. Interestingly, part of the definition, such as W(0)=0W(0)=0, and some properties are so obvious that we often fail to recite all the details.

A continuous stochastic process W(t), t≥0W(t),\ t\geq0, is a Brownian motion if

  • W(0)=0W(0)=0;
  • The increments of the process W(t1)−W(0),W(t2)−W(t1),…,W(tn)−W(tn−1)W(t_1)-W(0),W(t_2)-W(t_1),\ldots,W(t_n)-W(t_{n-1}), ∀0≤t1≤t2≤⋯≤tn\forall 0\leq t_1\leq t_2\leq\cdots\leq t_n are independent;
  • Each of these increments is normally distributed with distribution W(ti+1)−W(ti)∼N(0,ti+1−ti)W(t_{i+1})-W(t_i)\sim N(0,t_{i+1}-t_i).

Some of the important properties of Brownian motion are the following: continuous (no jumps); E[W(t)]=0E[W(t)]=0; E[W(t)2]=tE[W(t)^2]=t; W(t)∼N(0,t)W(t)\sim N(0,t); martingale property E[W(t+s)∣W(t)]=W(t)E[W(t+s)\mid W(t)]=W(t); cov⁡(W(s),W(t))=s, ∀0<s<t\operatorname{cov}(W(s),W(t))=s,\ \forall 0<s<t; and Markov property (in continuous space).

There are two other important martingales related to Brownian motion that are valuable tools in many applications.

  • Y(t)=W(t)2−tY(t)=W(t)^2-t is a martingale.
  • Z(t)=exp⁡{λW(t)−12λ2t}Z(t)=\exp\{\lambda W(t)-\frac12\lambda^2t\}, where λ\lambda is any constant and W(t)W(t) is a Brownian motion, is a martingale. (Exponential martingale).
130

We’ll show a proof of the first martingale using Ito’s lemma in the next section. A sketch for the exponential martingale is the following:2

E[Z(t+s)]=E[exp⁡{λ(W(t)+W(s))−12λ2(t+s)}]=exp⁡{λW(t)−12λ2t}exp⁡{−12λ2s}E[exp⁡{λW(s)}]=Ztexp⁡{−12λ2s}exp⁡{12λ2s}=Zt \begin{aligned} E[Z(t+s)]&=E\left[\exp\left\{\lambda(W(t)+W(s))-\frac12\lambda^2(t+s)\right\}\right]\\ &=\exp\left\{\lambda W(t)-\frac12\lambda^2t\right\}\exp\left\{-\frac12\lambda^2s\right\}E\left[\exp\{\lambda W(s)\}\right]\\ &=Z_t\exp\left\{-\frac12\lambda^2s\right\}\exp\left\{\frac12\lambda^2s\right\}=Z_t \end{aligned}

B. What is the correlation of a Brownian motion and its square?

Solution: The solution to this problem is surprisingly simple. At time tt, Bt∼N(0,t)B_t\sim N(0,t), by symmetry, E[Bt]=0E[B_t]=0 and E[Bt3]=0E[B_t^3]=0. Applying the equation for covariance Cov⁡(X,Y)=E[XY]−E[X]E[Y]\operatorname{Cov}(X,Y)=E[XY]-E[X]E[Y], we have Cov⁡(Bt,Bt2)=E[Bt3]−E[Bt]E[Bt2]=0−0=0\operatorname{Cov}(B_t,B_t^2)=E[B_t^3]-E[B_t]E[B_t^2]=0-0=0. So the correlation of a Brownian motion and its square is 0, too.

C. Let BtB_t be a Brownian motion. What is the probability that B1>0B_1>0 and B2<0B_2<0?

Solution: A standard solution takes advantage of the fact that B1∼N(0,1)B_1\sim N(0,1), and B2−B1B_2-B_1 is independent of B1B_1, which is again a normal distribution: B2−B1∼N(0,1)B_2-B_1\sim N(0,1). If B1=x>0B_1=x>0, then for B2<0B_2<0, we must have B2−B1<−xB_2-B_1<-x.

P(B1>0,B2<0)=P(B1>0,B2−B1<−B1)=∫0∞12πe−x2/2 dx∫−∞−x12πe−y2/2 dy=∫0∞∫−∞−x12πe−(x2+y2)/2 dxdy=∫0∞∫3/2π7/4π12πe−r2/2r drdθ=7/4π−3/2π2π[−e−r2/2]0∞=18 \begin{aligned} P(B_1>0,B_2<0)&=P(B_1>0,B_2-B_1<-B_1)\\ &=\int_0^\infty\frac1{\sqrt{2\pi}}e^{-x^2/2}\,dx\int_{-\infty}^{-x}\frac1{\sqrt{2\pi}}e^{-y^2/2}\,dy =\int_0^\infty\int_{-\infty}^{-x}\frac1{2\pi}e^{-(x^2+y^2)/2}\,dxdy\\ &=\int_0^\infty\int_{3/2\pi}^{7/4\pi}\frac1{2\pi}e^{-r^2/2}r\,drd\theta =\frac{7/4\pi-3/2\pi}{2\pi}\left[-e^{-r^2/2}\right]_0^\infty=\frac18 \end{aligned}

But do we really need the integration step? If we fully take advantage of the facts that B1B_1 and B2−B1B_2-B_1 are two IID N(0,1)N(0,1), the answer is no. Using conditional probability and independence, we can reformulate the equation as

P(B1>0,B2<0)=P(B1>0)P(B2−B1<0)P(∣B2−B1∣>B1)=1/2×1/2×1/2=1/8. \begin{aligned} P(B_1>0,B_2<0)&=P(B_1>0)P(B_2-B_1<0)P(|B_2-B_1|>B_1)\\ &=1/2\times1/2\times1/2=1/8. \end{aligned} 131

This approach is better demonstrated in Figure 5.10. When we have B1>0B_1>0 and B2−B1<−B1B_2-B_1<-B_1, which accounts for 1/8 of the density volume. (All 8 regions separated by x=0x=0, y=0y=0, y=xy=x, and y=−xy=-x have the same density volume by symmetry.)

Joint normal probability density surface for B1 and B2 minus B1. Both horizontal axes run from −3 to 3; the Density axis is labeled 0, 0.05, 0.1, and 0.15. Lines divide the surface into eight symmetric regions.
Figure 5.10 Probability density graph of (B1,B2−B1)(B_1,B_2-B_1)

Stopping time/ first passage time

A. What is the mean of the stopping time for a Brownian motion to reach either -1 or 1?

Solution: As we have discussed, Bt2−tB_t^2-t is martingale. It can be proved by applying Ito’s lemma:

d(Bt2−t)=∂(Bt2−t)∂BtdBt+∂(Bt2−t)∂tdt+12∂2(Bt2−t)∂Bt2dt=2Bt dBt−dt+dt=2Bt dBt. d(B_t^2-t)=\frac{\partial(B_t^2-t)}{\partial B_t}dB_t+\frac{\partial(B_t^2-t)}{\partial t}dt+\frac12\frac{\partial^2(B_t^2-t)}{\partial B_t^2}dt=2B_t\,dB_t-dt+dt=2B_t\,dB_t.

So d(Bt2−t)d(B_t^2-t) has no drift term and is a martingale. Let T=min⁡{t; Bt=1 or −1}T=\min\{t;\ B_t=1\text{ or }-1\}. At continuous time and space, the following property still applies: A martingale stopped at 132 a stopping time is a martingale! So BT2−TB_T^2-T is a martingale and E[BT2−T]=B02−0=0E[B_T^2-T]=B_0^2-0=0. The probability that BtB_t hits 1 or -1 is 1, so BT2=1⇒E[T]=E[BT2]=1B_T^2=1\Rightarrow E[T]=E[B_T^2]=1.

B. Let W(t)W(t) be a standard Wiener process and τx\tau_x (x>0x>0) be the first passage time to level xx (τx=min⁡{t; W(t)=x}\tau_x=\min\{t;\ W(t)=x\}). What is the probability density function of τx\tau_x and the expected value of τx\tau_x?

Solution: This is a textbook problem that is elegantly solved using the reflection principle, so we will simply summarize the explanation. For any Wiener process paths that reach xx before tt (τx≤t\tau_x\leq t), they have equal probability ending above xx or below xx at time tt, P(τx≤t,W(t)≥x)=P(τx≤t,W(t)≤x)P(\tau_x\leq t,W(t)\geq x)=P(\tau_x\leq t,W(t)\leq x). The explanation lies in the reflection principle. As shown in Figure 5.11, for each path that reaches xx before tt and is at a level yy above xx at time tt, we can switch the sign of any move starting from τx\tau_x and the reflected path will end at 2x−y2x-y that is below xx at time tt. For a standard Wiener process (Brownian motion), both paths have equal probability.

P(τx≤t)=P(τx≤t,W(t)≥x)+P(τx≤t,W(t)≤x)=2P(τx≤t,W(t)≥x)=2P(W(t)≥x)=2∫x∞12πte−w2/2t dw. \begin{aligned} P(\tau_x\leq t)&=P(\tau_x\leq t,W(t)\geq x)+P(\tau_x\leq t,W(t)\leq x)=2P(\tau_x\leq t,W(t)\geq x)\\ &=2P(W(t)\geq x)=2\int_x^\infty\frac1{\sqrt{2\pi t}}e^{-w^2/2t}\,dw. \end{aligned}

Let v=wtv=\frac{w}{\sqrt t}, we have e−w2/2t=e−v2/2e^{-w^2/2t}=e^{-v^2/2} and dv=dwtdv=\frac{dw}{\sqrt t}.

∴ P(τx≤t)=2∫m∞12πte−w2/2t dw=2∫x/t∞12πe−v2/2 dv=2−2N(x/t). \therefore\ P(\tau_x\leq t)=2\int_m^\infty\frac1{\sqrt{2\pi t}}e^{-w^2/2t}\,dw=2\int_{x/\sqrt t}^\infty\frac1{\sqrt{2\pi}}e^{-v^2/2}\,dv=2-2N(x/\sqrt t).

3

Take the derivative with respect to tt, we have

fτx(t)=dP{τx≤t}dt=dP{τx≤t}d(x/t)d(x/t)dt=2N′(x/t)×x2t−3/2⇒xe−x2/2tt2πt,∀x>0. f_{\tau_x}(t)=\frac{dP\{\tau_x\leq t\}}{dt}=\frac{dP\{\tau_x\leq t\}}{d(x/\sqrt t)}\frac{d(x/\sqrt t)}{dt}=2N'(x/\sqrt t)\times\frac{x}{2}t^{-3/2}\Rightarrow\frac{xe^{-x^2/2t}}{t\sqrt{2\pi t}},\quad\forall x>0.

From part A, it’s easy to show that the expected stopping time to reach either α\alpha (α>0\alpha>0) or −β-\beta (β>0\beta>0) is again E[N]=αβE[N]=\alpha\beta. The expected first passage time to level xx is

133

essentially the expected stopping time to reach either xx or −∞-\infty and E[τx]=x×∞=∞E[\tau_x]=x\times\infty=\infty. Although we have P(τx≤∞)=2−2N(x/∞)=1P(\tau_x\leq\infty)=2-2N(x/\sqrt\infty)=1, the expected value of τx\tau_x is ∞\infty!

A Wiener path W(t) starts at zero and first reaches level x at time tau x. After tau x the solid and dashed paths reflect about x, ending at 2x minus y and y at time t. The diagram labels zero, x, y, 2x minus y, tau x, and t.
Figure 5.11 Sample path of a standard Weiner process and its reflected path

C. Suppose that XX is a Brownian motion with no drift, i.e. dX(t)=dW(t)dX(t)=dW(t). If XX starts at 0, what is the probability that XX hits 3 before hitting -5? What if XX has drift mm, i.e. dX(t)=m dt+dW(t)dX(t)=m\,dt+dW(t)?

Solution: A Brownian motion is a martingale. Let p3p_3 be the probability that the Brownian motion hits 3 before -5. Since a martingale stopped at a stopping time is a martingale, we have 3P3+(−5)(1−P3)=0⇒P3=5/83P_3+(-5)(1-P_3)=0\Rightarrow P_3=5/8. Similar to random walk, if we have stopping boundaries (α>0\alpha>0) and −β-\beta (β>0\beta>0), the probability that it stops at α\alpha instead of −β-\beta is pα=β/(α+β)p_\alpha=\beta/(\alpha+\beta). The expected stopping time to reach either α\alpha or −β-\beta is again E[N]=αβE[N]=\alpha\beta.

When XX has drift mm, the process is no longer a martingale. Let P(t,x)P(t,x) be the probability that the process hits 3 before hitting -5 when X=xX=x at time tt. Although XX is no longer a 134 martingale process, it is still a Markov process. So P(t,x)=P(x)P(t,x)=P(x) is actually independent of tt. Applying the Feynman-Kac equation4, we have

mPx(x)+1/2Pxx(x)=0for −5<x<3. mP_x(x)+1/2P_{xx}(x)=0\quad\text{for }-5<x<3.

We also have boundary conditions that P(3)=1P(3)=1 and P(−5)=0P(-5)=0.

mPx(x)+1/2Pxx(x)=0mP_x(x)+1/2P_{xx}(x)=0 is a homogeneous linear differential equation with two real roots: r1=0r_1=0 and r2=−2mr_2=-2m. So the general solution is P(x)=c1e0x+c2e−2mx=c1+c2e−2mxP(x)=c_1e^{0x}+c_2e^{-2mx}=c_1+c_2e^{-2mx}. Applying the boundary conditions, we have

{c1+c2e−6m=1c1+c2e10m=0⇒{c1=−e10m/(e−6m−e10m)c2=1/(e−6m−e10m)⇒P(0)=c1+c2=e10m−1e10m−e−6m. \begin{cases}c_1+c_2e^{-6m}=1\\c_1+c_2e^{10m}=0\end{cases} \Rightarrow \begin{cases}c_1=-e^{10m}/(e^{-6m}-e^{10m})\\c_2=1/(e^{-6m}-e^{10m})\end{cases} \Rightarrow P(0)=c_1+c_2=\frac{e^{10m}-1}{e^{10m}-e^{-6m}}.

A different and simpler approach takes advantage of the exponential martingale: Z(t)=exp⁡{λW(t)−12λ2t}Z(t)=\exp\{\lambda W(t)-\frac12\lambda^2t\}. Since W(t)=X(t)−mtW(t)=X(t)-mt, X(t)−mtX(t)-mt is a Brownian motion as well. Applying the exponential martingale, we have E[exp⁡(λ(X−mt)−12λ2t)]=1E[\exp(\lambda(X-mt)-\frac12\lambda^2t)]=1 for any constant λ\lambda. To remove the terms including time tt, we can set λ=−2m\lambda=-2m and the equation becomes E[exp⁡(−2mX)]=1E[\exp(-2mX)]=1. Since a martingale stopped at a stopping time is a martingale, we have P3exp⁡(−2m×3)+(1−P3)exp⁡(−2m×−5)=1⇒e10m−1e10m−e−6mP_3\exp(-2m\times3)+(1-P_3)\exp(-2m\times-5)=1\Rightarrow\frac{e^{10m}-1}{e^{10m}-e^{-6m}}.

D. Suppose that XX is a generalized Weiner process dX=dt+dW(t)dX=dt+dW(t), where W(t)W(t) is a Brownian motion. What is the probability that XX ever reaches -1?

Solution: To solve this problem, we again can use the equation E[exp⁡(−2mX)]=1E[\exp(-2mX)]=1 from the previous problem with m=1m=1. It may not be obvious since we only have one apparent boundary, -1. To apply the stopping time, we also need a corresponding positive boundary. To address this problem, we can simply use +∞+\infty as the positive boundary and the equation becomes

135 P−1exp⁡(−2×−1)+(1−P−1)exp⁡(−2×+∞)=P−1e2=1⇒P−1=e−2. P_{-1}\exp(-2\times-1)+(1-P_{-1})\exp(-2\times+\infty)=P_{-1}e^2=1\Rightarrow P_{-1}=e^{-2}.

Ito’s lemma

Ito’s lemma is the stochastic counterpart of the chain rule in ordinary calculus. Let X(t)X(t) be an Ito process satisfying dX(t)=β(t,X)dt+γ(t,X)dW(t)dX(t)=\beta(t,X)dt+\gamma(t,X)dW(t), and f(X(t),t)f(X(t),t) be a twice-differentiable function of X(t)X(t) and tt. Then f(X(t),t)f(X(t),t) is an Ito process satisfying

df=(∂f∂t+β(t,X)∂f∂x+12γ2(t,X)∂2f∂x2)dt+γ(t,X)∂f∂xdW(t). df=\left(\frac{\partial f}{\partial t}+\beta(t,X)\frac{\partial f}{\partial x}+\frac12\gamma^2(t,X)\frac{\partial^2f}{\partial x^2}\right)dt+\gamma(t,X)\frac{\partial f}{\partial x}dW(t). Drift rate=∂f∂t+β(t,X)∂f∂x+12γ2(t,X)∂2f∂x2 \text{Drift rate}=\frac{\partial f}{\partial t}+\beta(t,X)\frac{\partial f}{\partial x}+\frac12\gamma^2(t,X)\frac{\partial^2f}{\partial x^2}

A. Let BtB_t be a Brownian motion and Zt=tBtZ_t=\sqrt t B_t. What is the mean and variance of ZtZ_t? Is ZtZ_t a martingale process?

Solution: As a Brownian motion, Bt∼N(0,t)B_t\sim N(0,t), which is symmetric about 0. Since t\sqrt t is a constant at tt, Zt=tBtZ_t=\sqrt t B_t is symmetric about 0 and has mean 0 and variance t×var⁡(Bt)=t2t\times\operatorname{var}(B_t)=t^2. More exactly, Zt∼N(0,t2)Z_t\sim N(0,t^2).

Although ZtZ_t has unconditional expected value 0, it is not a martingale. Applying Ito’s lemma to Zt=tBtZ_t=\sqrt t B_t, we have dZt=∂Zt∂BtdBt+∂Zt∂tdt+12×∂2Zt∂Bt2dt=12t−1/2Bt dt+t dBtdZ_t=\frac{\partial Z_t}{\partial B_t}dB_t+\frac{\partial Z_t}{\partial t}dt+\frac12\times\frac{\partial^2Z_t}{\partial B_t^2}dt=\frac12t^{-1/2}B_t\,dt+\sqrt t\,dB_t. For all the cases that Bt≠0B_t\neq0, which has probability 1, the drift term 12t−1/2Bt dt\frac12t^{-1/2}B_t\,dt is not zero.5 Hence, the process Zt=tBtZ_t=\sqrt t B_t is not a martingale process.

B. Let W(t)W(t) be a Brownian motion. Is W(t)3W(t)^3 a martingale process?

136

Solution: Applying Ito’s lemma to f(W(t),t)=W(t)3f(W(t),t)=W(t)^3, we have ∂f∂W(t)=3W(t)2\frac{\partial f}{\partial W(t)}=3W(t)^2, ∂f∂t=0\frac{\partial f}{\partial t}=0, ∂2f∂W(t)2=6W(t)\frac{\partial^2 f}{\partial W(t)^2}=6W(t), and df(W(t),t)=3W(t)dt+3W(t)2dW(t)df(W(t),t)=3W(t)dt+3W(t)^2dW(t). So again for the cases W(t)≠0W(t)\neq0, which has probability 1, the drift term is not zero. Hence, W(t)3W(t)^3 is not a martingale process.