closedform

cfblackscholes

Closed-Form pricing formulas for the Black-Scholes model

class CFBlackScholes(bs_model: BlackScholesModel)[source]

Bases: object

Some Closed-form formulas for the Black-Scholes model

eps = 1e-08
__init__(bs_model: BlackScholesModel)[source]
Parameters

bs_model – the Black-Scholes model object

forward(strike, maturity)[source]

Price a forward in the Black-Scholes model

Parameters
  • strike – strike of the forward contract

  • maturity – maturity of the forward contract

Returns:

The value of the forward contract

call(strike: float, maturity: float)[source]

Price a Call option in the Black-Scholes model

Parameters
  • strike – call strike

  • maturity – call maturity

put(strike: float, maturity: float)[source]

Price a Put option in the Black-Scholes model

Parameters
  • strike – put strike

  • maturity – put maturity

butterfly(strike1: float, strike2: float, strike3: float, maturity: float)[source]

Price a Butterfly option in the Black-Scholes model

strike1: first strike strike2: second strike strike3: third strike maturity: butterfly maturity .. note:: we expect strike1 < strike2 < strike3

digital(strike, maturity)[source]

Price a digital option in the Black-Scholes model

Parameters
  • strike – digital strike

  • maturity – digital maturity

cflevycopula

Closed-Form pricing formula for Lévy copula models

Note

The Garreau-Kercheval paper is explained in their paper: ‘A Structural Jump Threshold Framework for Credit Risk’

class CFLevyCopulaModel(levy_copula_model: LevyCopulaModel)[source]

Bases: object

__init__(levy_copula_model: LevyCopulaModel)[source]
survival_probability(levels_a: list[float], t: float)[source]

Pricing a survival probability in the Garreau-Kercheval framework

Parameters
  • levels_a – thresholds a

  • t – time t

first_to_default_par_spread(levels_a: list[float], recovery_rate: float)[source]

Pricing the FtD CDS spread in the Garreau-Kercheval framework

Parameters
  • levels_a – thresholds a

  • recovery_rate – CSD recovery rate

implied_cds_spread(pv: float, level_a: list[float], recovery_rate: float, maturity: float)[source]

cflevymodel

Closed-Form pricing formulas for Lévy models

Note

The Garreau-Kercheval paper is explained in their paper: ‘A Structural Jump Threshold Framework for Credit Risk’

class CFLevyModel(model: LevyModel)[source]

Bases: object

__init__(model: LevyModel)[source]
survival_probability(level_a: float, t: float)[source]

Pricing a survival probability in the Garreau-Kercheval framework

Parameters
  • level_a – threshold a

  • t – time t

cds_spread(level_a: float, recovery_rate: float)[source]

Calculation of the single-name CDS spread in the Garreau-Kercheval framework

Parameters
  • level_a – threshold a

  • recovery_rate – CDS recovery rate

implied_cds_threshold(cds_spread: float, recovery_rate: float, h0: float)[source]
implied_cds_spread(pv: float, level_a: float, recovery_rate: float, maturity: float)[source]

cfvariancegamma

Closed-Formula for the Variance-Gamma model

class CFVarianceGammaModel(vg_model: VarianceGammaModel)[source]

Bases: object

__init__(vg_model: VarianceGammaModel)[source]
call(strike: float, maturity: float)[source]

Pricing of a call in the Variance-Gamma model

Parameters
  • strike – call strike

  • maturity – call maturity