purejump

cgmy

CGMY model from the paper The Fine Structure Of Asset Return by Carr, Geman, Madan and Yor

class CGMYParameters(c: float, g: float, m: float, y: float)[source]

Bases: Parameters

__init__(c: float, g: float, m: float, y: float)[source]
property c
property g
property m
property y
initialisation()[source]

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

class CGMYModel(parameters: CGMYParameters)[source]

Bases: LevyModel

__init__(parameters: CGMYParameters)[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 ExponentialOfCGMYModel(spot: float, r: float, d: float, parameters: CGMYParameters)[source]

Bases: ClsWithMoments

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

  • r – interest rate

  • d – dividend rate

  • levy_model – underlying Lévy model L

variancegamma

Variance Gamma model from the paper The Variance Gamma Process and Option Pricing by Carr, Madan and Chang

class VGParameters(sigma: float, nu: float, theta: float)[source]

Bases: Parameters

__init__(sigma: float, nu: float, theta: float)[source]
property sigma
initialisation()[source]

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

class VarianceGammaModel(parameters: VGParameters)[source]

Bases: LevyModel

__init__(parameters: VGParameters)[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 ExponentialOfVarianceGammaModel(spot: float, r: float, d: float, parameters: VGParameters)[source]

Bases: ClsWithMoments

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

  • r – interest rate

  • d – dividend rate

  • levy_model – underlying Lévy model L