Python modules and jupyter notebook examples for the following papers:
- Arbitrage-free Neural-SDE Market Models.
- Estimating Risks of Option Books using Neural-SDE Market Models.
- Hedging Option Books using Neural-SDE Market Models (code to be added).
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.
The following notebook/script examples show common usage of the code:
-
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.
-
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.
-
Factor decoding: this notebook shows a few exploratory examples of decoding factors from call option prices simulated from a Heston-SLV model.
-
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).
@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} }