Pathwise differentiation commutes the derivative inside the expectation, which requires the payoff to be Lipschitz continuous [1, 2]. An undiscounted digital payoff $\mathbf{1}_{\{S_T > K\}}$ is locally constant everywhere except at the jump $S_T = K$, so its pathwise derivative is identically zero on every path, missing the true Black–Scholes delta $\frac{\varphi(d_2)}{S_0\sigma\sqrt{T}} = 0.0199$ (for $S_0 = K = 100, r = 3\%, \sigma = 20\%, T = 1$).
How sItô handles step payoffs
Writing the indicator inside statistics versus inside transform produces two distinct behaviors:
- In
statistics(mean of an indicator): sItô computes the probability and switches sensitivities automatically to common-random-number finite differences (Derivatives (finite difference)), bumping each input symmetrically with identical Brownian draws. - In
transform($Y = \mathbf{1}_{\{x > k\}}$): Refused before running, because transforms apply Itô’s lemma and require symbolic differentiability.
| Metric ($S_0 = K = 100, r = 3\%, \sigma = 20\%, T = 1$) | Finite-difference run | Closed form |
|---|---|---|
| Value $\mathbb{P}(S_1 > K)$ | 0.527 (SE $5 \times 10^{-3}$) | 0.5199 |
| Delta $\frac{\partial P}{\partial S_0}$ | 0.0216 (SE $1.4 \times 10^{-3}$) | 0.0199 |
| Vega $\frac{\partial P}{\partial \sigma}$ | −0.495 | −0.498 |
| Rho $\frac{\partial P}{\partial r}$ | 2.15 | 1.99 |
| Strike sensitivity $\frac{\partial P}{\partial K}$ | −0.0215 | −0.0199 |
Finite-difference estimates are noisy here because small bumps flip only a tiny fraction of paths across the strike, yet they avoid the zero-estimator failure.

d/dt spiking to $50$ near $t = 0$. Open digital indicator Greeks in sItô ↗

Run this in sItô
Open sItô with this model pre-loaded to inspect the path distribution, summary statistics, and parameter sensitivities—or change any setting and rerun:
- Open digital probability $\mathbb{P}(S_T > K)$ in sItô ↗ (finite-difference Greeks).
- Open indicator in
transform(refused example) in sItô ↗. - Open smoothed call spread ($\varepsilon = 2$) in sItô ↗.
- Open manual bump baseline ($S_0 = 100$, seed 42) in sItô ↗.
- Open manual bump ($S_0 = 101$, seed 42) in sItô ↗.
Call-spread smoothing and manual bumping
Replacing the step by a narrow call spread
$$ \frac{\max(S_T - K + \varepsilon, 0) - \max(S_T - K - \varepsilon, 0)}{2\varepsilon} $$creates a Lipschitz payoff that converges to the digital as $\varepsilon \to 0$ and restores pathwise differentiation in a single pass. Alternatively, bumping $S_0$ from $100$ to $101$ with a fixed seed ($42$) directly recovers the difference $0.5487 - 0.5268 = 0.0219$ (SE $1.4 \times 10^{-3}$, against exact $0.0198$):
| Discounted call spread ($\varepsilon = 2$) | Value | Delta $\frac{\partial C}{\partial S_0}$ | Vega $\frac{\partial C}{\partial \sigma}$ | Rho $\frac{\partial C}{\partial r}$ |
|---|---|---|---|---|
| Closed form | 0.5047 | 0.0193 | −0.483 | 1.43 |
| Pathwise simulation (SE) | 0.511 ($5 \times 10^{-3}$) | 0.0206 ($7 \times 10^{-4}$) | −0.51 ($1.8 \times 10^{-2}$) | 1.55 (0.07) |
Narrowing $\varepsilon$ reduces smoothing bias at the cost of higher sampling variance. For details on when sItô switches between pathwise AD and bumping, see Parameter sensitivities in sItô, Common random numbers, Black–Scholes by simulation, Compiling parametric SDEs into fast Monte Carlo simulations, and measured sensitivity costs.
Related notes: Delta hedging with discrete rebalancing.