The problem on the desk
You mark 45 implied vols: 1M, 3M, 6M, 1Y and 2Y, from roughly the 5-delta put to the 5-delta call. Risk, PnL explain and every exotic need prices between those marks and a little beyond them, with stable Greeks. Any surface you build must not contain static arbitrage, or someone will trade against it:
| Condition | In maths | On the desk |
|---|---|---|
| Call spreads | \(-e^{-rT}\le \partial C/\partial K\le 0\) | A call spread costs between zero and the discounted strike width. |
| Butterflies | \(\partial^2 C/\partial K^2\ge 0\) | Every butterfly has a non-negative price: the risk-neutral density is never negative. |
| Calendars | \(\partial C/\partial T\ge 0\) at fixed \(K/F\) | A longer-dated option at the same forward moneyness is worth at least as much. |
What a DC-PINN does
A small neural network outputs the call price \(C(K,T)\) for every strike and expiry. It is trained on one loss with four parts, exactly as in the paper:
- Data: match the marks.
- Physics: satisfy Dupire’s equation, the PDE every arbitrage-free call surface obeys under the model, at a few hundred points between the marks.
- Boundaries: payoff at expiry, deep in-the-money and far out-of-the-money limits.
- Derivative constraints: a one-sided penalty \([h]_+^2\) whenever a call spread, butterfly or calendar condition is broken anywhere on the grid. This is the “DC” in DC-PINN.
The weights of the four parts are not hand-tuned: they adapt during training from the size of each part’s gradient, and constraint points that keep failing get more weight. Strikes and expiries enter the network as derivatives through automatic differentiation, so the same network gives prices, Greeks and the density with no finite differences.
How to read this page
- Pick a case. Black–Scholes is the sanity check: the answer is the closed-form price at one vol. Equity skew has a skew and smile, priced by a high-resolution finite-difference solver.
- Press Train. Two networks of identical size see the same noisy marks: a plain neural fit (data only) and the DC-PINN.
- Read the cards below, then the tabs: Smiles for vol errors, No-arbitrage for where each surface breaks, Greeks for delta, gamma and a priced ticket.
Strike as a percentage of the forward. Dots are the noisy marks; the black line is the true smile.
Positive means the surface is too expensive. The shaded band is ± the noise level on the marks.
Each surface is checked with its exact strike and maturity derivatives on a grid of 26 maturities from 2 weeks to 2 years × 51 strikes from about the 1-delta put to the 1-delta call. A point fails if a call spread, butterfly or calendar condition is broken beyond a tiny tolerance.
Wherever a curve dips below zero, a butterfly there has negative value: free money.
Price a ticket
Puts come from put–call parity on the same surface. Delta and gamma are with respect to spot; gamma is the change in delta for a 1% spot move.
Data, boundary, PDE residual and derivative-constraint terms (log scale). The vertical rule marks the switch from Adam to L-BFGS.
Updated every 100 Adam steps from the mean gradient magnitude of each term, then frozen for L-BFGS.
Forward coordinates
With discount factor \(D_T=e^{-rT}\) and forward \(F_T=S_0e^{(r-q)T}\), write the call as \(C=D_TF_T\,c(\kappa,T)\) with \(\kappa=K/F_T\). Rates and dividends drop out and Dupire’s equation becomes
$$\partial_T c=\tfrac12\,\sigma_{\rm LV}^2(\kappa,T)\,\kappa^2\,\partial_{\kappa\kappa}c,\qquad c(\kappa,0)=(1-\kappa)^+.$$For Black–Scholes \(\sigma_{\rm LV}=\sigma_0\) and \(c=N(d_1)-\kappa N(d_2)\). Static no-arbitrage is \(-1\le\partial_\kappa c\le0\), \(\partial_{\kappa\kappa}c\ge0\) and \(\partial_Tc\ge0\).
The DC-PINN loss
As in the paper, \(\mathcal L=\lambda_0\hat{\mathcal L}_0+\lambda_f\hat{\mathcal L}_f+\lambda_b\hat{\mathcal L}_b+\lambda_h\hat{\mathcal L}_h\), with data, PDE-residual, boundary and inequality terms. The inequality term is the one-sided penalty
$$\hat{\mathcal L}_h=\frac1{N_h}\big\|m_h\,[h(\kappa,T)]_+\big\|_2^2,\qquad h\in\{\partial_\kappa c,\;-1-\partial_\kappa c,\;-\partial_{\kappa\kappa}c,\;-\partial_Tc\}.$$Every 100 Adam steps the category weights move toward \(\lambda_\chi=\tfrac1n\sum_{\chi'}\bar\alpha_{\chi'}/\bar\alpha_\chi\), where \(\bar\alpha_\chi\) is the mean absolute gradient of term \(\chi\) (moving average 0.9, clipped to [0.1, 10]). Every 10 steps the point weights \(m_h\) of violated constraints grow in proportion to their squared violation, normalised to mean one. Two choices differ from the paper, for this setting: point weights are not adapted on the marks, because up-weighting the worst-fitted marks means chasing their noise; and the paper’s Algorithm 1 adds the gradient ratio to λ, while we use a bounded moving average.
Network and parametrisation
Inputs are standardised moneyness \(\xi=\ln\kappa/\sqrt T\) and \(s=\sqrt T\); a 2 × 20 tanh network outputs a correction \(N_\theta\). The price is
$$c=s\,\big[G_{\rm BS}(\xi,s)+\varphi(d_1)\,N_\theta(\xi,s)\big],$$where \(sG_{\rm BS}\) is Black–Scholes priced at the Berestycki–Busca–Florent short-maturity implied vol (the harmonic mean of local vol between the forward and the strike), and \(\varphi(d_1)\) is its vega shape, so \(N_\theta\) reads as an implied-vol correction. This backbone is what lets a network this small reach a few hundredths of a vol point in seconds; the network learns what the approximation misses and absorbs the marks. The plain neural fit uses the same parametrisation, so the comparison isolates the physics and the constraints. Strike and maturity derivatives are propagated exactly through the network; gradients with respect to the weights match finite differences to about \(10^{-10}\).
Training and reference
Residuals are scaled by \(1/(e^{-z^2/2}+0.1)\), \(z\) the standardised moneyness, so the loss counts errors roughly in vol points across the smile. Adam (learning rate 3·10⁻³, decaying) then L-BFGS (memory 20, Armijo backtracking), with 192 collocation points used for both the PDE and the constraints. The skew reference solves Dupire’s equation by Crank–Nicolson on 3,201 log-strike nodes with Rannacher start-up; on the Black–Scholes case it matches the closed form to within 0.004 vol points over the displayed range.
Links
- K. Hoshisashi, C. E. Phelan, P. Barucca, Physics-Informed Neural Networks for Solving Derivative-Constrained PDEs (2026).
- Kentaro Hoshisashi’s Whack-a-mole Online Learning (WamOL) for real-time implied-vol surface calibration with no-arbitrage and PDE constraints.
- Product co-development: Neatryx.