Interactive model — experiment with these parameters in sItô

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 runClosed 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.151.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.

Finite-difference sensitivities of a discontinuous digital indicator showing a 50-unit spike in d/dt at t = 0 and flattened parameter Greeks Finite-difference sensitivities of a discontinuous digital indicator showing a 50-unit spike in d/dt at t = 0 and flattened parameter Greeks
Greeks of the discontinuous indicator payoff $\mathbf{1}_{\{X_t > K\}}$: because pathwise derivatives vanish identically away from the jump, sItô falls back to finite differences across common random numbers, leaving d/dt spiking to $50$ near $t = 0$. Open digital indicator Greeks in sItô ↗
Smooth pathwise AD sensitivity curves for a call spread approximation of a digital option with Δ ≈ +0.02, ∂/∂r ≈ +1.5, and ∂/∂σ ≈ -0.5 Smooth pathwise AD sensitivity curves for a call spread approximation of a digital option with Δ ≈ +0.02, ∂/∂r ≈ +1.5, and ∂/∂σ ≈ -0.5
Replacing the indicator jump with a narrow Lipschitz call spread ($\varepsilon = 2$) restores automatic pathwise differentiation: delta ($\partial/\partial x_0 \approx +0.021$, red), vega ($\partial/\partial\sigma \approx -0.51$, green), and rho ($\partial/\partial r \approx +1.5$, amber) track smoothly over time. Open call-spread pathwise AD 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:

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$)ValueDelta $\frac{\partial C}{\partial S_0}$Vega $\frac{\partial C}{\partial \sigma}$Rho $\frac{\partial C}{\partial r}$
Closed form0.50470.0193−0.4831.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.