This repository contains the code generate the plots in the report.
To install the project on a new machine, follow these steps:
- Clone the project and navigate to the project directory.
- Create a new python environment, cf. docs, and activate it.
- Install the required packages using
pip install -r requirements. txt
- Install the package using
or using
pip install .
if you want to edit the project.pip install --editable .
To run the experiments in the different sections of the report, follow these instructions. All the scripts come with an argument parser, that allows the variation of the input arguments. For help about a script script.py
, call
python script.py --help
For the plotting scripts, add the --usetex
flag for LaTeX support.
To vary the number of samples, call
python nsamp_variation.py
and then
python plot_nsamp_variation.py
To vary the time step size
python h_variation.py
and then
python plot_h_variation.py
For the two-level experiments, call
python two_level.py
and then
python plot_two_level.py
For the multi-level experiments with the Asian option, call first
python multi_level_asian.py
and then
python plot_multi_level_asian.py
For the multi-level experiments with the barrier option, call first
python multi_level_barrier.py
and then
python plot_multi_level_barrier.py
For the experiments on variance reduction for high strike prices, run For the multi-level experiments with the Asian option, call first
python higher_strike.py
This project is licensed under the MIT License.