Skip to content

boomelage/machine-learning-option-pricing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Neural Networks for Exotic Option Pricing

Radu Briciu
BSc Finance, PgDip Quantitative Finance


Abstract

In this paper we will explore a proposed data generation method which will construct the feature matrix for a multi-layer perceptron model designed to estimate the pricing functional of path-dependent financial derivatives. We will explore the theoretical framework and specifications for barrier and Asian option feature generation along with their respective multi-layer perceptron architectures and model performance metrics. We will demonstrate how the proposed models can retain pricing errors below one percent while reducing the computation time by up to 99.8%.


Table of Contents


Introduction

In this paper we will explore a proposed method of pricing path-dependent index options via multi-layer perceptron approximations derived from the simulation of a multidimensional space representing a contract's price as a functional form of its features. Index options can generally be defined as financial derivative contracts facilitating a contingent claim on the value of a stock market index which is designed to aggregate performance across a sector or economy.

It is therefore a complicated matter to evaluate the price of path-dependent option counterparts which introduce further non-linearities in their pricing functions. Path-dependent options often require statistical simulation to obtain the most accurate price, resulting in long computation times.

We propose a method to generate possible values of a function which will proceed the optimization of a multi-layer perceptron model, effectively proxying the stochastic non-linear functional form between the output and its input features. To generate a representative sample space, we calibrate historical Heston (1993) parameters using market observed risk-free and dividend rates accompanied by live options trade data, thereby effectively simulating, in the case of this paper, the SPX index options market.

The use of Heston’s stochastic volatility model as a pricing function for the underlying index allows for discrete monitoring of volatility and pricing of various market scenarios and contract types. This paper serves as a framework and demonstration of a generalized estimation process for barrier and Asian options along with model specifications and retraining analyses.


Pricing Model

Specification

We use the Heston (1993) model to describe the log-price of the underlying, via the SDE system:

$$ dS_t = \left( r - \frac{v_t}{2} \right) dt + \sqrt{v_t} \left( \rho dW_t + \sqrt{1 - \rho^2} dB_t \right) $$

$$ dv_t = \kappa (\theta - v_t) dt + \eta \sqrt{v_t} dW_t $$

where

  1. $v_0$ = initial variance,
  2. $\theta$ = long-run variance,
  3. $\rho$ = correlation between log-price and variance process,
  4. $\kappa$ = mean reversion speed,
  5. $\eta$ = vol of variance process,
  6. $B_t, W_t$ = Brownian motions.

Heston (1993) extends Black-Scholes (1973) by allowing stochastic volatility, making it suitable for pricing path-dependent options.


Historical Parameter Retrieval

We construct a dataset of historical parameter sets by calibrating to live SPX options trades. This calibration yields ~1600 sets between 2012–2024.

Filtering ensures each volatility surface has strikes both above and below the spot price (at least 2 each side, with ≥5 contracts) to allow reliable Heston calibration. Calibration is performed using the Levenberg–Marquardt algorithm as implemented in QuantLib.

Calibrated Heston parameters


Model Training

We train a multi-layer perceptron (MLP) on the feature matrix $X$ and target $y$.

MLP graph With squared error:

$$ \min_{w_1, w_2} \frac{1}{N} \sum_{i=1}^N (F_t(w_1,w_2) - y_t)^2 $$

Hyperparameter tuning across 6480 configurations ensures in-sample error ~0.5% and out-of-sample error <5% (Asian options).


Model Testing

The model was tested with a negligible amount of data and tested for over 10 years of out of sample data.

Performance

Barrier errors

Figure: Barrier options out-of-sample errors

Asian errors

Figure: Asian options out-of-sample errors

Errors increase without retraining, due to unseen parameter combinations.

Distribution Matching

The neural network preserves distributional shapes of option prices vs Heston parameters:

Shapely Barriers

Figure: Barrier option price/parameter joint distribution

Shapely Asians

Figure: Asian option price/parameter joint distribution


Concluding Remarks

We proposed a data generation routine to produce parsimonious training sets for exotic option pricing.

  • Barrier options priced via advection (approximate).
  • Asian options priced via Monte Carlo.
  • Neural networks approximate the Heston functional form.
  • Achieved >99% reduction in computation time with in-sample error <1%.

Software Repositories

  1. convsklearn
  2. QuantLib Pricers
  3. Option Generator