mixed

blackscholes

Black-Scholes model with constant volatility sigma

class BlackScholesParameters(sigma: float)[source]

Bases: Parameters

Black-Scholes parameters

__init__(sigma: float)[source]
Parameters

sigma – Black-Scholes volatility

property sigma
class PureDiffusiveModel(mu: float, sigma: float)[source]

Bases: LevyModel

Pure diffusive model: L_t where L_t is of the form mu*t + sigma*W_t with W a standard Brownian motion

__init__(mu: float, sigma: float)[source]
Parameters
  • model_type – name of the model

  • levy_triplet – Lévy triplet

  • cumulant – cumulant expressions

levy_exponent_pure_jump(x: complex) complex[source]

The Lévy exponent phi is such that E[exp(x L_t)] = exp(t*phi(x)) where L is the Lévy model with triplet (0, 0, nu).

Returns

phi(z) where z = ix, that is phi(x) = levy_exponent_pure_jump(ix)

intensity() float[source]
class BlackScholesModel(spot: float, r: float, d: float, parameters: BlackScholesParameters)[source]

Bases: ClsWithMoments

Black-Scholes model

__init__(spot: float, r: float, d: float, parameters: BlackScholesParameters)[source]
Parameters
  • spot – underlying spot

  • r – interest rate

  • d – dividend rate

  • levy_model – underlying Lévy model L

jump_increment(n) array[source]

Direct simulation of jump increments

Parameters

n – numbers of jumps to simulate

Returns

array of the jump values

process_drift() array[source]

Drift mu(t, x) of the underlying stochastic process

levy_exponent_pure_jump(x: complex) complex[source]

The Lévy exponent phi is such that E[exp(x L_t)] = exp(t*phi(x)) where L is the Lévy model with triplet (0, 0, nu).

Returns

phi(z) where z = ix, that is phi(x) = levy_exponent_pure_jump(ix)

hem

HEM Model from the paper ‘Pricing Asian Options Under a Hyper-Exponential Jump Diffusion Model’ in by Cai and Kou

Note

HEM stands for Hyper-exponential jump model

class HEMParameters(sigma: float, p: float, eta1: float, eta2: float, intensity: float)[source]

Bases: Parameters

__init__(sigma: float, p: float, eta1: float, eta2: float, intensity: float)[source]
property sigma
property p
property eta1
property eta2
property intensity
initialisation()[source]

When parameters are calibrated, this function updates dependent members of the Parameter class

class HEMModel(parameters: HEMParameters)[source]

Bases: LevyModel

__init__(parameters: HEMParameters)[source]
Parameters
  • model_type – name of the model

  • levy_triplet – Lévy triplet

  • cumulant – cumulant expressions

levy_exponent_pure_jump(x: complex) complex[source]

The Lévy exponent phi is such that E[exp(x L_t)] = exp(t*phi(x)) where L is the Lévy model with triplet (0, 0, nu).

Returns

phi(z) where z = ix, that is phi(x) = levy_exponent_pure_jump(ix)

jump_increment(n) array[source]

Direct simulation of jump increments

Parameters

n – numbers of jumps to simulate

Returns

array of the jump values

process_drift() array[source]

Drift mu(t, x) of the underlying stochastic process

intensity() float[source]
class ExponentialOfHEMModel(spot: float, r: float, d: float, parameters: HEMParameters)[source]

Bases: ClsWithMoments

__init__(spot: float, r: float, d: float, parameters: HEMParameters)[source]
Parameters
  • spot – underlying spot

  • r – interest rate

  • d – dividend rate

  • levy_model – underlying Lévy model L

process_drift() array[source]

Drift mu(t, x) of the underlying stochastic process

merton

Merton Model from ‘Option Prices When Underlying Stock Returns Are Discontinuous’ by Merton

class MertonParameters(sigma: float, mu_j: float, sigma_j: float, intensity: float)[source]

Bases: Parameters

__init__(sigma: float, mu_j: float, sigma_j: float, intensity: float)[source]
property sigma
property mu_j
property sigma_j
property intensity
class MertonModel(parameters: MertonParameters)[source]

Bases: LevyModel

__init__(parameters: MertonParameters)[source]
Parameters
  • model_type – name of the model

  • levy_triplet – Lévy triplet

  • cumulant – cumulant expressions

levy_exponent_pure_jump(x: complex) complex[source]

The Lévy exponent phi is such that E[exp(x L_t)] = exp(t*phi(x)) where L is the Lévy model with triplet (0, 0, nu).

Returns

phi(z) where z = ix, that is phi(x) = levy_exponent_pure_jump(ix)

intensity() float[source]
jump_increment(n) array[source]

Direct simulation of jump increments

Parameters

n – numbers of jumps to simulate

Returns

array of the jump values

class ExponentialOfMertonModel(spot: float, r: float, d: float, parameters: MertonParameters)[source]

Bases: ClsWithMoments

__init__(spot: float, r: float, d: float, parameters: MertonParameters)[source]
Parameters
  • spot – underlying spot

  • r – interest rate

  • d – dividend rate

  • levy_model – underlying Lévy model L

process_drift() array[source]

Drift mu(t, x) of the underlying stochastic process