9.09 Heston Process - Reproducibility

We reproduce here the figure 9.10 and 9.11 of the book. We show a reproducibility test for a Heston process as well as a comparison of the generated noise with a generative method. Utilitary functions can be found next to this file.

Necessary Imports

import os
import sys

from matplotlib import pyplot as plt

try:
    CURRENT_DIR = os.path.dirname(os.path.abspath(__file__))
except NameError:
    CURRENT_DIR = os.getcwd()
data_path = os.path.join(CURRENT_DIR, "data")
PARENT_DIR = os.path.abspath(os.path.join(CURRENT_DIR, ".."))
sys.path.insert(0, PARENT_DIR)

from utils.ch9.heston import *

fig_test_reproductibility_Heston()
plt.show()

table = fig_compare_distributions_Heston()
print(table)
plt.show()
  • ch9 HestonRepro
  • ch9 HestonRepro
                                  Mean          Variance         Skewness       Kurtosis     KS test
HestonDiffLog lat.:0  0.00011(-0.0001)     -0.045(0.043)  9.8e-05(0.0001)         0.8(1)   0.6(0.05)
HestonCondMap lat.:0     -0.016(-0.01)      0.048(0.064)         1.1(1.1)     0.06(0.03)  0.96(0.05)
HestonCondMap lat.:1  -1.6e-16(-0.069)  -1.2e-15(-0.066)        0.5(0.49)  -0.037(-0.28)  0.19(0.05)

Total running time of the script: (0 minutes 13.809 seconds)

Gallery generated by Sphinx-Gallery