Quantitative Finance · Book 4 · Methods

Quantitative Methods

Quantitative Methods · Methods

2Brownian Motion

A trader buys a stock with an annual volatility of 30% and places a stop-loss 2% below the entry price, then asks the risk desk how likely the stop is to be touched within a month. The chance that the stock merely ends the month below the stop is 41%; the chance that it touches the stop at some moment of the month is exactly twice that, 82%. If the stop is checked only at each day’s close, the answer is 72%, and a simulation that watches the closes and forgets what happens between them reports 72% for a contract that is really triggered 82% of the time. The three numbers come from one object, the Brownian motion, and from three of its properties: its law at a fixed time, the reflection principle for its running minimum, and the Brownian bridge that describes it between two observations. This chapter builds the object, proves the properties the series uses, and ends with the quadratic variation, the property that makes stochastic calculus different from the ordinary kind.

2.1 From random walks to Brownian motion

Definition 2.1 (Brownian motion, Gaussian process)

A Gaussian process is a process (Xt)(X_t) whose finite-dimensional laws (Xt1,…,Xtk)(X_{t_1}, \dots, X_{t_k}) are all multivariate normal; its law is fixed by its mean m(t)m(t) and covariance c(s,t)c(s,t). A (standard) Brownian motion (Wt)t≥0(W_t)_{t \ge 0} is an adapted process with W0=0W_0 = 0, continuous paths, and increments Wt−WsW_t - W_s independent of Fs\mathcal F_s and distributed N(0,t−s)\mathcal N(0, t - s) for s<ts < t.

Equivalently, WW is the centred Gaussian process with continuous paths and covariance c(s,t)=min⁡(s,t)c(s,t) = \min(s,t): for s<ts < t, Cov⁡(Ws,Wt)=Cov⁡(Ws,Ws+(Wt−Ws))=s\Cov(W_s, W_t) = \Cov(W_s, W_s + (W_t - W_s)) = s. Existence is not obvious, since the definition asks for continuity of uncountably many random variables at once. Wiener gave the first construction in 1923; the one that serves simulation builds the path coarse to fine (Section 2.5). The reason Brownian motion appears everywhere is a central limit theorem for paths.

Theorem 2.2 (Donsker’s invariance principle)

Let ξ1,ξ2,…\xi_1, \xi_2, \dots be independent and identically distributed with mean zero and variance one, Sk=∑i≤kξiS_k = \sum_{i \le k}\xi_i, and Xt(n)=n−1/2(S⌊nt⌋+(nt−⌊nt⌋)ξ⌊nt⌋+1)X^{(n)}_t = n^{-1/2}(S_{\lfloor nt\rfloor} + (nt - \lfloor nt\rfloor)\xi_{\lfloor nt\rfloor + 1}) the linearly interpolated, rescaled walk. Then X(n)→dWX^{(n)} \xrightarrow{d} W as random elements of C[0,1]C[0, 1]: E[F(X(n))]→E[F(W)]\E[F(X^{(n)})] \to \E[F(W)] for every bounded continuous functional FF of the path.

Proof. Admitted here. ∎

Donsker’s theorem is what licenses the use of Brownian motion for prices built from many small, independent trades, whatever their individual law: the maximum of the path, the time spent below a level, the average price, all continuous functionals, converge together. It does not license it for prices driven by a few large jumps (chapter 6).

Proposition 2.3 (Invariances)

If WW is a Brownian motion, so are −Wt-W_t; c−1/2Wctc^{-1/2}W_{ct} for every c>0c > 0 (scaling); Ws+t−WsW_{s+t} - W_s for fixed ss; and tW1/ttW_{1/t} (with value 0 at t=0t = 0).

Proof. Each is a centred Gaussian process with covariance min⁡(s,t)\min(s,t); for scaling, c−1min⁡(cs,ct)=min⁡(s,t)c^{-1}\min(cs, ct) = \min(s,t); for inversion, stmin⁡(1/s,1/t)=min⁡(s,t)st\min(1/s,1/t) = \min(s,t). Continuity at 0 of tW1/ttW_{1/t} follows from the strong law Wu/u→0W_u/u \to 0. ∎

Scaling is the square-root-of-time rule a trader uses without thinking: a stock with 30% annual volatility has a one-day standard deviation of 0.30/252=1.9%0.30/\sqrt{252} = 1.9\% and a one-month one of 0.3021/252=8.7%0.30\sqrt{21/252} = 8.7\%. Figure 2.1 shows six paths inside the envelope ±2t\pm 2\sqrt t.

Six Brownian paths on [0,1] (250 steps) inside the envelope ± 2√ t (dashed), which holds 95% of the law at each fixed time. The spread grows like √ t, not like t. Data: the chapter’s tutorial, seeded.
Figure 2.1. Six Brownian paths on [0,1][0,1] (250 steps) inside the envelope ±2t\pm 2\sqrt t (dashed), which holds 95% of the law at each fixed time. The spread grows like t\sqrt t, not like tt. Data: the chapter’s tutorial, seeded.

2.2 Path properties and the Markov property

Brownian paths are continuous and nowhere smooth. Almost surely they are Hölder continuous of every order α<12\alpha < \tfrac12 and of no order α>12\alpha > \tfrac12, and differentiable at no point; they cross any level they touch infinitely often immediately afterwards. None of this is pathology for its own sake: it is the reason a hedge rebalanced continuously in time still accumulates a nonzero cost (chapter 3), and the reason a barrier touched once is touched many times.

Definition 2.4 (Markov process, strong Markov property)

An adapted process (Xt)(X_t) is a Markov process if for all s,t≥0s, t \ge 0 and bounded measurable ff, E[f(Xs+t)∣Fs]=E[f(Xs+t)∣Xs]\E[f(X_{s+t}) \mid \mathcal F_s] = \E[f(X_{s+t}) \mid X_s]: given the present, the past adds nothing. It has the strong Markov property if the same holds with ss replaced by any finite stopping time τ\tau.

Theorem 2.5 (Brownian motion is strong Markov)

For every stopping time τ\tau with P(τ<∞)=1\P(\tau < \infty) = 1, the process Bt=Wτ+t−WτB_t = W_{\tau + t} - W_\tau is a Brownian motion independent of Fτ\mathcal F_\tau.

Proof. Admitted here. ∎

The proof approximates τ\tau from above by stopping times with countably many values, for which the statement is the simple Markov property applied on each value (Karatzas and Shreve, 1991, §2.6). The strong Markov property is what makes the next section work: after the first time a path reaches a level, what it does next is a fresh Brownian motion, as likely to go up as down.

2.3 The reflection principle and first-passage times

Definition 2.6 (First-passage time)

For a level bb, the first-passage time (or hitting time) of a continuous process XX is τb=inf⁡{t≥0:Xt=b}\tau_b = \inf\{t \ge 0 : X_t = b\}; it is a stopping time.

Theorem 2.7 (Reflection principle)

For b>0b > 0 and t>0t > 0, let Mt=max⁡s≤tWsM_t = \max_{s \le t}W_s. Then

P(Mt≥b)=P(τb≤t)=2P(Wt≥b)=2(1−Φ(b/t)),\P(M_t \ge b) = \P(\tau_b \le t) = 2\P(W_t \ge b) = 2\bigl(1 - \Phi(b/\sqrt t)\bigr),

and more precisely P(Mt≥b,Wt≤a)=P(Wt≥2b−a)\P(M_t \ge b, W_t \le a) = \P(W_t \ge 2b - a) for a≤ba \le b.

Proof. On {τb≤t}\{\tau_b \le t\} define the reflected path W~s=Ws\tilde W_s = W_s for s≤τbs \le \tau_b and W~s=2b−Ws\tilde W_s = 2b - W_s afterwards (Figure 2.2). By Theorem 2.5, Wτb+u−bW_{\tau_b + u} - b is a Brownian motion independent of Fτb\mathcal F_{\tau_b}, and so is its negative; hence W~\tilde W is a Brownian motion. The event {Mt≥b,Wt≤a}\{M_t \ge b, W_t \le a\} for WW is the event {W~t≥2b−a}\{\tilde W_t \ge 2b - a\} for W~\tilde W (the paths reach bb at the same time), which has the probability of {Wt≥2b−a}\{W_t \ge 2b - a\}. With a=ba = b: P(Mt≥b)=P(Mt≥b,Wt≤b)+P(Wt>b)=2P(Wt≥b)\P(M_t \ge b) = \P(M_t \ge b, W_t \le b) + \P(W_t > b) = 2\P(W_t \ge b). ∎

The reflection principle. After the first passage at b, the path (solid) and its mirror image in b (dashed) are equally likely continuations, so every path that ends below b after touching it is paired with one that ends above. Data: a seeded path of the tutorial.
Figure 2.2. The reflection principle. After the first passage at bb, the path (solid) and its mirror image in bb (dashed) are equally likely continuations, so every path that ends below bb after touching it is paired with one that ends above. Data: a seeded path of the tutorial.

Differentiating in tt gives the law of the first-passage time: τb\tau_b has density b(2πt3)−1/2e−b2/2tb(2\pi t^3)^{-1/2}e^{-b^2/2t}, finite almost surely but with infinite mean, since the density decays like t−3/2t^{-3/2}. A driftless price reaches any level eventually, and one should not wait for it. The stop of the hook is the reflection principle applied to the log price.

Definition 2.8 (Brownian motion with drift)

A Brownian motion with drift μ\mu and volatility σ>0\sigma > 0 is Xt=μt+σWtX_t = \mu t + \sigma W_t.

Proposition 2.9 (First passage with drift)

For Xt=μt+σWtX_t = \mu t + \sigma W_t and b<0b < 0,

P(min⁡s≤TXs≤b)=Φ(b−μTσT)+e2μb/σ2 Φ(b+μTσT).\P\bigl(\min_{s \le T}X_s \le b\bigr) = \Phi\Bigl(\frac{b - \mu T}{\sigma\sqrt T}\Bigr) + e^{2\mu b/\sigma^2}\,\Phi\Bigl(\frac{b + \mu T}{\sigma\sqrt T}\Bigr).

Proof. Admitted here. ∎

The proof changes the measure to remove the drift and applies the reflection principle (an exercise of chapter 5 derives it). For the hook, b=ln⁡0.98=−0.0202b = \ln 0.98 = -0.0202 and σT=0.0866\sigma\sqrt T = 0.0866: without drift the stop is touched with probability 2Φ(−0.233)=81.6%2\Phi(-0.233) = 81.6\%; with the drift −σ2/2-\sigma^2/2 that makes the price itself a martingale, 82.4%.

Proposition 2.10 (Discrete monitoring: the Broadie–Glasserman–Kou shift)

If XX is observed only at times kΔtk\Delta t, the probability that an observation falls at or below b<0b < 0 is, to first order in Δt\sqrt{\Delta t}, the continuous probability for the shifted level b−βσΔtb - \beta\sigma\sqrt{\Delta t}, with β=−ζ(12)/2π≈0.5826\beta = -\zeta(\tfrac12)/\sqrt{2\pi} \approx 0.5826.

Proof. Admitted here. ∎

The shift is the mean overshoot of the path beyond the level at the first observation below it (Broadie, Glasserman and Kou, 1997). With daily closes, βσΔt=0.0110\beta\sigma\sqrt{\Delta t} = 0.0110: the 2% stop behaves like a 3.1% stop watched continuously, and is touched with probability 71.9%, against 72.0% in a simulation of 200 000 months of daily closes. Figure 2.3 shows the three curves over stop distances from 1% to 10%. The error of discrete monitoring shrinks only like Δt\sqrt{\Delta t}: refining a daily simulation to four, sixteen and sixty-four observations a day gives 77.1%, 79.1% and 80.5% against the continuous 81.6%, the gap roughly halving each time the step is divided by four. A simulation that wants the continuous answer should not refine the grid; it should use the bridge of Section 2.5.

Probability that a stop below the entry of a stock with 30% volatility is touched within 21 trading days. Watched continuously (solid) or only at the closes (dashed, the Broadie–Glasserman–Kou shift); marks are simulations of 40 000 months, the open ones with the bridge crossing probability added between closes. Data: the chapter’s tutorial, seeded.
Figure 2.3. Probability that a stop below the entry of a stock with 30% volatility is touched within 21 trading days. Watched continuously (solid) or only at the closes (dashed, the Broadie–Glasserman–Kou shift); marks are simulations of 40 000 months, the open ones with the bridge crossing probability added between closes. Data: the chapter’s tutorial, seeded.

2.4 Quadratic variation

Definition 2.11 (Quadratic variation)

The quadratic variation of a process XX on [0,t][0, t] is the limit in probability [X]t=lim⁡∑k(Xtk+1−Xtk)2[X]_t = \lim\sum_k (X_{t_{k+1}} - X_{t_k})^2 over partitions 0=t0<⋯<tn=t0 = t_0 < \dots < t_n = t whose mesh max⁡k(tk+1−tk)\max_k(t_{k+1} - t_k) tends to zero, when it exists.

Theorem 2.12 (Quadratic variation of Brownian motion)

[W]t=t[W]_t = t: the sums converge to tt in L2L^2, and almost surely along dyadic partitions. Consequently the total variation ∑k∣Wtk+1−Wtk∣\sum_k|W_{t_{k+1}} - W_{t_k}| tends to infinity.

Proof. With Δk=Wtk+1−Wtk\Delta_k = W_{t_{k+1}} - W_{t_k}, E[∑Δk2]=∑(tk+1−tk)=t\E[\sum\Delta_k^2] = \sum(t_{k+1} - t_k) = t, and by independence Var⁡(∑Δk2)=∑2(tk+1−tk)2≤2t⋅mesh→0\Var(\sum\Delta_k^2) = \sum 2(t_{k+1} - t_k)^2 \le 2t\cdot\text{mesh} \to 0. For dyadic partitions the variances are summable and Borel–Cantelli gives almost sure convergence. If the total variation stayed bounded by VV along a sequence, then ∑Δk2≤Vmax⁡k∣Δk∣→0\sum\Delta_k^2 \le V\max_k|\Delta_k| \to 0 by uniform continuity, a contradiction. ∎

For a smooth function the sum of squared increments vanishes; for a Brownian path it is the elapsed time, deterministically, whichever path occurs. For σW\sigma W it is σ2t\sigma^2 t, so one path observed ever more finely reveals its volatility exactly, while its drift stays unobservable over any fixed period: the reason realised volatility (One Quant Book 1, chapter 25) is estimated so much better than an expected return, and the reason the microstructure noise of chapter 21 matters so much. Figure 2.4 samples one path at 44 to 65 53665\,536 points.

One Brownian path on [0,1] sampled at 2k points. Left: the sum of squared increments settles on t = 1 (1.006 at 65 536 points). Right: the sum of absolute increments grows like the square root of the number of points, without limit. Data: the chapter’s tutorial, seeded.
Figure 2.4. One Brownian path on [0,1][0,1] sampled at 2k2^k points. Left: the sum of squared increments settles on t=1t = 1 (1.006 at 65 536 points). Right: the sum of absolute increments grows like the square root of the number of points, without limit. Data: the chapter’s tutorial, seeded.

2.5 The Brownian bridge

Definition 2.13 (Brownian bridge)

A Brownian bridge from xx to yy on [t0,t1][t_0, t_1] is a Brownian motion conditioned on Wt0=xW_{t_0} = x and Wt1=yW_{t_1} = y; from 00 to 00 on [0,T][0, T] it can be written Wt−(t/T)WTW_t - (t/T)W_T, a centred Gaussian process with covariance s(T−t)/Ts(T - t)/T for s≤ts \le t.

Proposition 2.14 (What happens between two observations)

Given Wt0=xW_{t_0} = x and Wt1=yW_{t_1} = y, with h=t1−t0h = t_1 - t_0: (i) WsW_s for t0<s<t1t_0 < s < t_1 is normal with mean x+(s−t0)(y−x)/hx + (s - t_0)(y - x)/h and variance (s−t0)(t1−s)/h(s - t_0)(t_1 - s)/h, in particular N((x+y)/2,h/4)\mathcal N((x+y)/2, h/4) at the midpoint; (ii) for σW\sigma W and a level bb below both xx and yy,

P(min⁡t0≤s≤t1σWs≤b∣σWt0=x,σWt1=y)=exp⁡(−2(x−b)(y−b)σ2h).\P\bigl(\min_{t_0 \le s \le t_1}\sigma W_s \le b \bigm| \sigma W_{t_0} = x, \sigma W_{t_1} = y\bigr) = \exp\Bigl(-\frac{2(x - b)(y - b)}{\sigma^2 h}\Bigr).

Proof. (i) is Gaussian conditioning of the vector (Wt0,Ws,Wt1)(W_{t_0}, W_s, W_{t_1}). For (ii) take σ=1\sigma = 1, t0=0t_0 = 0, x=0x = 0 and level −c-c with c>0c > 0; by the reflection principle P(min⁡≤−c,Wh∈dy)=P(Wh∈−2c−dy)\P(\min \le -c, W_h \in dy) = \P(W_h \in -2c - dy), so the conditional probability is the ratio of the two normal densities, exp⁡(−((2c+y)2−y2)/2h)=exp⁡(−2c(c+y)/h)\exp(-((2c + y)^2 - y^2)/2h) = \exp(-2c(c + y)/h), which is the formula with x−b=cx - b = c and y−b=c+yy - b = c + y. ∎

Method 2.15 (Two uses of the bridge in simulation)

(i) Building paths coarse to fine: draw WT=TZ0W_T = \sqrt T Z_0, then the midpoint of each interval from part (i), halving the intervals until the grid is fine enough. The path has the right law, and the first normals fix its large-scale shape, which chapter 26 exploits with low-discrepancy points. (ii) Monitoring a barrier between grid points: simulate the path at the observation dates only, and for each interval multiply the probabilities 1−pk1 - p_k of not crossing, with pkp_k from part (ii). One minus the product is an unbiased estimate of the continuous crossing probability, with no grid refinement.

Two closes each 1% above the stop, one day apart at 30% volatility, leave a 57% chance that the stop was touched in between: exp⁡(−2×0.012/(0.09/252))\exp(-2 \times 0.01^2/(0.09/252)). The simulation of Figure 2.3 that adds these probabilities to daily closes recovers the continuous answer, 81.6%, with no finer grid.

2.6 Tutorial: stops, reflections and quadratic variation

Goal. Simulate Brownian paths two ways, check the reflection principle and the quadratic variation, and price the hook’s stop-loss by continuous and discrete monitoring. End state: Figures 2.1, 2.2, 2.3 and 2.4 and the probabilities 81.6% and 72.0%.

  1. Paths, by increments and by the bridge construction of Method 2.15(i).

        return np.concatenate([np.zeros((n_paths, 1, d)), np.cumsum(dw, axis=1)], axis=1)
    
    
    def bridge_paths(n_paths: int, levels: int, T: float, seed: int) -> np.ndarray:
        """Brownian paths on 2**levels steps built coarse to fine: W_T first, then the midpoints of each
        interval from the Brownian-bridge law N((W_l + W_r)/2, h/4) on an interval of length h."""
        rng = np.random.default_rng(seed)
        n = 2**levels
        dt = T / n
        w = np.zeros((n_paths, n + 1))
        w[:, n] = math.sqrt(T) * rng.standard_normal(n_paths)
        step = n
        while step > 1:
            half = step // 2
            mids = np.arange(half, n, step)
            z = rng.standard_normal((n_paths, mids.size))
    Listing 2.1. Brownian paths built coarse to fine by the bridge. code/firm/mcengine/firm_mcengine.py
  2. The stop: observe the log price at a given number of times a day, and optionally add the bridge crossing probability between observations.

    def simulate_touch(b: float, sigma: float, days: int, per_day: int, n_paths: int, seed: int,
                       bridge: bool = False) -> tuple[float, float]:
        """Monte Carlo probability that the log price (driftless, volatility sigma) is at or below b at
        one of `per_day` equally spaced observations a day; with bridge=True, each interval's
        crossing probability is added analytically (the Brownian-bridge correction). Returns the
        estimate and its standard error."""
        n = days * per_day
        dt = 1.0 / (YEAR * per_day)
        x = sigma * brownian_paths(n_paths, n, n * dt, seed)          # log price minus its start
        hit_grid = (x <= b).any(axis=1)
        if not bridge:
            est = hit_grid.astype(float)
        else:
            p_cross = bridge_crossing_probability(x[:, :-1], x[:, 1:], b, sigma**2 * dt)
            est = 1.0 - np.prod(1.0 - p_cross, axis=1)
        return float(est.mean()), float(est.std() / math.sqrt(n_paths))
    Listing 2.2. Discrete monitoring of a stop, with and without the bridge correction. code/methods/02-brownian-motion/python/qm_brownian.py
  3. Run stop_problem(), convergence_table() and fig_brownian.py; check that the C++20 and Rust engines draw the same normals as Python from the same seed (code/firm/mcengine/).

What to change next. Replace the fixed stop by a trailing stop 2% below the running maximum and find its trigger probability; give the log price the drift −σ2/2-\sigma^2/2 and compare the simulation with Proposition 2.9.

2.7 Build: the Monte Carlo engine, stage one

Purpose. Every simulation of the miniature firm draws its paths here: this chapter’s Brownian paths, the stochastic differential equations of chapter 4, and the variance reduction and low-discrepancy points of chapter 26.

Interface. SplitMix64(seed), NormalStream(seed) (Box–Muller, cosine first); brownian_paths(n_paths, n_steps, T, seed, corr=None); bridge_paths(n_paths, levels, T, seed); bridge_crossing_probability(x0, x1, barrier, var); in C++20 and Rust, brownian_path, bridge_path and bridge_crossing_probability over a NormalStream.

Rules. The reference stream (SplitMix64, Box–Muller) is identical in the three languages; bulk Python paths use NumPy’s PCG64; correlated paths through the Cholesky factor of the correlation matrix; seeds are explicit arguments, never global state.

Acceptance tests. code/firm/mcengine/{tests,cpp,rust}: the SplitMix64 test vector; the first normals and a four-step path equal in the three languages to 10−1410^{-14}; Var⁡(WT)=T\Var(W_T) = T and Cov⁡(Ws,Wt)=min⁡(s,t)\Cov(W_s, W_t) = \min(s,t) for both constructions; the crossing formula against a fine simulation.

Stretch. Antithetic pairs; a counter-based generator whose streams can be split across threads (chapter 26).

Sources and further reading

  • L. Bachelier, “Théorie de la spéculation”, Annales scientifiques de l’École Normale Supérieure 17, 1900.
  • N. Wiener, “Differential-space”, Journal of Mathematics and Physics 2, 1923.
  • M. D. Donsker, “An invariance principle for certain probability limit theorems”, Memoirs of the AMS 6, 1951.
  • M. Broadie, P. Glasserman and S. Kou, “A continuity correction for discrete barrier options”, Mathematical Finance 7, 1997.
  • I. Karatzas and S. E. Shreve, Brownian Motion and Stochastic Calculus, Springer, 2nd ed., 1991.

2.8 Exercises

Exercise 2.1 ★

Compute Cov⁡(W2,W5)\Cov(W_2, W_5), Var⁡(W5−W2)\Var(W_5 - W_2) and the correlation of W2W_2 and W5W_5.

Solution

Solution of Exercise 2.1.

Cov⁡(W2,W5)=min⁡(2,5)=2\Cov(W_2, W_5) = \min(2,5) = 2; Var⁡(W5−W2)=3\Var(W_5 - W_2) = 3; correlation 2/2×5=0.6322/\sqrt{2 \times 5} = 0.632.

Exercise 2.2 ★

What is the probability that a standard Brownian motion reaches 1 before time 1?

Solution

Solution of Exercise 2.2.

By the reflection principle, P(M1≥1)=2(1−Φ(1))=31.7%\P(M_1 \ge 1) = 2(1 - \Phi(1)) = 31.7\%.

Exercise 2.3 ★

A stock has an annual volatility of 20%. What is the standard deviation of its log return over one day and over one week of five trading days?

Solution

Solution of Exercise 2.3.

0.20/252=1.26%0.20/\sqrt{252} = 1.26\% a day; 5\sqrt5 times that, 2.82%, a week.

Exercise 2.4 ★★

A stop sits 5% below the entry of a stock with 30% volatility. What is the probability it is touched within three months (63 trading days) if watched continuously, and if watched at the closes only?

Solution

Solution of Exercise 2.4.

b=ln⁡0.95=−0.0513b = \ln 0.95 = -0.0513, T=0.25T = 0.25: continuously 2Φ(b/0.15)=73.2%2\Phi(b/0.15) = 73.2\%; at the closes, the level shifted by 0.01100.0110 gives 67.8%.

Exercise 2.5 ★★

Show that Wt2−tW_t^2 - t is a martingale, and deduce the expected time for WW to leave the interval (−a,b)(-a, b), a,b>0a, b > 0.

Solution

Solution of Exercise 2.5.

Es[Wt2]=Ws2+(t−s)\E_s[W_t^2] = W_s^2 + (t - s), so Wt2−tW_t^2 - t is a martingale. With τ\tau the exit time, E[Wτ∧n2]=E[τ∧n]\E[W_{\tau\wedge n}^2] = \E[\tau \wedge n]; letting n→∞n \to \infty (bounded convergence on the left, monotone on the right) and using P(Wτ=b)=a/(a+b)\P(W_\tau = b) = a/(a+b): E[τ]=b2aa+b+a2ba+b=ab\E[\tau] = b^2\frac{a}{a+b} + a^2\frac{b}{a+b} = ab.

Exercise 2.6 ★★

For a Brownian bridge from 0 to 0 on [0,1][0, 1], give the law of its value at t=12t = \tfrac12 and the probability that it reaches 0.50.5.

Solution

Solution of Exercise 2.6.

N(0,14)\mathcal N(0, \tfrac14), from the covariance s(1−s)s(1 - s); by Proposition 2.14, P(max⁡≥0.5)=exp⁡(−2×0.5×0.5)=60.7%\P(\max \ge 0.5) = \exp(-2 \times 0.5 \times 0.5) = 60.7\%.

Exercise 2.7 ★★★

Coding. The sum of squared increments of WW on [0,1][0,1] at nn points has standard deviation 2/n\sqrt{2/n}. Check it by simulating 2 000 paths at n=4 096n = 4\,096, and say whether the fluctuations of Figure 2.4 are consistent with it.

Solution

Solution of Exercise 2.7.

Var⁡(∑Δk2)=∑2(1/n)2=2/n\Var(\sum\Delta_k^2) = \sum 2(1/n)^2 = 2/n: at n=4 096n = 4\,096 the standard deviation is 0.022, and 2 000 simulated paths give 0.022. The figure’s value at 4 096 points, 1.031, is 1.4 standard deviations from 1: consistent.

Exercise 2.8 ★★★

Find the flaw. “Our Monte Carlo for a contract that knocks out if the stock ever trades below a barrier simulates daily closes and checks them against the barrier; the price has converged to four digits.” Correct it.

Solution

Solution of Exercise 2.8.

Checking daily closes prices a contract monitored daily, not continuously: it misses every crossing between closes and underestimates the knock-out probability by several points (72% against 82% for the 2% stop of the chapter). More paths only reduce the statistical error, not this bias, which falls like Δt\sqrt{\Delta t}. Add each interval’s bridge crossing probability, or price the continuous contract with the level shifted by βσΔt\beta\sigma\sqrt{\Delta t} to check.

2.9 Problem: The Stop-Loss

Problem 2.1

Weekend problem — how often a 2% stop is touched in a month

A stock with an annual volatility of 30% is bought with a stop 2% below the entry. Its log price is modelled as a Brownian motion with volatility σ=0.30\sigma = 0.30 and no drift, over 21 trading days of a 252-day year.

Part I — The continuous stop.

  1. What is the stop level bb in log price, and the standard deviation σT\sigma\sqrt T over the month?
  2. What is the probability that the stock ends the month below the stop?
  3. What is the probability that it touches the stop during the month, watched continuously?
  4. Why is the second number exactly twice the first?
  5. With the drift −σ2/2-\sigma^2/2 that makes the price a martingale, what does Proposition 2.9 give?

Part II — Watched at the close.

  1. What does a simulation of 200 000 months of daily closes give?
  2. What is the Broadie–Glasserman–Kou shift with daily closes, and the equivalent continuous stop?
  3. What probability does the shifted level give?
  4. Watched every 15 minutes (26 times a day), what do the simulation and the shift give?
  5. Why does refining the grid by four only halve the gap to the continuous answer?

Part III — The bridge.

  1. Two consecutive closes are each 1% above the stop. What is the probability the stop was touched between them?
  2. What does the daily simulation give once each day’s crossing probability is added?
  3. Why is this estimate unbiased for the continuous probability?
  4. Which is cheaper for a target accuracy: 64 observations a day, or daily observations with the bridge?

Part IV — Judgement.

  1. At 15% volatility, what is the continuous probability?
  2. Over three months, what are the continuous and daily-close probabilities?
  3. The stop is a resting order on the exchange; which number applies, and what does the model miss?
  4. The desk sells a note that knocks out on a daily close below the level. Which number should price it?
  5. State the named result: the probability that the 2% stop is touched in a month, continuously and at the closes.
  6. In one sentence: why is a barrier watched continuously so much more likely to be touched than one watched daily?
Solution

Solution of Problem 2.1.

1. b=ln⁡0.98=−0.0202b = \ln 0.98 = -0.0202; σT=0.3021/252=0.0866\sigma\sqrt T = 0.30\sqrt{21/252} = 0.0866. 2. Φ(−0.0202/0.0866)=Φ(−0.233)=40.8%\Phi(-0.0202/0.0866) = \Phi(-0.233) = 40.8\%. 3. 2×40.8%=81.6%2 \times 40.8\% = 81.6\%. 4. By the reflection principle each path that touches the stop and ends above it is paired with its mirror image, which ends below. 5. 82.4%: the negative drift makes the touch slightly likelier. 6. 72.0% (standard error 0.1 point). 7. 0.5826×0.30/252=0.01100.5826 \times 0.30/\sqrt{252} = 0.0110 in log price: the stop behaves like a 3.1% stop watched continuously. 8. 71.9%. 9. 79.6% by simulation, 79.6% by the shift. 10. The overshoot, and hence the error, is of order σΔt\sigma\sqrt{\Delta t}: dividing Δt\Delta t by four halves it (77.1%, 79.1%, 80.5% at 4, 16 and 64 observations a day). 11. exp⁡(−2×0.01×0.01/(0.09/252))=57.1%\exp(-2 \times 0.01 \times 0.01/(0.09/252)) = 57.1\%. 12. 81.6% (standard error 0.08 point), equal to the continuous answer. 13. Given the closes, the crossings in different days are independent bridges, so 1−∏(1−pk)1 - \prod(1 - p_k) is the conditional probability of a touch; its mean is the unconditional one. 14. The bridge: it is exact at the cost of daily steps, while 64 steps a day still leave a 1-point bias at 64 times the cost. 15. 64.1%. 16. 89.3% continuously, 83.5% at the closes. 17. The continuous number, 82%; the model misses gaps (the order fills below the stop when the price jumps through it), volatility that is not constant, and intraday patterns. 18. The daily-close number, 72%: the contract is monitored at the closes. 19. Named result: the stop-loss: a 2% stop on a 30%-volatility stock is touched within a month with probability 81.6% if watched continuously and 72.0% if watched at the closes; the Broadie–Glasserman–Kou shift gives 71.9% and the bridge-corrected daily simulation 81.6%. 20. Because a Brownian path crosses and re-crosses a level between observations, and the closes see only the crossings that last until the close.

2.10 Interview questions

Interview question 2.1 ★ trader, researcher

A driftless Brownian motion starts at 0. What is the probability it hits −1-1 before +2+2?

Solution

Solution of Interview question 2.1.

WW is a bounded martingale up to the exit, so E[Wτ]=0\E[W_\tau] = 0: −1×p+2(1−p)=0-1 \times p + 2(1 - p) = 0, p=2/3p = 2/3.

What the interviewer is looking for: optional stopping in one line.

Interview question 2.2 ★ researcher

Why is the quadratic variation of a Brownian path tt, and why does it matter for trading?

Solution

Solution of Interview question 2.2.

The squared increments over a partition have mean equal to the elapsed time and a variance that vanishes with the mesh. It is why the variance of a hedged book accumulates with time whatever the rebalancing frequency, why volatility is measurable from one path, and why Itô’s formula has a second-order term.

What the interviewer is looking for: the L2L^2 computation and its consequences.

Interview question 2.3 ★★ researcher, trader

What is the expected maximum of a standard Brownian motion over [0,1][0,1]?

Solution

Solution of Interview question 2.3.

By the reflection principle M1M_1 has the law of ∣W1∣|W_1|, so E[M1]=2/π=0.798\E[M_1] = \sqrt{2/\pi} = 0.798.

What the interviewer is looking for: reflection, then the half-normal mean.

Interview question 2.4 ★★ developer, researcher

How do you price a continuously monitored barrier by Monte Carlo without taking tiny time steps?

Solution

Solution of Interview question 2.4.

Simulate on the grid you need anyway and, in each interval, multiply by the bridge probability of not crossing, 1−exp⁡(−2(xk−b)(xk+1−b)/σ2Δt)1 - \exp(-2(x_k - b)(x_{k+1} - b)/\sigma^2\Delta t) (or sample the crossing with that probability); for a quick check, shift the level by 0.5826 σΔt0.5826\,\sigma\sqrt{\Delta t}.

What the interviewer is looking for: the Brownian-bridge crossing probability.

Interview question 2.5 ★★ risk, trader

A trader says a 2% stop on a 30%-volatility stock is triggered about 40% of the time in a month. What did they compute, and what is the right number?

Solution

Solution of Interview question 2.5.

The probability of ending the month below the stop, 41%. A stop is triggered by the minimum, not the terminal value; by reflection the right number is twice that, 82% continuously, 72% if only closes count.

What the interviewer is looking for: terminal versus path-dependent probability.

Interview question 2.6 ★★★ researcher

Compute P(W1>0,W2>0)\P(W_1 > 0, W_2 > 0).

Solution

Solution of Interview question 2.6.

(W1,W2−W1)(W_1, W_2 - W_1) are independent standard normals (X,Y)(X, Y), and the event is X>0X > 0, X+Y>0X + Y > 0: a wedge of angle π/2+π/4\pi/2 + \pi/4 in the plane, so the probability is (3π/4)/(2π)=3/8(3\pi/4)/(2\pi) = 3/8.

What the interviewer is looking for: rotational symmetry of the Gaussian.

Terms defined in this chapter

See all 2333 terms in the glossary