You can spend more time generating Monte Carlo paths, or ask whether those paths cover the input space well. Quasi-Monte Carlo takes the second approach.
For the European call in this article, 32 scrambled Sobol runs with 4,096 points each give an estimated standard error of 0.000440. Ordinary Monte Carlo, with the same number of payoff evaluations, gives 0.045649. That is about 104 times larger in this particular experiment.
The interesting part is not just replacing a random-number generator. It is understanding what changed, how to measure the uncertainty, and why the same improvement is not guaranteed for every derivative.
From a price expectation to a unit-cube integral
A simulation can be viewed as a deterministic function of uniform inputs. Transform those inputs into shocks, construct the market state and evaluate the discounted payoff. The resulting price is an integral:
![]()
Ordinary Monte Carlo uses independent uniform points. A Sobol sequence places points in a structured, space-filling pattern. Scrambling randomises the pattern while retaining its useful balance properties.
The dimension
counts the inputs used by your simulation, not the number of paths. A terminal European payoff under exact constant-parameter GBM only needs one normal draw. Simulating 252 daily steps for that payoff introduces dimensions you do not need.
Our GBM simulation article explains the terminal-price shortcut. For a path-dependent contract, such as an arithmetic Asian option, the intermediate values really do matter.
The error bar needs independent scrambles
Within one Sobol run, the points are dependent by design. The usual standard deviation of payoffs divided by the square root of the number of points is therefore not a valid IID standard-error calculation for that run.
Instead, make
independently scrambled runs. Each produces a price estimate
using
points. Average these estimates and measure their dispersion:
![Rendered by QuickLaTeX.com \[\overline V=\frac1R\sum_{j=1}^{R}\widehat V_j,\]](https://quantmechanicslab.com/wp-content/ql-cache/quicklatex.com-7029e807030b00ce09f86b861520e8f5_l3.png)
![Rendered by QuickLaTeX.com \[s_{\mathrm{rep}}^2=\frac1{R-1}\sum_{j=1}^{R}(\widehat V_j-\overline V)^2,\]](https://quantmechanicslab.com/wp-content/ql-cache/quicklatex.com-2c820234a119627f4dd272520da6533d_l3.png)
![]()
These error bars describe the average of all
runs, whose total cost is
payoff evaluations. They do not describe a single run costing only
. Reusing the same scramble seed would reproduce the same points and defeat the replication.
A confidence interval based on replicate estimates is an approximation, not a deterministic error bound. More independent scrambles help assess the uncertainty estimate itself.
Python: compare at the same payoff-evaluation budget
We price a one-year call with
,
,
and no dividends. Its Black–Scholes price is 9.413403, so we can check the numerical result against a known answer.
The code uses NumPy and SciPy 1.15 or newer, including the rng argument to qmc.Sobol. It was run with NumPy 2.3.5 and SciPy 1.17.0. Each replicate gets its own random stream.
import numpy as np
from scipy.special import ndtr, ndtri
from scipy.stats import qmc
S0, K, r, sigma, T = 100.0, 100.0, 0.03, 0.20, 1.0
R = 32
m_values = (10, 12, 14)
streams = iter(np.random.SeedSequence(2026).spawn(2 * R * len(m_values)))
def discounted_payoff(z):
st = S0 * np.exp((r - 0.5 * sigma**2) * T
+ sigma * np.sqrt(T) * z)
return np.exp(-r * T) * np.maximum(st - K, 0.0)
def summary(estimates):
estimates = np.asarray(estimates)
return estimates.mean(), estimates.std(ddof=1) / np.sqrt(len(estimates))
d1 = (np.log(S0 / K) + (r + 0.5 * sigma**2) * T) / (sigma * np.sqrt(T))
d2 = d1 - sigma * np.sqrt(T)
exact = S0 * ndtr(d1) - K * np.exp(-r * T) * ndtr(d2)
print(f"Black-Scholes price: {exact:.6f}")
print("points/rep method pooled price SE of pooled price")
for m in m_values:
n = 2**m
mc, rqmc = [], []
for _ in range(R):
rng_mc = np.random.default_rng(next(streams))
mc.append(discounted_payoff(rng_mc.standard_normal(n)).mean())
engine = qmc.Sobol(d=1, scramble=True,
rng=np.random.default_rng(next(streams)))
u = engine.random_base2(m)[:, 0]
# Keep every Sobol point; guard inverse-normal endpoints.
eps = np.finfo(float).eps
z = ndtri(np.clip(u, eps, 1.0 - eps))
rqmc.append(discounted_payoff(z).mean())
for method, estimates in (("MC", mc), ("RQMC", rqmc)):
price, se = summary(estimates)
print(f"{n:<11d} {method:<6s} {price:.6f} {se:.6f}")
Both methods use the same model and payoff. MC draws independent standard normals directly; RQMC transforms scrambled uniform points with the inverse normal distribution. The tiny endpoint clip prevents infinite inverse-normal values without dropping any point. It introduces a negligible tail modification for this example, not a general solution to singular integrands.
| Points per run | Method | Mean price | SE |
|---|---|---|---|
| 1,024 | MC | 9.484614 | 0.086441 |
| 1,024 | RQMC | 9.414605 | 0.002362 |
| 4,096 | MC | 9.379080 | 0.045649 |
| 4,096 | RQMC | 9.413286 | 0.000440 |
| 16,384 | MC | 9.402177 | 0.018260 |
| 16,384 | RQMC | 9.413295 | 0.000083 |
Every row averages 32 independent runs. For example, each 4,096-point row costs 131,072 payoff evaluations. The comparison is about precision at equal evaluation counts, not measured wall-clock speed.
At that budget the RQMC price is 9.413286, versus the analytic 9.413403. The very small difference in one seeded experiment is useful evidence, but it is not a promise of the same error on the next problem. The standard errors across independent replicates are the more informative comparison.
Three Sobol choices that matter
Use a power of two. With a fresh engine, random_base2(m) draws
points. Arbitrary sample counts, thinning the sequence or skipping its first point can lose its balance properties. Increase the power of two when you need a larger run.
Scramble and replicate. Setting scramble=True permits independent randomisations for uncertainty estimation. The number of replicates need not itself be a power of two.
Keep the point structure intact. A Sobol point is a complete vector of inputs for one path. For a 12-date, one-factor construction, use dimension 12 and transform each row into that path’s shocks. Do not flatten the array and regroup it into unrelated chunks.
Why the one-dimensional result is only a starting point
This call is a deliberately simple benchmark. One coordinate determines the payoff, so it is a favourable case for QMC. A multi-asset, path-dependent payoff may spread its sensitivity over many inputs, and discontinuous exercise or barrier conditions can make integration harder.
For path simulations, Brownian-bridge construction or principal-component constructions can concentrate important variation in earlier coordinates. Whether that helps depends on the payoff. Compare alternative path constructions with independent scrambles and equal evaluation budgets.
Brownian-bridge path construction here is a different use of the bridge from the between-date barrier-crossing correction in our barrier article. One changes how input coordinates build a path; the other accounts for unobserved crossings between sampled endpoints.
Do not attach a universal convergence rate to the word “Sobol.” Smoothness, effective dimension and the transformation from uniforms all matter. An inverse-normal map is unbounded at the endpoints, and an option payoff has a kink. A slogan about faster convergence is not an error analysis for your implementation.
Where to try it in your own pricer
First reproduce the call benchmark. Then replace only the path/payoff mapping with your target contract. Preserve independent scrambles and report both the number of points per run and the number of runs. Compare replicate standard errors at several powers of two.
For a useful next experiment, try a monthly monitored arithmetic Asian call. Compare chronological normal increments with a Brownian-bridge path construction. Keep the monitoring dates fixed: changing the contract’s observation schedule is not a variance-reduction technique.
For the stochastic-process foundations, explore our Stochastic Calculus module. To put Sobol alongside other tools, continue with Variance Reduction in Monte Carlo: Which Technique When?
Technical references
SciPy, scipy.stats.qmc.Sobol documentation, for the generator and sampling requirements. Owen, A. B., Practical Quasi-Monte Carlo Integration (2023), for randomized QMC and replication-based error estimation. The code, benchmark and numerical results above are our own.
Get the Quant Reference Card — four pages covering stochastic calculus, measure change, the models you’ll meet, discretisation, rates, credit and XVA. Free.