Skip to content

vicaws/neuralSDE-marketmodel

Repository files navigation

neuralSDE-marketmodel

DOI

Python modules and jupyter notebook examples for the following papers:

  1. Arbitrage-free Neural-SDE Market Models.
  2. Estimating Risks of Option Books using Neural-SDE Market Models.
  3. Hedging Option Books using Neural-SDE Market Models.

Code

Installation of pre-requisites

It is recommended to create a new environment and install pre-requisite packages. Here is an illustrative example of using Conda for setting up the virtual environment directly from the configuration file mktmdl.yaml (thanks to Prof. Matthew Dixon for feedback):

$git clone git@github.com:vicaws/neuralSDE-marketmodel.git
$cd neuralSDE-marketmodel
$conda env create -f mktmdl.yaml
$conda activate mktmdl

Alternatively, one could pip install the pre-requisite packages from requirements.txt using:

$pip install -r requirements.txt

In addition, in this repository we also include our proprietary python package arbitragerepair for calculating static arbitrage boundaries. To know more about the methodology, please refer to our paper Detecting and Repairing Arbitrage in Traded Option Prices.

Usage

The following notebook/script examples show common usage of the code:

  1. Paper I: this notebook loads the offline-trained checkpoint files for all the neural network models that are used in the published paper Arbitrage-free Neural-SDE Market Models.

  2. Paper II: this notebook loads the processed historical price data for EUROSTOXX 50 and DAX index options, the pre-decoded factors, and offline-trained checkpoint files for some of the neural network models that are used in the published paper Estimating Risks of Option Books using Neural-SDE Market Models.

  3. Paper III: this notebook loads the processed historical price data for EUROSTOXX 50 and DAX index options, the pre-decoded factors, and offline-trained checkpoint files for some of the neural network models that are used in the published paper Hedging Option Books using Neural-SDE Market Models.

  4. Factor decoding: this notebook shows a few exploratory examples of decoding factors from call option prices simulated from a Heston-SLV model.

  5. Model training: this python script gives the complete flow of codes from decoding factors to training models and simulating option prices (from synthetic call option prices simulated from a Heston-SLV model).

Citation

@misc{nsdemm2022,
   author = {Samuel N. Cohen and Christoph Reisinger and Sheng Wang},  
   title = {neuralSDE-marketmodel},
   publisher = {GitHub},
   journal = {GitHub repository},
   year = {2022},
   howpublished = {\url{https://github.com/vicaws/neuralSDE-marketmodel}},
   note = {DOI: 10.5281/zenodo.5337522}
}

About

Python modules and jupyter notebook examples for the paper Arbitrage-free Neural-SDE Market Models.

Resources

License

Stars

Watchers

Forks

Packages

No packages published