Jump diffusions#
Jump-diffusions models are a class of stochastic processes that combine a diffusion process with a jump process. The jump process is a Poisson process that generates jumps in the value of the underlying asset. The jump-diffusion model is a generalization of the Black-Scholes model that allows for the possibility of large, discontinuous jumps in the value of the underlying asset.
The most famous jump-diffusion model is the Merton model, which was introduced by Robert Merton in 1976. The Merton model assumes that the underlying asset follows a geometric Brownian motion with jumps that are normally distributed.
- class quantflow.sp.jump_diffusion.JumpDiffusion(*, diffusion: ~quantflow.sp.weiner.WeinerProcess = <factory>, jumps: ~quantflow.sp.poisson.CompoundPoissonProcess)#
A generic jump-diffusion model
\[dx_t = \sigma d w_t + d N_t\]where \(w_t\) is a Weiner process with standard deviation \(\sigma\) and \(N_t\) is a compound poisson process with intensity \(\lambda\) and jump distribution D
Methods:
Analytical mean of the process at time t
Analytical variance of the process at time t
Characteristic exponent at time t for a given input parameter
Generate random
Paths
from the process.Sample
Paths
from the process given a set of drawsAttributes:
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- analytical_mean(t: ndarray[tuple[int, ...], dtype[floating[Any]]] | float) ndarray[tuple[int, ...], dtype[floating[Any]]] | float #
Analytical mean of the process at time t
Implement if available
- analytical_variance(t: ndarray[tuple[int, ...], dtype[floating[Any]]] | float) ndarray[tuple[int, ...], dtype[floating[Any]]] | float #
Analytical variance of the process at time t
Implement if available
- characteristic_exponent(t: ndarray[tuple[int, ...], dtype[floating[Any]]] | float, u: int | float | complex | ndarray | Series) int | float | complex | ndarray | Series #
Characteristic exponent at time t for a given input parameter
- sample(n: int, time_horizon: float = 1, time_steps: int = 100) Paths #
Generate random
Paths
from the process.- Parameters:
n – number of paths
time_horizon – time horizon
time_steps – number of time steps to arrive at horizon
- sample_from_draws(path_w: Paths, *args: Paths) Paths #
Sample
Paths
from the process given a set of draws
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid'}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class quantflow.sp.jump_diffusion.Merton(*, diffusion: ~quantflow.sp.weiner.WeinerProcess = <factory>, jumps: ~quantflow.sp.poisson.CompoundPoissonProcess[Normal])#
Merton jump-diffusion model
Methods:
Create a Merton jump-diffusion model with a given volatility, diffusion percentage, jump skewness, and jump intensity
Attributes:
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- classmethod create(vol: float = 0.5, diffusion_percentage: float = 0.5, jump_intensity: float = 100, jump_skew: float = 0.0) Self #
Create a Merton jump-diffusion model with a given volatility, diffusion percentage, jump skewness, and jump intensity
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid'}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].