Finance and economics
Machine learning for options trading
In options, machine learning fits implied volatility surfaces from noisy quotes, approximates slow pricing models with fast neural networks, and learns hedging strategies that account for transaction costs. Each model is compared with a Black-Scholes or interpolation baseline on held-out strikes, dates or simulated paths.
How machine learning is used in options trading
Fitting implied volatility surfaces
Option quotes are sparse and noisy, especially far from the money. Neural networks fit a smooth surface across strikes and expiries, with penalties that keep the implied prices free of arbitrage.
Real exampleDeep smoothing of the implied volatility surface (Ackerer, Tagasovska and Vatter)Fitted implied volatility surfaces with neural networks, penalising the loss to avoid arbitrage, and benchmarked the method against standard surface models.
Speeding up model calibration
Advanced pricing models such as rough volatility are slow to evaluate, which makes calibration to market prices slow. A neural network trained offline on the model's prices replaces the slow pricer during calibration.
Real exampleDeep learning volatility (Horvath, Muguruza and Tomas)Trained neural networks offline to approximate pricing functions, so that models including rough volatility can be calibrated to a full implied volatility surface within a few milliseconds.
Hedging with transaction costs
Textbook delta hedging assumes free, continuous trading. Deep hedging trains a network to choose hedge positions on simulated paths, minimising a risk measure that includes costs and other frictions.
Real exampleDeep hedging (Buehler, Gonon, Teichmann and Wood)Presented a framework for hedging a portfolio of derivatives under market frictions such as transaction costs, market impact, liquidity constraints and risk limits, using deep reinforcement learning methods.
Learning pricing formulas from data
When the dynamics of the underlying asset are unknown, a network can learn the mapping from contract terms and market inputs to prices. Comparing it with Black-Scholes on held-out data shows whether it adds anything.
Real exampleLearning networks for derivative pricing (Hutchinson, Lo and Poggio)An early study proposing learning networks as a nonparametric way to estimate option pricing formulas, which showed that they can recover the Black-Scholes formula from simulated prices.
Can you learn machine learning for options trading?
Yes, with a solid base in maths. Options work needs probability, calculus and the Black-Scholes framework before machine learning adds value, so learn Python and pricing theory first, then neural networks for surfaces, calibration and hedging.
- Python for options dataLoad option chains, compute mid prices, moneyness and time to expiry, and invert Black-Scholes to get implied volatilities.Learn it in Python
- Calculus, linear algebra and probabilityDerivatives, expectations and distributions, which pricing formulas and the Greeks are built on.Learn it in Maths
- Option pricing theoryBlack-Scholes, the Greeks, volatility smiles and no-arbitrage conditions, from a standard derivatives textbook such as Hull.
- Neural networksFeed-forward networks trained to fit surfaces or approximate pricers, with constraints that keep outputs free of arbitrage.Learn it in Deep Learning
- Hedging simulationsSimulate price paths, hedge with and without costs, and compare a learned hedge with delta hedging on the same paths.
Moving into machine learning for options trading
If you already work in the field
Options traders and volatility analysts already understand the surface, the Greeks and how hedging breaks down under costs. Add Python and neural network basics, then fit a network to one day's surface and compare it with your usual interpolation or SVI parametrisation.
If you come from data science or ML
ML engineers need derivatives theory first: Black-Scholes, implied volatility, the Greeks and no-arbitrage constraints. A standard derivatives textbook and Ruf and Wang's literature review of neural networks for option pricing and hedging are good starting points.
Roles that do this workVolatility quantDerivatives quantitative analystOptions traderQuantitative developer, derivativesModel validation quant
Tools you will use
| Tool | What you use it for |
|---|---|
| QuantLib | Price options, build volatility surfaces and generate benchmark Greeks. |
| py_vollib | Compute Black-Scholes prices, implied volatilities and Greeks quickly in Python. |
| PyTorch | Train neural pricing approximations and deep hedging policies on simulated paths. |
| SciPy | Solve for implied volatility and calibrate model parameters by optimisation. |
| scikit-learn | Fit gradient boosting or kernel models to implied volatility across strikes and expiries. |
Public data to practise on
- Deribit public API: Public endpoints return crypto option instruments, quotes and implied volatilities without an account.
- Cboe VIX historical data: Daily history of the VIX index of S&P 500 implied volatility, for studying volatility regimes and calibrating simulations.
- FRED 3-month Treasury yield (DGS3MO): Daily US 3-month Treasury yield, a risk-free rate input for pricing and simulating options.
Your first project
Download a snapshot of BTC option quotes from the Deribit public API, fit implied volatility with gradient boosting on moneyness and time to expiry, and compare it with a single flat volatility using RMSE on held-out strikes.
Common questions
Can machine learning price options better than Black-Scholes?
Neural networks can fit observed prices more closely than Black-Scholes, which assumes constant volatility, but practitioners compare them with richer models and surface parametrisations too. Accuracy on new strikes and dates, and freedom from arbitrage, are the real tests.
What is an implied volatility surface?
It shows the volatility implied by option prices across strikes and expiries. It is not flat, and fitting it smoothly without creating arbitrage is a core task on options desks.
What is deep hedging?
Deep hedging trains a neural network to choose hedge positions over time by minimising a risk measure on simulated paths, including transaction costs and other frictions. It is compared with classical delta hedging on the same paths.
Do I need to trade options to learn this?
No. Public option chains, simulated data and pricing libraries such as QuantLib let you practise every method on this page without trading. This guide is educational and is not investment advice.
Courses for these skills
- Deep Learning with PyTorchLearn neural-network objectives and training.Syllabus available · lessons open as produced
- Maths for Machine LearningConnect derivatives, optimisation and loss functions.26 published lessons · all planned lessons open
- Statistics and Probability for Machine LearningDistinguish confidence, prediction uncertainty and calibration.41 published lessons · all planned lessons open
- Practical Machine Learning in PythonCompare losses and models for continuous outcomes.51 published lessons · more lessons in production
New to programming or maths? Start with Python, or follow the machine learning path in order. Published lessons are free to read; compare Free and Pro.