Your stock simulation uses the exact geometric Brownian motion transition. The vanilla call matches Black–Scholes. You increase the number of paths to one million. Yet your continuously monitored knock-out is still too expensive. The problem can be the space between observations: a price can cross the barrier and return before the next simulated close.
We will price the same terminal call payoff with two different monitoring rules. With 252 checks over one year, our Python experiment produces a difference of about 3%. More paths make that difference more precisely measured; they do not remove it.
First define the contract
Take a European down-and-out call with spot 100, strike 100, lower barrier 90 and one year to expiry. The continuously compounded risk-free rate is 3%, volatility is 20%, and there are no dividends or rebates. Under the risk-neutral measure, the stock follows constant-coefficient geometric Brownian motion. Touching the barrier knocks the option out.
For the continuous contract, the payoff is
only if the stock stays strictly above 90 throughout the entire year. For the discrete contract, it needs to be above 90 only at the specified observation times. In this experiment those times are equally spaced, including maturity.
Checking daily is not inherently wrong. It is correct for a contract monitored at those daily dates. It overprices this no-rebate knock-out when used as a substitute for continuous monitoring. On every complete path, continuous survival implies survival at the sampled dates, while the converse can fail.
Exact endpoints do not give an exact minimum
Our geometric Brownian motion simulation generates exact prices at chosen times. That removes an SDE time-stepping error at those endpoints. It does not reveal the minimum attained between them.
For example, two observations at 91 are both above the barrier at 90. Joining them with a straight line would show no breach. A diffusion bridge connecting them can dip below 90 and recover. A vanilla call only needs the terminal price; a continuously monitored barrier also needs information about the intervening path.
The Brownian bridge survival weight
Work with log-distance to the barrier,
. Under our assumptions,
has constant drift
and diffusion coefficient
. Conditional on two positive endpoint values
and
separated by
, the probability of touching zero between them is:
![]()
![]()
If either endpoint is at or below zero, set
. The constant drift drops out of the conditional bridge law; it still affects how the endpoints are sampled. Given all grid values, the bridge segments are conditionally independent. Their survival probabilities can therefore be multiplied. This is the single-barrier Brownian-bridge construction discussed in the technical references below.
![]()
![]()
Here
is the conditional survival probability on interval
,
is the survival weight for the whole grid, and
is one discounted sample value.
We average these sample values instead of inventing a particular between-close trajectory. For this terminal payoff, fixed barrier and constant-coefficient GBM, the weighting is an exact conditional expectation, not a small-step approximation. Sampling uncertainty remains. The same formula is not generally exact under stochastic volatility, local volatility or jumps.
A reproducible Python comparison
The code keeps only the current log-price and two survival records, rather than allocating a million-by-252 path matrix. The grid-only and bridge-weighted estimates use the same endpoints within each run. NumPy is the only dependency.
import numpy as np
S0, K, B = 100.0, 100.0, 90.0
r, sigma, T = 0.03, 0.20, 1.0
def price_barrier(steps, paths=1_000_000, seed=11):
rng = np.random.default_rng(seed)
dt = T / steps
x = np.full(paths, np.log(S0 / B))
alive = np.ones(paths, dtype=bool)
survival = np.ones(paths)
for _ in range(steps):
y = x + (r - 0.5*sigma**2)*dt
y = y + sigma*np.sqrt(dt)*rng.standard_normal(paths)
above = (x > 0) & (y > 0)
step_survival = np.zeros(paths)
step_survival[above] = -np.expm1(
-2*x[above]*y[above] / (sigma**2*dt)
)
survival *= step_survival
alive &= y > 0
x = y
payoff = np.exp(-r*T)*np.maximum(B*np.exp(x) - K, 0)
discrete = payoff*alive
continuous = payoff*survival
gap = discrete - continuous
assert np.all((survival >= 0) & (survival <= 1))
assert np.all(gap >= -1e-12)
def estimate(values):
return values.mean(), values.std(ddof=1)/np.sqrt(paths)
return estimate(discrete), estimate(continuous), estimate(gap)
for steps in (12, 52, 252):
estimates = price_barrier(steps)
print(steps, [(round(v, 4), round(se, 4))
for v, se in estimates])
Here are the results from running that code. Every “±” is one estimated Monte Carlo standard error, not a 95% confidence interval. Each row uses one million simulated paths.
| Checks per year | Grid-only price | Bridge-weighted price | Paired difference |
|---|---|---|---|
| 12 | 8.6082 ± 0.0141 | 7.7634 ± 0.0137 | 0.8447 ± 0.0034 |
| 52 | 8.1844 ± 0.0140 | 7.7200 ± 0.0137 | 0.4644 ± 0.0027 |
| 252 | 7.9684 ± 0.0140 | 7.7372 ± 0.0139 | 0.2312 ± 0.0020 |
At 252 checks, the paired gap is 0.2312 per unit of underlying, about 2.99% of the bridge-weighted estimate. Its standard error is only 0.0020. We calculate that uncertainty from the path-by-path differences: adding the two individual price variances would ignore their strong dependence.
The bridge estimates fluctuate around the same continuous-contract value as we change the grid. They need not move monotonically: the runs generate different endpoints. The grid-only estimates target different discretely monitored contracts. Increasing the number of paths at a fixed grid would estimate those contracts more accurately, without turning them into the continuous one.
What to check before trusting the result
Use log-distances. In the exponential,
and
mean
, not
. Substituting price distances changes the probability. The code uses -np.expm1(-a) to evaluate
accurately when
is small.
Keep a breached path knocked out. Once survival reaches zero, multiplying by later interval probabilities must leave it at zero. Recovery in the stock price does not reactivate a knock-out. The separate Boolean record does the same job for the discrete contract.
Check the ordering on matched samples. Our bridge-weighted payoff cannot exceed the grid-only payoff. The second assertion checks that property for every simulated path, rather than relying on two noisy averages.
Match the legal observation convention. “Daily” can mean specified business-day fixing times, not equally spaced fractions of a year. Rebates, observation windows and moving barriers require their own treatment. In particular, a rebate paid at the hitting time needs more information than the terminal survival weight used here.
An exercise: remove almost the entire grid
Try price_barrier(1). In this particular model, one bridge from today to expiry is enough to integrate out the continuous-barrier survival event conditional on the terminal price. The grid-only calculation then checks only maturity, while the weighted calculation still targets the continuous contract.
This is a useful interview question: what information does the payoff actually require, and can some of it be integrated out? For an Asian payoff or a model with state-dependent volatility, the one-step shortcut above does not automatically carry over.
Where this fits in stochastic calculus
The bridge correction combines conditional expectation, Brownian motion and the log transformation obtained through Itô’s formula. The Stochastic Calculus for Finance with Python course develops those foundations through derivations and executable notebooks, then connects them to SDE simulation and derivative pricing.
For a complementary implementation check, see why a Monte Carlo pricer may not match Black–Scholes. Getting the vanilla benchmark right is a useful first test; the barrier experiment adds a separate test of path monitoring.
Technical references
Casella, B. and Roberts, G. O. (2007 working paper), Exact Monte Carlo Simulation of Killed Diffusions. Background on barrier crossing and conditional Monte Carlo.
Broadie, M., Glasserman, P. and Kou, S. G. (1997), A Continuity Correction for Discrete Barrier Options, Mathematical Finance, 7(4), 325–348. Their barrier-shift approximation is a different technique from the conditional survival weighting implemented here.
Get the Quant Reference Card — four pages covering stochastic calculus, measure change, the models you’ll meet, discretisation, rates, credit and XVA. Free.