Tutorials › Stochastic Calculus › Stratified Sampling for SDE Payoffs

Monte Carlo Methods for SDEs · Tutorial 537 of 600

Stratified Sampling for SDE Payoffs

Partition the simulation input into strata, derive the estimator’s variance and optimal allocation, and work through diffusion-option examples.

Intermediate 12 min read

What You'll Learn

  • Express a diffusion payoff as a function of a uniform random input
  • Construct an unbiased stratified estimator and derive its variance
  • Compare stratified variance with ordinary Monte Carlo variance
  • Allocate samples using within-stratum standard deviations
  • Apply the method to digital and European call payoffs

Why Stratify a Diffusion Simulation?

Monte Carlo estimates can be noisy when simulated outcomes vary substantially. Stratification reduces some of that noise by dividing the distribution of a simulation input into regions and ensuring that each region is represented. For a diffusion payoff, one convenient input is the uniform variable that generates a Brownian terminal value, or one of the normal increments used in a path simulation. The method does not change the expected payoff: it changes how the simulation budget is spread across the input space.

Let \((\Omega,\mathcal{F},(\mathcal{F}_t),\mathbb{P})\) be a filtered probability space carrying a standard Brownian motion \(B_t\). When an SDE is simulated under a pricing measure, such as the risk-neutral measure \(\mathbb{Q}\), the expectation and simulation must be taken under that measure; stratification does not itself change \(\mathbb{P}\) into \(\mathbb{Q}\). For an option price, for example, the target is commonly \(\mathbb{E}^{\mathbb{Q}}[e^{-rT}G(S_T)]\). The discount factor is part of the payoff being estimated.

Suppose a simulation produces a square-integrable payoff \(Y=g(Z)\), where \(Z\) is a standard normal input. Set \(U=\Phi(Z)\), where \(\Phi\) is the standard normal CDF. Then \(U\) is uniform on \((0,1)\), and \(Z=\Phi^{-1}(U)\) almost surely. Thus the payoff can also be written \(Y=q(U)\), where \(q(u)=g(\Phi^{-1}(u))\). This representation applies to terminal-value simulation and, by taking one selected normal input while treating the other inputs as part of the payoff, to many path simulations.

Definition: Divide \((0,1)\) into \(H\) strata \(I_h=((h-1)/H,h/H]\), for \(h=1,\ldots,H\). Each has probability \(p_h=1/H\); endpoint conventions do not affect probabilities because a uniform variable hits any fixed endpoint with probability zero. In stratum \(h\), draw \(n_h\ge1\) independent uniform variables \(U_{hj}\) on \(I_h\), independently across all strata, and set \(Y_{hj}=q(U_{hj})\). The stratified estimator is \(\widehat\mu_{\mathrm{str}}=\sum_{h=1}^H p_h\overline Y_h\), where \(\overline Y_h=n_h^{-1}\sum_{j=1}^{n_h}Y_{hj}\).

More generally, strata need not have equal probability. For any partition into intervals of positive lengths \(p_h\) summing to one, use those probabilities as the estimator weights. The required condition throughout is that the payoff have finite second moment, \(\mathbb{E}[Y^2]<\infty\), so that the within-stratum variances are finite.

Unbiasedness, Variance, and Allocation

Theorem: For independent sampling within strata, \(\widehat\mu_{\mathrm{str}}\) is unbiased for \(\mu=\mathbb{E}[Y]\), and $$ \operatorname{Var}(\widehat\mu_{\mathrm{str}})=\sum_{h=1}^H\frac{p_h^2\sigma_h^2}{n_h}, $$ where \(\sigma_h^2=\operatorname{Var}(Y\mid U\in I_h)\). For a fixed total sample size \(N=\sum_h n_h\), if every \(\sigma_h>0\), the minimum over positive real allocations is attained at \(n_h=Np_h\sigma_h/\sum_k p_k\sigma_k\). Its minimum variance is \((\sum_h p_h\sigma_h)^2/N\). Integer allocations approximate this rule; any imposed minimum of one sample per stratum must also be respected.

Proof. Since \(U_{hj}\) has the uniform distribution conditional on \(U\in I_h\), each \(Y_{hj}\) has mean \(\mu_h=\mathbb{E}[Y\mid U\in I_h]\) and variance \(\sigma_h^2\). The strata partition the input, so \(\mu=\sum_h p_h\mu_h\). Therefore \(\mathbb{E}[\widehat\mu_{\mathrm{str}}]=\sum_h p_h\mathbb{E}[\overline Y_h]=\sum_h p_h\mu_h=\mu\). Independence gives \(\operatorname{Var}(\overline Y_h)=\sigma_h^2/n_h\), and the sample means from different strata are independent. The variance of their weighted sum is consequently \(\sum_h p_h^2\sigma_h^2/n_h\).

For any positive real \(n_h\) summing to \(N\), the Cauchy–Schwarz inequality gives $$ \left(\sum_h p_h\sigma_h\right)^2 =\left(\sum_h\frac{p_h\sigma_h}{\sqrt{n_h}}\sqrt{n_h}\right)^2 \le\left(\sum_h\frac{p_h^2\sigma_h^2}{n_h}\right)\left(\sum_h n_h\right). $$ Thus the variance is at least \((\sum_h p_h\sigma_h)^2/N\). Equality in Cauchy–Schwarz holds precisely when \(p_h\sigma_h/\sqrt{n_h}\) is proportional to \(\sqrt{n_h}\), or equivalently \(n_h\) is proportional to \(p_h\sigma_h\). Normalizing these allocations to sum to \(N\) gives the stated formula and attains the bound. If some \(\sigma_h=0\), that stratum’s payoff is constant almost surely and its contribution to the variance is zero; the positive-standard-deviation formula applies to the other strata, while any required minimum samples in zero-variance strata affect the feasible integer allocation. If all \(\sigma_h=0\), the estimator has zero variance for every allocation. \(\square\)

Ordinary Monte Carlo with \(N\) independent, unstratified samples has variance \(\operatorname{Var}(Y)/N\). Stratification is not guaranteed to reduce variance for every payoff and every partition: its effect depends on how much payoff variation remains within each stratum. A useful partition tends to put outcomes with similar payoffs together. In the equal-probability case with \(n\) samples in each of \(H\) strata, the total sample size is \(Hn\), and the variance is \(\sum_h\sigma_h^2/(H^2n)\).

Worked Diffusion-Option Examples

Worked Example: A Stratified Digital Option

Take \(S_0=1\), \(r=0\), \(\sigma=1\), and \(T=1\) in the geometric Brownian motion model under \(\mathbb{Q}\). Its terminal value is \(S_T=e^{Z-1/2}\), with \(Z\) standard normal. Consider the undiscounted digital payoff \(Y=\mathbf{1}_{\{S_T>1\}}\). Find a two-stratum partition that makes the stratified estimator have zero variance.

The strict event \(S_T>1\) is equivalent to \(Z>1/2\), since \(e^{Z-1/2}>1\) exactly when \(Z>1/2\). In uniform coordinates it is \(U>\Phi(1/2)\). Use the two strata \((0,\Phi(1/2)]\) and \((\Phi(1/2),1)\), with probabilities \(p_1=\Phi(1/2)\) and \(p_2=1-\Phi(1/2)=\Phi(-1/2)\). The payoff is zero throughout the first stratum and one throughout the second, apart from endpoints of probability zero. Hence \(\sigma_1^2=\sigma_2^2=0\), and for any positive sample counts the estimator equals \(0\cdot p_1+1\cdot p_2=\Phi(-1/2)\).

Check: Directly, \(\mathbb{E}[Y]=\mathbb{P}(Z>1/2)=1-\Phi(1/2)=\Phi(-1/2)\), which is the estimator value. The zero variance comes from aligning a stratum boundary with the payoff threshold; it does not imply that a general option payoff has zero variance under stratification.

Worked Example: A Stratified European Call

Continue with \(S_T=e^{Z-1/2}\), and take the at-the-money call payoff \(Y=(S_T-1)^+\), where \(x^+=\max(x,0)\). Split the uniform input into its two equal-probability halves, and take \(n\) samples in each half. Derive and compare the stratified and ordinary Monte Carlo variances.

The payoff is positive only when \(Z>1/2\), not whenever \(Z>0\). Thus it vanishes throughout the lower stratum \(Z\le0\), whose conditional variance is zero. Let \(m=\mathbb{E}[Y]\). Completing the square in the normal density gives \(\mathbb{E}[e^{Z-1/2}\mathbf{1}_{\{Z>1/2\}}]=\Phi(1/2)\). Therefore $$ m=\Phi(1/2)-\Phi(-1/2)=2\Phi(1/2)-1. $$ The upper stratum has probability \(1/2\), so its conditional mean is \(2m\).

For the second moment, expand the square only on the event where the call is positive: $$ \mathbb{E}[Y^2] =\mathbb{E}[e^{2Z-1}\mathbf{1}_{\{Z>1/2\}}] -2\mathbb{E}[e^{Z-1/2}\mathbf{1}_{\{Z>1/2\}}] +\mathbb{P}(Z>1/2). $$ The first integrand satisfies \(e^{2z-1}\phi(z)=e\phi(z-2)\), where \(\phi\) is the standard normal density. Integrating over \(z>1/2\) gives \(e\Phi(3/2)\). Hence $$ \mathbb{E}[Y^2]=e\Phi(3/2)-2\Phi(1/2)+\Phi(-1/2). $$ Using \(\Phi(1/2)\approx0.6915\), \(\Phi(3/2)\approx0.9332\), \(\Phi(-1/2)\approx0.3085\), and \(e\approx2.718\), these formulas give \(m\approx0.3829\) and \(\mathbb{E}[Y^2]\approx1.462\). The upper-stratum variance is \(2\mathbb{E}[Y^2]-(2m)^2\approx2.338\), because the lower-stratum payoff is identically zero.

The stratified estimator variance is \((1/2)^2(2.338)/n\approx0.5845/n\). The ordinary one-sample payoff variance is \(\mathbb{E}[Y^2]-m^2\approx1.316\), so \(2n\) ordinary samples have estimator variance approximately \(1.316/(2n)=0.6578/n\). At this equal total sample size, the chosen stratification reduces variance.

Check: The stratified estimator’s mean is \((1/2)(2m)+(1/2)(0)=m\), as required. Also its variance is lower than the ordinary estimate at the same budget: \(0.5845/n<0.6578/n\). The second-moment calculation uses the actual exercise event \(Z>1/2\); in particular, completing the square for \(e^{2Z-1}\) shifts the normal density by \(2\), producing \(\Phi(3/2)\).

Worked Example: Choosing Unequal Sample Counts

Worked Example: Neyman Allocation Across Three Strata

Suppose a diffusion payoff is divided into three strata with probabilities \(p_1=0.2\), \(p_2=0.3\), and \(p_3=0.5\). Suppose their within-stratum standard deviations are \(\sigma_1=1\), \(\sigma_2=2\), and \(\sigma_3=3\). For a total of \(N=23\) samples, find the variance-minimizing allocation and its variance.

The allocation weights \(p_h\sigma_h\) are \(0.2\cdot1=0.2\), \(0.3\cdot2=0.6\), and \(0.5\cdot3=1.5\). Their sum is \(2.3\), so the optimal real-valued sample counts are \(23(0.2/2.3)=2\), \(23(0.6/2.3)=6\), and \(23(1.5/2.3)=15\). These are already integers and sum to \(23\).

Substitution into the variance formula gives $$ \operatorname{Var}(\widehat\mu_{\mathrm{str}}) =\frac{0.2^2\cdot1^2}{2} +\frac{0.3^2\cdot2^2}{6} +\frac{0.5^2\cdot3^2}{15} =0.02+0.06+0.15=0.23. $$ The lower bound from the theorem is \((0.2\cdot1+0.3\cdot2+0.5\cdot3)^2/23=2.3^2/23=0.23\), so the allocation attains it.

Check: The allocation gives the largest stratum with the largest within-stratum standard deviation the most samples: \(15\) in stratum 3, compared with \(6\) and \(2\) in strata 2 and 1. The bound and direct variance calculation agree exactly.

Practical Choices and Common Pitfalls

For a payoff depending on a simulated path, one may stratify a selected normal input and generate the remaining independent inputs as usual. For example, in a time-discretized SDE, Brownian increments are generated from standard normal variables; a chosen normal variable can be transformed to a uniform input and divided into intervals. The resulting payoff distribution within each stratum determines \(\sigma_h^2\). The variance theorem concerns the actual payoff being simulated, including any time-discretization error; stratification addresses sampling variance, not discretization bias.

Optimal allocation requires the within-stratum standard deviations, which are usually not known in advance. A preliminary pilot simulation can estimate them, after which the remaining samples can be allocated approximately in proportion to \(p_h\sigma_h\). Integer rounding can prevent exact attainment of the continuous optimum. For practical estimation, keep at least one sample in each stratum whose contribution is not already known, and account for the pilot samples consistently in the final estimator.

Common mistake: A payoff’s exercise event must be used when computing conditional moments. For the call above, writing \(\mathbb{E}[(e^{Z-1/2}-1)\mathbf{1}_{\{Z>0\}}]\) does not compute its mean: on \(0<Z\le1/2\), the call payoff is zero, even though the expression inside that expectation is negative. The correct expression is \(\mathbb{E}[(e^{Z-1/2}-1)\mathbf{1}_{\{Z>1/2\}}]\). Likewise, the squared payoff must be integrated over \(Z>1/2\), and completing the square in the \(e^{2Z-1}\) term shifts the normal density by \(2\). Keeping the payoff’s actual positive-event threshold and the shift in each exponential term separate prevents both errors.

Check Your Understanding

Use the variance formula and pay careful attention to the event defining each payoff.

  1. For a two-stratum estimator with probabilities \(p_1=1/3\), \(p_2=2/3\), conditional variances \(\sigma_1^2=4\), \(\sigma_2^2=1\), and sample counts \(n_1=2\), \(n_2=4\), compute its variance.
  2. Explain why a digital payoff can have zero stratified variance when a stratum boundary is placed at its threshold, and why the same need not hold for a call payoff.
  3. For \(Y=(e^{Z-1/2}-1)^+\), state the strict inequality defining the event on which the payoff is positive.
  4. With \(p_1=1/4\), \(p_2=3/4\), and conditional standard deviations \(2\) and \(1\), find the optimal real-valued sample allocation when \(N=20\).
  5. State which source of error stratification reduces and which source of error it does not, when the payoff is produced by a time-discretized SDE simulation.