Quant Memo
Advanced

Neural Network Option Pricing

Instead of solving a pricing formula every time, train a network to memorise what the formula outputs, then look it up a thousand times faster — as long as you never ask it about a market it hasn't seen.

Prerequisites: The Black-Scholes Model, Backpropagation

A closed-form option pricing formula is fast; a Monte Carlo or PDE solver for an exotic model can take seconds per price, and a real-time calibration might need that price evaluated tens of thousands of times as it searches for the parameters that fit the market. Waiting seconds, tens of thousands of times, is not something a trading desk can do between quotes. The fix sounds almost too simple: run the slow pricer once, offline, on a huge grid of inputs, and train a neural network to reproduce its outputs. Afterward, evaluating the network takes microseconds.

The world's most expensive lookup table

Think of a chef who spends a weekend cooking every possible combination of a dish's ingredients and writing down how it tasted, then hands a new cook a laminated card summarising the pattern — "more salt up to about a teaspoon per pound helps, then it stops helping." The new cook can now guess how any similar dish will taste almost instantly, without ever touching a stove, because the pattern was learned once and reused. A neural network pricer is that laminated card: the expensive cooking happens once, offline (training), and the fast guessing happens every time afterward (inference).

What the network is actually fitting

A feed-forward network is just a chain of simple functions. With one hidden layer, it computes

V^(x)  =  W2σ ⁣(W1x+b1)+b2,\hat{V}(x) \;=\; W_2 \, \sigma\!\big(W_1 x + b_1\big) + b_2,

where xx is the vector of inputs (strike, maturity, and model parameters like volatility or mean-reversion speed), W1W_1 and W2W_2 are matrices of weights, b1b_1 and b2b_2 are offset vectors, and σ\sigma is a nonlinear "squashing" function applied entrywise. In plain English: take the inputs, mix them together with learned weights, bend the result through a nonlinearity so the network can represent curves rather than only straight lines, then mix again to produce one number, the price. Training means adjusting every weight in W1,W2,b1,b2W_1, W_2, b_1, b_2 so that V^(x)\hat V(x) matches the true pricer's output V(x)V(x) as closely as possible across the whole training grid, done by gradient descent via backpropagation.

Worked example 1: fitting three points with a one-node network

Suppose the true (slow) pricer, evaluated at three strikes for a fixed maturity, gives prices V(90)=12.0V(90)=12.0, V(100)=5.0V(100)=5.0, V(110)=1.5V(110)=1.5. A tiny network with one hidden unit and a linear activation is just V^(K)=w2(w1K+b1)+b2\hat V(K) = w_2(w_1 K + b_1) + b_2, which collapses to a straight line V^(K)=aK+b\hat V(K) = aK + b. Fit it with two of the three points, say K=90K=90 and K=110K=110: slope a=(1.512.0)/(11090)=10.5/20=0.525a = (1.5-12.0)/(110-90) = -10.5/20 = -0.525, intercept b=12.0(0.525)(90)=12.0+47.25=59.25b = 12.0 - (-0.525)(90) = 12.0 + 47.25 = 59.25. The line predicts V^(100)=0.525(100)+59.25=6.75\hat V(100) = -0.525(100) + 59.25 = 6.75, against a true value of 5.05.0 — an error of 1.751.75. A linear network cannot bend, and option prices are convex in strike, so it systematically misses the middle. This is exactly why real pricing networks use a nonlinear σ\sigma and several hidden units: enough bends to trace a convex curve through all the training points, not just fit a straight line between two of them.

Worked example 2: training speed versus inference speed

Say the true pricer (a Monte Carlo engine) takes 0.40.4 seconds per price, and a calibration routine needs 50,00050{,}000 evaluations to search for model parameters that match the market. Direct calibration: 50,000×0.4s=20,00050{,}000 \times 0.4\,\text{s} = 20{,}000 seconds, about 5.65.6 hours — unusable intraday. Training the network instead uses, say, 200,000200{,}000 training prices computed once offline: 200,000×0.4s=80,000200{,}000 \times 0.4\,\text{s} = 80{,}000 seconds, about 2222 hours, but this happens overnight, not during trading. Then each network evaluation during the day takes about 0.000020.00002 seconds (20 μs20\ \mu s), so the same 50,00050{,}000-evaluation calibration costs 50,000×0.00002s=150{,}000 \times 0.00002\,\text{s} = 1 second. A calibration that was impossible intraday becomes instantaneous, at the one-time cost of an overnight training run.

slow pricer 0.4s / price train network once, overnight fast network used once, offline used 50,000×/day, live
The slow pricer runs once to build a training set; the network then stands in for it during live calibration, at roughly 20,000 times the speed.
strike K option value linear net misses middle nonlinear net fits all three
A one-node linear network can only draw a straight line through the training prices and misses the curve's true shape; enough hidden units with a nonlinear activation bend to match the convexity actually present in option prices.

What this means in practice

Neural pricers are used to accelerate calibration of expensive stochastic-vol and local-stochastic-vol models, and to price American or path-dependent products where a closed form doesn't exist, letting a full model calibration that used to take hours run in seconds. The network never replaces the underlying model — it replaces the cost of evaluating it.

A network trained on strikes from 8080 to 120120 and maturities from one month to two years has learned nothing about a strike of 6060 or a maturity of ten years — it will still confidently output a number, but that number is extrapolation, not a price, and can be badly wrong with no warning sign in the output itself. The classic mistake is trusting the network's output uniformly across the input space it was never trained on. Production systems guard against this by tracking whether live inputs fall inside the training grid's convex hull and falling back to the slow, true pricer whenever they don't.

A neural pricer is a fast, learned approximation of a slow pricing model — the accuracy is only as good as the training grid, and it degrades silently outside it.

Related concepts

Practice in interviews

Further reading

  • Hernandez (2017), Model Calibration with Neural Networks
  • Horvath, Muguruza & Tomas (2021), Deep Learning Volatility
ShareTwitterLinkedIn