Basic Prerequisites: Black–Scholes–Merton and Numerical Methods. (these are the folder-level prerequisites for pages 02–06; page 01 states its own, smaller, entry requirements)


1. Intuition & Practical Objective

Black–Scholes–Merton is a replication theory: if you can trade the underlying continuously, the option’s payoff is spanned, its price is unique, and the hedge is an equation you solve. Every classical result downstream - no-arbitrage pricing, the PDE, the Greeks - inherits that premise. Deep hedging is what is left when you drop it. Once the market is incomplete (transaction costs, jumps, a stochastic-vol factor you cannot trade, a discrete rebalancing calendar, a hedging instrument set that is smaller than the state space), there is no replicating portfolio. The hedge stops being a solution and becomes a decision: choose the strategy that makes the residual risk smallest under some measure of “risk”.

The one-sentence essence:

Replace “replicate the payoff” with “minimise a convex risk measure of the hedging residual”; the resulting stochastic-control problem is solved in closed form by a quadratic BSDE only in the exponential-utility (entropic) case, and by neural networks in general - which is exactly the split between the tractable BSDE world (Pardoux–Peng, nonlinear Feynman–Kac, Deep BSDE, Deep Galerkin) and the purely numerical world (Deep Hedging).

Three structural facts make the folder cohere:

  1. Incompleteness ⇒ a residual, and a residual needs a risk measure. The Fundamental Theorems of Asset Pricing say completeness ⇔ a unique martingale measure (No-Arb · 04 Fundamental Theorems). Drop completeness and the price is no longer unique; what replaces it is a preference, encoded as a convex risk measure. The whole field is a study of which preferences are computable.
  2. The computable case is the BSDE. For the entropic risk measure the hedging problem is equivalent to a backward SDE with a quadratic driver, Y_t = ξ − ∫_t^T ½|Z_s|² ds − ∫_t^T Z_s dW_s, whose solution is Y_t = −ln E[e^{−ξ}|F_t]. That single equation ties together: exponential-utility indifference pricing, the nonlinear Feynman–Kac PDE, the Deep BSDE solver, and (to leading order) mean-variance hedging - Y_0 ≈ E[ξ] − ½γ Var(ξ).
  3. The general case is a learning problem. For CVaR and other non-entropic convex measures there is no PDE/BSDE representation, so the strategy is parametrised (piecewise-constant in time, a neural net in the state) and trained by stochastic gradient descent on the risk-measure objective. This is Buehler–Gonon–Teichmann–Wood’s Deep Hedging.

This folder is a hub: (a) the fast formula lookup below, and (b) six sub-pages - from the incompleteness intuition, through the convex-risk framing and the BSDE backbone, into the Deep BSDE / Deep Galerkin solvers, and then the honest failure modes and frontier extensions.


2. Mathematical Ground Truth & Derivations

Notation. spot, strike, maturity, , a -dimensional Brownian motion on , the liability payoff (a contract the desk has sold), the premium received, the number of shares held, a convex risk measure, a risk-aversion coefficient, a CVaR confidence level, the BSDE value and control (in finance, is the hedge ratio in the diffusive scale), the generator of the forward diffusion.

Quick-Reference Lookup (job #1). Every formula below is standard and every number in the check column was re-executed in §3 or the sub-pages (stdlib-only Python, fixed seeds).

QuantityFormulaVerified check
Convex risk measuremonotone ; cash-additive ; convex objective convex in ⇒ SGD is a convex problem (ES · 03)
Entropic risk measure: for vs (, s.e. –)
CVaR (Rockafellar–Uryasev): at vs
Robust representation; for CVaR, the source of the distributionally-robust hedge of §06
Deep-hedging objective (Buehler et al. 2019)risk-measure choice moves the optimum: (variance), (CVaR 97.5%), (entropic )
Incompleteness3-state/2-instrument market: , SD ; adding one option drives it to
Variance-optimal (quadratic) hedge, residual variance Föllmer–Sondermann 1986; the limit of the table below
BSDE (Pardoux–Peng) holds identically; comes from the martingale representation theorem
BSDE existence, Lipschitz in uniformly in , unique not applicable to the quadratic driver $f=-\tfrac12
Nonlinear Feynman–Kac, ; then , max residual over 3000 collocation points (§03 check A)
Quadratic driver ⇒ entropic transform is a martingale, so exact closed form in §03; check C: Gaussian gives
Exact quadratic-BSDE example, : , satisfies to ; ,
Entropic ⇒ mean–variance limitthis is why quadratic hedging is the small-risk-aversion limit of the deep-hedging objective
LSMC / regression BSDE (regression on a basis of ); backward induction on the linear BSDE: vs BSM ; vs
Deep BSDE loss (E–Han–Jentzen), , loss ; (BSM ); (BSM )
Deep Galerkin loss (Sirignano–Spiliopoulos)one-parameter class BS: true , residual loss
Discrete-hedging error law (Boyle–Emanuel / Bertsimas–Kogan–Lo) for – rebalances - flat to
Cost-aware rebalancingoptimum at rebalances for bp; below -improvement is eaten by cost
Leland correction: (vs ) at ; cuts cost and CVaR , leaves SD slightly worse ()
Model risk of a learned hedgehedge written under , run in a world with written at , run at : residual SD ,
Robust (min–max) hedge: (= the delta), worst-case SD vs for the delta
Comparison theorem pointwise and a.s.the monotonicity that makes -expectations well defined
-expectation of the BSDE with driver ; is sublinear iff is convex in recovers the entropic case; recovers

Critical caveat (stated up front, quantified in 05 · Failure Modes & Practice). “Deep hedging” is a data-driven method applied to a model-driven problem: the optimal strategy is learned under the model you simulate. If the simulated dynamics are wrong, the network learns the wrong hedge - and unlike a vanillas-calibrated model, there is no price to arbitrage-check it against. The verified number above ( residual SD from a single vol misspecification) is the honest size of that exposure; it is the central practical caveat of the whole field.


3. Computational Implementation - the BSDE engine

Stdlib only (math, random) - no numpy, no PyTorch. The folder runs on two primitives: a small linear least-squares solver (normal equations + Gaussian elimination) and the backward-induction LSMC recursion for a BSDE. Everything in §2 and in the sub-pages is produced by these.

Why this is the right first engine. With driver the BSDE collapses to and is the martingale-representation density - precisely the object a delta hedge is built from: . So the engine is a Black–Scholes replicator written as a BSDE, and the table above is the validation: the price is recovered to ( vs ) and the hedge to ( vs ). Two lessons are already visible at the hub level:

  • is cheap, is expensive. The price comes out essentially exactly with a quadratic-in- regressor, while the hedge carries standard deviation across seeds even at 40 000 paths. This is the numerical asymmetry of BSDEs - the value functional is smooth, the control is not - and it recurs in every method in the folder (LSMC, Deep BSDE, reinforcement learning).
  • Everything downstream keeps the same skeleton. In §02 the driver becomes the risk measure; in §03 it becomes a quadratic ; in §04 the recursion is turned into a forward pass with a trainable -net. The code above is the special case of all of them.

4. Failure Modes & First-Principles Breakdowns

Hub signposts - the folder’s full failure-mode analysis lives in 05 · Failure Modes & Practice. In one line each:

  1. There is no “true” deep-hedging answer to check against. Unlike a vanilla pricer, the output is a strategy under an assumed dynamics, and no market price validates it. The residual-SD blow-up from a single vol misspecification (§2) is the honest size of the model risk.
  2. Training is unstable and seed-dependent. The same loss and the same data diverge at and explode at while converging at (§05). A trained hedge is a numerical artifact, not a formula.
  3. The learned hedge is uninterpretable and un-auditable. There is no delta, no gamma, no vega to reconcile against the risk system. The last-mile problem of deep hedging is that a trading desk cannot sign off on a strategy it cannot explain.
  4. The -estimate is systematically noisier than the -estimate. Even the textbook LSMC scheme recovers the price to while the hedge wanders in the range; the method’s error budget is dominated by the control, not the value.
  5. More rebalancing is not better. Hedging error falls as while cost falls far more slowly, so the cost-aware optimum is a finite number of rebalances ( dates at bp, §05), and the classical Leland correction buys tail-risk and cost relief, not variance relief (§06).
  6. Incompleteness is a structural statement, not a numerical one. No amount of machine learning closes a residual that exists because the payoff is not spanned; the neural net only redistributes the residual optimally under the chosen risk measure.

5. References

  • Buehler, H., Gonon, L., Teichmann, J., Wood, B. (2019), Deep Hedging, Quantitative Finance 19(8), 1271–1291
  • Pardoux, E. & Peng, S. (1990), Adapted solution of a backward stochastic differential equation, Systems & Control Letters 14, 55–61
  • E, W., Han, J., Jentzen, A. (2017), Deep learning-based numerical methods for high-dimensional parabolic PDEs and BSDEs, Communications in Mathematics and Statistics 5, 349–380; and Han, J., Jentzen, A., E, W. (2018), Solving high-dimensional PDEs using deep learning, PNAS 115(34), 8505–8510
  • Longstaff, F. & Schwartz, E. (2001), Valuing American options by simulation: a simple least-squares approach, Review of Financial Studies 14(1), 113–147
  • Föllmer, H. & Sondermann, D. (1986), Hedging of non-redundant contingent claims; Schweizer, M. (2001), A guided tour through quadratic hedging approaches; Föllmer, H. & Leukert, P. (2000), Efficient hedging: cost versus shortfall risk, Finance & Stochastics 4, 117–146
  • Leland, H. (1985), Option pricing and replication with transactions costs, Journal of Finance 40(5), 1283–1301; Davis, Panas, Zariphopoulou (1993), European option pricing with transaction costs, SIAM J. Control & Optimization; Whalley, A.E. & Wilmott, P. (1997), An asymptotic analysis of an optimal hedging model with transaction costs
  • Boyle, P. & Emanuel, D. (1980), Discretely adjusted option hedges; Bertsimas, Kogan, Lo (2000), When is time continuous?

6. Connected Graph Bridges

Beginner: start at 01 · Practitioner: start at 05