Unit 8, lesson 59

SDE discretization and weak convergence

How the Euler-Maruyama scheme and the Milstein correction approximate an SDE, how strong and weak orders of convergence differ, why payoff regularity affects the weak rate, and how Euler breaks square-root positivity.

  • Video 59
  • Root finding, Monte Carlo and discretization

When a price or a variance follows an SDE whose transition law has no closed form, a simulation has to step the equation forward on a time grid. How much does the grid distort a price, and does it matter whether the question concerns each simulated path or only the distribution of outcomes? This lesson derives the Euler-Maruyama step from the integral form of the SDE and the Milstein correction from the next stochastic Taylor term, states the strong and weak orders they reach under explicit hypotheses, shows how kinks, jumps and barriers in a payoff change the weak error, and gives a step of a square-root variance model that goes negative.

Key terms

Euler-Maruyama scheme

Definition Consider the scalar SDE dXt=b(t,Xt) dt+σ(t,Xt) dWtdX_t = b(t, X_t)\, dt + \sigma(t, X_t)\, dW_t on [0,T][0, T] with a deterministic initial value X0X_0, where WW is a standard Brownian motion under the measure in which the equation is stated. In integral form, over a step from tnt_n to tn+1=tn+ht_{n+1} = t_n + h,

Xtn+1−Xtn=∫tntn+1b(s,Xs) ds+∫tntn+1σ(s,Xs) dWs.\begin{aligned} &X_{t_{n+1}} - X_{t_n} \\[0.4em] &\quad = \int_{t_n}^{t_{n+1}} b(s, X_s)\, ds \\[0.4em] &\qquad + \int_{t_n}^{t_{n+1}} \sigma(s, X_s)\, dW_s . \end{aligned}

On the uniform grid tn=nht_n = nh with h=T/Mh = T/M, the Euler-Maruyama scheme freezes both coefficients at the start of each step. With X0h=X0X^h_0 = X_0,

Xn+1h=Xnh+bnh+σnΔWn,\begin{aligned} X^h_{n+1} &= X^h_n + b_n h \\[0.4em] &\quad + \sigma_n \Delta W_n , \end{aligned}

where bn=b(tn,Xnh)b_n = b(t_n, X^h_n), σn=σ(tn,Xnh)\sigma_n = \sigma(t_n, X^h_n) and ΔWn=Wtn+1−Wtn\Delta W_n = W_{t_{n+1}} - W_{t_n}. The increments are independent and normal with mean 00 and variance hh, and they are simulated as h Zn\sqrt{h}\, Z_n with independent standard normal ZnZ_n. The coefficients are fixed before the increment is seen, as in the Itô integral. Evaluating the diffusion coefficient at the end of the step, after the increment is known, defines a different method, which in general converges to a different limit. Two separate limits are involved in a simulation. Refining hh is meant to bring the law of XThX^h_T closer to the law of XTX_T, while more sample paths estimate expectations under the law of XThX^h_T more precisely and cannot remove the discretization bias of a fixed step. Whether refinement converges at all depends on the regularity of the coefficients, the moments of the solution and any constraint on its state.

In plain words Over a short step, Euler pretends that the drift and the volatility keep the values they had at the start of the step. It is the stochastic version of the forward Euler method for ordinary differential equations, with a Gaussian shock whose variance equals the step length.

Example Take constructed geometric Brownian motion inputs, dSt=μSt dt+σSt dWtdS_t = \mu S_t\, dt + \sigma S_t\, dW_t with S0=100S_0 = 100, μ=0.05\mu = 0.05, σ=0.2\sigma = 0.2 and h=0.25h = 0.25, and one standard normal draw Z=−1.3Z = -1.3, so that ΔW=0.25⋅(−1.3)=−0.65\Delta W = \sqrt{0.25} \cdot (-1.3) = -0.65. The drift contributes μS0h=1.25\mu S_0 h = 1.25 and the diffusion σS0ΔW=−13\sigma S_0 \Delta W = -13, so the Euler step gives S1h=100+1.25−13=88.25S^h_1 = 100 + 1.25 - 13 = 88.25. For the same increment the exact transition gives

Sh=100 e(μ−σ2/2)h+σΔW=100 e0.0075−0.13≈88.47059.\begin{aligned} S_h &= 100\, e^{(\mu - \sigma^2/2) h + \sigma \Delta W} \\[0.4em] &= 100\, e^{0.0075 - 0.13} \\[0.4em] &\approx 88.47059 . \end{aligned}

The drift μ\mu here is constructed and not a pricing drift. For pricing under Q\mathbb{Q} the same step would use r−qr - q in place of μ\mu.

Milstein correction

Definition Keep the scalar SDE and a scalar Brownian motion, and suppose σ\sigma is smooth enough to apply Itô’s formula to σ(s,Xs)\sigma(s, X_s), with σx=∂σ/∂x\sigma_x = \partial \sigma / \partial x its derivative in the state variable. On [tn,tn+1][t_n, t_{n+1}] the leading random part of σ(s,Xs)−σ(tn,Xtn)\sigma(s, X_s) - \sigma(t_n, X_{t_n}) is σσx(tn,Xtn) (Ws−Wtn)\sigma \sigma_x (t_n, X_{t_n}) \, (W_s - W_{t_n}), and the other terms contribute only at higher order in hh. Itô’s formula applied to (Ws−Wtn)2(W_s - W_{t_n})^2 gives the iterated integral

∫tntn+1(Ws−Wtn) dWs=12((ΔWn)2−h).\begin{aligned} &\int_{t_n}^{t_{n+1}} \bigl(W_s - W_{t_n}\bigr)\, dW_s \\[0.4em] &\quad = \tfrac12\bigl((\Delta W_n)^2 - h\bigr). \end{aligned}

Adding the resulting term to the Euler step gives the scalar Milstein scheme

Xn+1h=Xnh+bnh+σnΔWn+12σnσn′×((ΔWn)2−h),\begin{aligned} &X^h_{n+1} = X^h_n + b_n h \\[0.4em] &\quad + \sigma_n \Delta W_n \\[0.4em] &\quad + \tfrac12 \sigma_n \sigma'_n \\[0.4em] &\qquad \times \bigl((\Delta W_n)^2 - h\bigr), \end{aligned}

where σn′=σx(tn,Xnh)\sigma'_n = \sigma_x(t_n, X^h_n). Given XnhX^h_n the correction has mean zero, because E[(ΔWn)2]=h\mathbb{E}[(\Delta W_n)^2] = h. When σ\sigma does not depend on xx, the correction vanishes and Milstein coincides with Euler. With several Brownian motions whose diffusion vector fields do not commute, the corresponding expansion also needs the iterated integrals of different components, whose antisymmetric parts, the Lévy areas, are not functions of the increments. Adding a scalar correction to each coordinate separately then does not in general give strong order 11.

In plain words Euler ignores the fact that the volatility itself moves during the step in response to the same shock. Milstein adds the first-order effect of that movement. The correction involves the squared shock minus its mean, so it changes each path without shifting the conditional mean of the step.

Example For geometric Brownian motion the diffusion coefficient is σ(t,x)=σx\sigma(t, x) = \sigma x with constant volatility σ\sigma, so σx=σ\sigma_x = \sigma and the correction is 12σ2Snh((ΔWn)2−h)\tfrac12 \sigma^2 S^h_n \bigl((\Delta W_n)^2 - h\bigr). With the constructed inputs, (ΔW)2−h=0.4225−0.25=0.1725(\Delta W)^2 - h = 0.4225 - 0.25 = 0.1725 and 12σ2S0=2\tfrac12 \sigma^2 S_0 = 2, so the correction is 0.3450.345 and the Milstein step gives 88.59588.595. Against the exact 88.4705988.47059, the Euler error is about −0.2206-0.2206 and the Milstein error about 0.12440.1244. Milstein is closer for this draw, but one draw is not a convergence test.

Strong order of convergence

Definition A scheme has strong order γ>0\gamma > 0 at time TT if there are constants CC and h0>0h_0 > 0, independent of hh, such that

(E[∣XT−XTh∣2])1/2≤Chγ\begin{aligned} &\Bigl(\mathbb{E}\bigl[\lvert X_T - X^h_T \rvert^2\bigr]\Bigr)^{1/2} \\[0.4em] &\quad \le C h^{\gamma} \end{aligned}

for every uniform step h≤h0h \le h_0, where XTh=XMhX^h_T = X^h_M is computed from the increments of the same Brownian path that drives XX. Some texts use E∣XT−XTh∣\mathbb{E}\lvert X_T - X^h_T \rvert or a maximum over grid times instead of this root-mean-square terminal error. The course states the following rates without proof. Let the SDE be scalar and autonomous, dXt=b(Xt) dt+σ(Xt) dWtdX_t = b(X_t)\, dt + \sigma(X_t)\, dW_t on a fixed horizon [0,T][0, T], with deterministic X0X_0, and let bb and σ\sigma be six times continuously differentiable with the functions and all their derivatives through order six bounded. These hypotheses make the coefficients globally Lipschitz and provide every moment needed. Then the Euler-Maruyama scheme has strong order 12\tfrac12 and the Milstein scheme strong order 11. In particular, Euler has strong order 11 when σ\sigma is constant, since it then coincides with Milstein. The hypotheses are sufficient, not necessary. The linear coefficients of geometric Brownian motion are unbounded, yet the same rates hold there by separate growth and moment estimates. Strong order also controls weak error for a test function ff with Lipschitz constant LL, because ∣E[f(XT)]−E[f(XTh)]∣≤L E∣XT−XTh∣≤LChγ\lvert \mathbb{E}[f(X_T)] - \mathbb{E}[f(X^h_T)] \rvert \le L\, \mathbb{E}\lvert X_T - X^h_T \rvert \le L C h^{\gamma}.

In plain words Strong error asks how closely the simulated path follows the true path driven by the same random shocks. It is the relevant error when individual paths matter, for example when coarse and fine simulations of the same path are compared, or when a quantity is computed along a path.

Example For the constructed geometric Brownian motion with T=1T = 1, a Monte Carlo estimate with 200000200000 paths compares each scheme with the exact solution on the same Brownian path. Each entry below is a statistical estimate of the root-mean-square terminal error.

Step hhEuler errorMilstein error
1/81/81.081.080.1470.147
1/161/160.760.760.0740.074
1/321/320.540.540.0370.037
1/641/640.380.380.0180.018

Halving hh divides the Euler error by about 2≈1.41\sqrt{2} \approx 1.41 and the Milstein error by about 22, as orders 12\tfrac12 and 11 predict.

Weak order of convergence

Definition A scheme has weak order β>0\beta > 0 for a class of test functions if for every ff in the class there are constants CfC_f and h0>0h_0 > 0 with

∣E[f(XT)]−E[f(XTh)]∣≤Cf hβ\begin{aligned} &\bigl\lvert \mathbb{E}[f(X_T)] - \mathbb{E}[f(X^h_T)] \bigr\rvert \\[0.4em] &\quad \le C_f\, h^{\beta} \end{aligned}

for every uniform step h≤h0h \le h_0. Only the laws of XTX_T and XThX^h_T enter, so no coupling of paths is needed. The course states without proof that, under the hypotheses on bb and σ\sigma of the previous card and for a test function ff that is six times continuously differentiable with ff and its derivatives through order six bounded, the Euler-Maruyama scheme has weak order 11. Under hypotheses of the same kind the Milstein scheme also has weak order 11, so its gain is in strong error. Because only laws matter, the normal increments may be replaced by other variables with matching low moments, for example ±h\pm\sqrt{h} with probability 12\tfrac12 each, and Euler keeps weak order 11 under smoothness conditions of the same type. Weak order 11 does not mean that coupled paths differ by order hh, since the strong order of Euler is only 12\tfrac12.

In plain words Weak error asks only whether the simulated distribution gives the right averages, which is what a price needs. Euler’s paths drift away from the true paths by an amount of order h\sqrt{h}, but for smooth payoffs these errors largely cancel in the average, leaving an error of order hh.

Example For the constructed geometric Brownian motion, E[Sn+1h∣Snh]=Snh(1+μh)\mathbb{E}[S^h_{n+1} \mid S^h_n] = S^h_n (1 + \mu h), so the Euler mean is exactly E[STh]=S0(1+μh)T/h\mathbb{E}[S^h_T] = S_0 (1 + \mu h)^{T/h}, while E[ST]=S0eμT≈105.12711\mathbb{E}[S_T] = S_0 e^{\mu T} \approx 105.12711. With T=1T = 1 the error of the mean is about 0.032580.03258 for h=1/4h = 1/4, 0.016360.01636 for h=1/8h = 1/8 and 0.008200.00820 for h=1/16h = 1/16. It halves with hh, close to the first-order term

12S0eμTμ2Th≈0.1314 h.\begin{aligned} &\tfrac12 S_0 e^{\mu T} \mu^2 T h \\[0.4em] &\quad \approx 0.1314\, h . \end{aligned}

Geometric Brownian motion and f(x)=xf(x) = x lie outside the bounded hypotheses, but here the error can be computed exactly. At h=1/8h = 1/8 the error of the mean is more than 6060 times smaller than the root-mean-square path error of about 1.081.08 in the previous card.

Payoff regularity

Definition Payoff regularity is the smoothness, as a function of the terminal state or of the path, that a weak error estimate requires of the payoff. The weak order 11 result above assumes a smooth test function with bounded derivatives. A call payoff (x−K)+(x - K)^{+} is Lipschitz with constant 11 but has a kink at KK, a digital payoff 1{x>K}\mathbf{1}_{\{x > K\}} has a jump, and a barrier condition depends on the whole path. For such payoffs the smooth result does not apply as stated, and the rate has to be established by a separate argument. For a Lipschitz payoff the strong bound already gives weak order at least 12\tfrac12. A barrier that is monitored continuously in the contract but checked only at grid dates in the simulation misses crossings between dates, and for Brownian motion and geometric Brownian motion this monitoring error is of order h\sqrt{h}, a known result stated here without proof. Smoothing the payoff and conditional monitoring between dates are remedies, each with its own analysis. For a Brownian motion with constant volatility ss, possibly with drift, and a barrier level HH above two consecutive grid values xx and yy, the probability that the path between them crosses HH is

exp⁡(−2(H−x)(H−y)s2h).\exp\Bigl(-\frac{2(H - x)(H - y)}{s^2 h}\Bigr).

In plain words The argument behind weak order one relies on derivatives of the payoff. At a kink or a jump those derivatives do not exist, so the argument does not go through as it stands, even though a rate may still be proved in another way. A barrier adds a separate problem, because a path checked only at grid dates can cross the barrier and come back unnoticed.

Example Take a constructed log price ln⁡(St/S0)=0.2Wt\ln(S_t/S_0) = 0.2 W_t with no drift and an up barrier at S0e0.1S_0 e^{0.1}, about 110.52110.52 when S0=100S_0 = 100. The barrier is reached by time 11 exactly when the maximum of WW on [0,1][0, 1] is at least 0.50.5, which by the reflection principle has probability 2(1−Φ(0.5))≈0.61712(1 - \Phi(0.5)) \approx 0.6171. Checking only at MM equally spaced dates, with WW sampled exactly there, gives Monte Carlo estimates of about 0.4410.441 for M=4M = 4, 0.5220.522 for M=16M = 16, 0.5680.568 for M=64M = 64 and 0.5920.592 for M=256M = 256, each with standard error below 0.00040.0004. The gaps 0.1760.176, 0.0950.095, 0.0490.049 and 0.0250.025 roughly halve each time MM is multiplied by four, the signature of an error of order h\sqrt{h}, although the path has no error at the grid dates. Adding the bridge crossing probability between dates brings the estimate for M=4M = 4 to about 0.6170.617.

Square-root state positivity

Definition The Cox-Ingersoll-Ross square-root model for a variance is

dvt=κ(θ−vt) dt+ξvt dWt\begin{aligned} dv_t &= \kappa(\theta - v_t)\, dt \\[0.4em] &\quad + \xi \sqrt{v_t}\, dW_t \end{aligned}

with κ,θ,ξ>0\kappa, \theta, \xi > 0 and v0≥0v_0 \ge 0. It has a unique strong solution, and that solution stays nonnegative for all tt. If in addition 2κθ≥ξ22\kappa\theta \ge \xi^2, the Feller condition, and v0>0v_0 > 0, it stays strictly positive almost surely. These facts are stated here without proof, and the coefficient v\sqrt{v} is not Lipschitz at 00, so the global Lipschitz results of the earlier cards do not apply. Square-root state positivity is this property of the exact solution, never leaving [0,∞)[0, \infty). The Euler step

vn+1h=vnh+κ(θ−vnh) h+ξvnhh Zn\begin{aligned} v^h_{n+1} &= v^h_n + \kappa(\theta - v^h_n)\, h \\[0.4em] &\quad + \xi \sqrt{v^h_n h}\, Z_n \end{aligned}

does not have it. For every vnh>0v^h_n > 0 the step is negative when

Zn<−vnh+κ(θ−vnh)hξvnhh,Z_n < -\frac{v^h_n + \kappa(\theta - v^h_n) h}{\xi \sqrt{v^h_n h}},

an event of positive probability, and then the next square root is undefined. Truncating at zero, reflecting, sampling the exact noncentral chi-square transition and other positivity-preserving constructions are different numerical methods, each needing its own convergence and bias analysis.

In plain words The exact square-root process has a drift that pulls it up and a shock that shrinks to zero as the variance approaches zero, so it cannot cross below zero. The Euler step sizes its Gaussian shock at the start of the step, and a large enough negative shock carries the variance below zero in one step.

Example Take constructed inputs v0=0.001v_0 = 0.001, κ=1\kappa = 1, θ=0.04\theta = 0.04, ξ=0.5\xi = 0.5, h=0.1h = 0.1 and Z=−3Z = -3. The drift adds κ(θ−v0)h=0.0039\kappa(\theta - v_0) h = 0.0039 and the diffusion adds ξv0h Z=0.5⋅0.01⋅(−3)=−0.015\xi \sqrt{v_0 h}\, Z = 0.5 \cdot 0.01 \cdot (-3) = -0.015, so the Euler value is 0.001+0.0039−0.015=−0.01010.001 + 0.0039 - 0.015 = -0.0101. Here 2κθ=0.082\kappa\theta = 0.08 is below ξ2=0.25\xi^2 = 0.25, so the exact process can reach zero, but it never goes below it. From this state the threshold is −0.0049/0.005=−0.98-0.0049/0.005 = -0.98, so the Euler step is negative with probability Φ(−0.98)≈0.164\Phi(-0.98) \approx 0.164, about one step in six.

Check yourself

  1. For constructed geometric Brownian motion inputs S0=50S_0 = 50, μ=0.04\mu = 0.04, σ=0.3\sigma = 0.3, h=0.04h = 0.04 and Z=1.5Z = 1.5, compute one Euler step, one Milstein step and the exact transition with the same increment.
Show the answer

The increment is ΔW=0.04⋅1.5=0.3\Delta W = \sqrt{0.04} \cdot 1.5 = 0.3. The drift term is 0.04⋅50⋅0.04=0.080.04 \cdot 50 \cdot 0.04 = 0.08 and the diffusion term is 0.3⋅50⋅0.3=4.50.3 \cdot 50 \cdot 0.3 = 4.5, so the Euler value is 54.5854.58. The Milstein correction is

12⋅0.09⋅50⋅(0.09−0.04)=2.25⋅0.05=0.1125,\begin{aligned} &\tfrac12 \cdot 0.09 \cdot 50 \cdot (0.09 - 0.04) \\[0.4em] &\quad = 2.25 \cdot 0.05 = 0.1125, \end{aligned}

which gives 54.692554.6925. The exact exponent is (0.04−0.045)⋅0.04+0.3⋅0.3=0.0898(0.04 - 0.045) \cdot 0.04 + 0.3 \cdot 0.3 = 0.0898, so the exact value is 50 e0.0898≈54.6977750\, e^{0.0898} \approx 54.69777. The Euler error is about −0.1178-0.1178 and the Milstein error about −0.0053-0.0053. Both numbers come from one draw and say nothing by themselves about the orders of convergence.

  1. A colleague prices a contract on the constructed geometric Brownian motion with Euler steps of h=1/64h = 1/64 and a million paths. Knowing that the root-mean-square path error at this step is about 0.380.38, the colleague concludes that the estimated mean of STS_T is off by about 0.380.38 and that ten times more paths will fix it. What is wrong with both conclusions?
Show the answer

The value 0.380.38 is a strong error, the typical distance between coupled Euler and exact paths, and a mean is a weak quantity. The Euler mean is exactly S0(1+μh)1/hS_0(1 + \mu h)^{1/h}, and its error is

100(e0.05−(1+0.05/64)64)≈0.00205,\begin{aligned} &100\bigl(e^{0.05} - (1 + 0.05/64)^{64}\bigr) \\[0.4em] &\quad \approx 0.00205, \end{aligned}

about 185185 times smaller than 0.380.38. More paths reduce only the sampling error of the estimate of E[STh]\mathbb{E}[S^h_T]. The discretization bias of about 0.002050.00205 stays the same for every number of paths, and only a finer grid, or here the exact transition, removes it.

  1. Parameters κ=2\kappa = 2, θ=0.04\theta = 0.04 and ξ=0.3\xi = 0.3 satisfy the Feller condition, and a modeler argues that Euler steps of h=1/52h = 1/52 therefore cannot produce a negative variance. Check the condition, then find the probability that one Euler step from vnh=0.01v^h_n = 0.01 is negative.
Show the answer

The condition holds, since 2κθ=0.16≥ξ2=0.092\kappa\theta = 0.16 \ge \xi^2 = 0.09. It is a statement about the exact process, which then stays strictly positive, and it says nothing about the scheme. From vnh=0.01v^h_n = 0.01 the deterministic part is 0.01+2⋅0.03/52≈0.0111540.01 + 2 \cdot 0.03/52 \approx 0.011154 and the shock scale is 0.30.01/52≈0.00416030.3\sqrt{0.01/52} \approx 0.0041603, so the step is negative when

Zn<−0.0111540.0041603≈−2.681,\begin{aligned} Z_n &< -\frac{0.011154}{0.0041603} \\[0.4em] &\approx -2.681 , \end{aligned}

with probability Φ(−2.681)≈0.0037\Phi(-2.681) \approx 0.0037. That is small for one step, but a simulation makes many steps on many paths. In a run of 200000200000 paths over five years of weekly steps from v0=0.04v_0 = 0.04, continued with the positive part inside the coefficients, about 3030 percent of the paths produced at least one negative Euler value.

How this lesson connects