Heston Volatility Surface#
from quantflow.sp.heston import HestonJ
from quantflow.options.pricer import OptionPricer
pricer = OptionPricer(model=HestonJ.create(
vol=0.5,
kappa=2,
rho=-0.3,
sigma=0.8,
theta=0.36,
jump_fraction=0.3,
jump_asymmetry=1.2
))
pricer
OptionPricer(model=HestonJ(variance_process=CIR(rate=0.175, kappa=2.0, sigma=0.8, theta=0.36, sample_algo=<SamplingAlgorithm.implicit: 'implicit'>), rho=-0.3, jumps_up=CompoundPoissonProcess[Exponential](intensity=100.0, jumps=Exponential(decay=67.21992649890744)), jumps_down=CompoundPoissonProcess[Exponential](intensity=100.0, jumps=Exponential(decay=80.66391179868893))), n=128, max_moneyness_ttm=1.5)
pricer.plot3d(max_moneyness_ttm=1.5, support=31).update_layout(
height=800,
title="Heston volatility surface",
)