.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_ch9\ch9_HestonCompare.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code. .. rst-class:: sphx-glr-example-title .. _sphx_glr_auto_ch9_ch9_HestonCompare.py: ==================================================================================================== 9.10 Heston Process - Path comparison ==================================================================================================== We reproduce here the figure 9.12 of the book. We show a comparison of generated paths with a generative method, diff log map and Heston process. Utilitary functions can be found next to this file. .. GENERATED FROM PYTHON SOURCE LINES 11-13 Necessary Imports ------------------------ .. GENERATED FROM PYTHON SOURCE LINES 13-30 .. code-block:: Python 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_compare_trajectories_Heston() plt.show() .. image-sg:: /auto_ch9/images/sphx_glr_ch9_HestonCompare_001.png :alt: Heston generator, Heston Diff Log map, Heston Cond map :srcset: /auto_ch9/images/sphx_glr_ch9_HestonCompare_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 10.268 seconds) .. _sphx_glr_download_auto_ch9_ch9_HestonCompare.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: ch9_HestonCompare.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: ch9_HestonCompare.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: ch9_HestonCompare.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_