levydrivensde
levydrivensde
The LévyDrivenSDE class models a Lévy-driven SDEs where the driver is a pure jump process, that is the represented process X is solution of the SDE: dX = h(X) dY, X(0) = X_0 where Y is a pure jump process.
Functions h are objects of the class SDEFunction, assumed to be “regular” function (at least be Lipschitz).
- class SDEFunction(m: int, d: int)[source]
Bases:
objectFunction h corresponding to the SDE dX = h(X) dYs h is function from R^m to R^(mxd) where m is the dimension of X and d the dimension of the Lévy driver Y
- class Constant(m: int = 1, d: int = 1, constant: float = 1)[source]
Bases:
SDEFunctionConstant function h
- class DiagX(dimension: int = 1)[source]
Bases:
SDEFunctionh(X) returns diag(x1, x2,…, xn). This only works when m=d i.e. when the driver has the same dimension as the underlying.
- class LiborSDEFunction(sigma: array, tenors: array)[source]
Bases:
SDEFunctionThe function h is such that h(x) = sigma where sigma is an array of size mxd with m the number of underlying Libor rates and d the model dimension
- class ForwardMarketSDEFunction(sigma: array, tenors: array)[source]
Bases:
SDEFunctionThe function h is such that h(x) = sigma where sigma is an array of size mxd with m the number of underlying OIS rates and d the model dimension
- class LevyDrivenSDEModel(driver: Union[LevyModel, LevyCopulaModel], x0: Union[float, array] = 0.0, a: Optional[SDEFunction] = None)[source]
Bases:
ModelRepresentation of the process X which is solution of: dX = h(X) dY, X(0) = X_0 where Y is a pure jump Lévy process
- process_representation = 1
- __init__(driver: Union[LevyModel, LevyCopulaModel], x0: Union[float, array] = 0.0, a: Optional[SDEFunction] = None)[source]
- Parameters
driver – SDE driver
x0 – initial value of X
a – SDE Function h (FIXME change of notation might be a bit confusing)
- dimension_model() int[source]
dimension of the model, that is the number of factors or drivers in the model
levyforwardmodel
Lévy Forward Model
- class LevyForwardModel(ois_rates: Union[float, array], tenors: list[float], sigma: array, driver: Union[LevyModel, LevyCopulaModel])[source]
Bases:
LevyDrivenSDEModelLévy Forward Model
- __init__(ois_rates: Union[float, array], tenors: list[float], sigma: array, driver: Union[LevyModel, LevyCopulaModel])[source]
- Parameters
driver – SDE driver
x0 – initial value of X
a – SDE Function h (FIXME change of notation might be a bit confusing)
levylibormodel
Lévy Libor Model
- class LevyLiborModel(libor_rates: Union[float, array], tenors: list[float], sigma: array, driver: Union[LevyModel, LevyCopulaModel])[source]
Bases:
LevyDrivenSDEModelLévy Libor Model
This is the Lévy Libor Model as described in the numerical applications of ‘Jump-adapted discretisation schemes for Lévy-driven SDEs’ by Kohatsu-Hika and Tankov
We assume constant volatility function sigma^i(x) = cst = sigma^i Note that the model is under the terminal measure, so the payoff definition must reflect that.
- __init__(libor_rates: Union[float, array], tenors: list[float], sigma: array, driver: Union[LevyModel, LevyCopulaModel])[source]
- Parameters
driver – SDE driver
x0 – initial value of X
a – SDE Function h (FIXME change of notation might be a bit confusing)