Class FDMVarianceGammaModel
- All Implemented Interfaces:
FiniteDifferenceBoundary, FiniteDifferenceEquityModel, FiniteDifferenceModel, Model
The model is formulated in the stock variable and follows the convention used for jump models in this finite-difference framework:
getDrift(double, double...)returns the local first-order term, i.e.(r-q)S,getFactorLoading(double, double...)returns zero, since the pure Variance Gamma model has no diffusive factor,- the jump part of the generator is supplied separately through
getJumpComponent().
The public constructors use the usual Variance Gamma parameterization
(sigma, nu, theta) in order to stay close to the Monte Carlo side.
Constructors / factories based on (C,G,M) are provided only through
named static factory methods in order to avoid Java signature clashes.
- Author:
- Alessandro Gnoatto
-
Constructor Summary
ConstructorsConstructorDescriptionFDMVarianceGammaModel(double initialValue, double riskFreeRate, double dividendYieldRate, double sigma, double nu, double theta, double lowerIntegrationBound, double upperIntegrationBound, SpaceTimeDiscretization spaceTimeDiscretization) Creates a Variance Gamma model from flat rates and the usual(sigma, nu, theta)parameterization.FDMVarianceGammaModel(double initialValue, double riskFreeRate, double sigma, double nu, double theta, double lowerIntegrationBound, double upperIntegrationBound, SpaceTimeDiscretization spaceTimeDiscretization) Creates a Variance Gamma model from a flat risk-free rate, assuming zero dividend yield, and using the usual(sigma, nu, theta)parameterization.FDMVarianceGammaModel(double initialValue, double riskFreeRate, double dividendYieldRate, VarianceGammaJumpComponent jumpComponent, SpaceTimeDiscretization spaceTimeDiscretization) Creates a Variance Gamma model from flat rates and an explicit jump component.FDMVarianceGammaModel(double initialValue, double riskFreeRate, VarianceGammaJumpComponent jumpComponent, SpaceTimeDiscretization spaceTimeDiscretization) Creates a Variance Gamma model from a flat risk-free rate, assuming zero dividend yield, and using an explicit jump component.FDMVarianceGammaModel(double initialValue, DiscountCurve riskFreeCurve, double sigma, double nu, double theta, double lowerIntegrationBound, double upperIntegrationBound, SpaceTimeDiscretization spaceTimeDiscretization) Creates a Variance Gamma model assuming zero dividend yield and using the usual(sigma, nu, theta)parameterization.FDMVarianceGammaModel(double initialValue, DiscountCurve riskFreeCurve, VarianceGammaJumpComponent jumpComponent, SpaceTimeDiscretization spaceTimeDiscretization) Creates a Variance Gamma model assuming zero dividend yield and using an explicit jump component.FDMVarianceGammaModel(double initialValue, DiscountCurve riskFreeCurve, DiscountCurve dividendYieldCurve, double sigma, double nu, double theta, double lowerIntegrationBound, double upperIntegrationBound, SpaceTimeDiscretization spaceTimeDiscretization) Creates a Variance Gamma model from explicit discount curves and the usual(sigma, nu, theta)parameterization.FDMVarianceGammaModel(double initialValue, DiscountCurve riskFreeCurve, DiscountCurve dividendYieldCurve, VarianceGammaJumpComponent jumpComponent, SpaceTimeDiscretization spaceTimeDiscretization) Creates a Variance Gamma model from explicit discount curves and an explicit jump component. -
Method Summary
Modifier and TypeMethodDescriptiongetBoundaryConditionsAtLowerBoundary(FiniteDifferenceEquityProduct product, double time, double... riskFactors) Returns the boundary conditions at the lower boundary.getBoundaryConditionsAtUpperBoundary(FiniteDifferenceEquityProduct product, double time, double... riskFactors) Returns the boundary conditions at the upper boundary.getCloneWithModifiedSpaceTimeDiscretization(SpaceTimeDiscretization newSpaceTimeDiscretization) Returns a clone of this model with a modified space-time discretization.Returns the dividend-yield discount curve.double[]getDrift(double time, double... stateVariables) Returns the drift vector of the model state variables.double[][]getFactorLoading(double time, double... stateVariables) Returns the factor-loading matrix of the model state variables.double[]Returns the initial state vector of the model.Returns the optional jump component of the infinitesimal generator.Returns the risk-free discount curve used for pricing.Returns the space-time discretization used by this finite difference model.Returns the value.static FDMVarianceGammaModelofCGM(double initialValue, double riskFreeRate, double dividendYieldRate, double c, double g, double m, double lowerIntegrationBound, double upperIntegrationBound, SpaceTimeDiscretization spaceTimeDiscretization) Named factory using the(C,G,M)parameterization and flat rates.static FDMVarianceGammaModelofCGM(double initialValue, double riskFreeRate, double c, double g, double m, double lowerIntegrationBound, double upperIntegrationBound, SpaceTimeDiscretization spaceTimeDiscretization) Named factory using the(C,G,M)parameterization, flat risk-free rate, and zero dividend yield.static FDMVarianceGammaModelofCGM(double initialValue, DiscountCurve riskFreeCurve, double c, double g, double m, double lowerIntegrationBound, double upperIntegrationBound, SpaceTimeDiscretization spaceTimeDiscretization) Named factory using the(C,G,M)parameterization and zero dividend yield.static FDMVarianceGammaModelofCGM(double initialValue, DiscountCurve riskFreeCurve, DiscountCurve dividendYieldCurve, double c, double g, double m, double lowerIntegrationBound, double upperIntegrationBound, SpaceTimeDiscretization spaceTimeDiscretization) Named factory using the(C,G,M)parameterization and explicit curves.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface FiniteDifferenceEquityModel
getDividendYieldCurves
-
Constructor Details
-
FDMVarianceGammaModel
public FDMVarianceGammaModel(double initialValue, DiscountCurve riskFreeCurve, DiscountCurve dividendYieldCurve, VarianceGammaJumpComponent jumpComponent, SpaceTimeDiscretization spaceTimeDiscretization) Creates a Variance Gamma model from explicit discount curves and an explicit jump component.- Parameters:
initialValue- Initial spot value.riskFreeCurve- Risk-free discount curve.dividendYieldCurve- Dividend yield discount curve.jumpComponent- Variance Gamma jump component.spaceTimeDiscretization- The space-time discretization.
-
FDMVarianceGammaModel
public FDMVarianceGammaModel(double initialValue, DiscountCurve riskFreeCurve, DiscountCurve dividendYieldCurve, double sigma, double nu, double theta, double lowerIntegrationBound, double upperIntegrationBound, SpaceTimeDiscretization spaceTimeDiscretization) Creates a Variance Gamma model from explicit discount curves and the usual(sigma, nu, theta)parameterization.- Parameters:
initialValue- Initial spot value.riskFreeCurve- Risk-free discount curve.dividendYieldCurve- Dividend yield discount curve.sigma- The volatility parameter.nu- The variance-of-time-change parameter.theta- The asymmetry parameter.lowerIntegrationBound- Lower integration bound for the log-jump variable.upperIntegrationBound- Upper integration bound for the log-jump variable.spaceTimeDiscretization- The space-time discretization.
-
FDMVarianceGammaModel
public FDMVarianceGammaModel(double initialValue, DiscountCurve riskFreeCurve, VarianceGammaJumpComponent jumpComponent, SpaceTimeDiscretization spaceTimeDiscretization) Creates a Variance Gamma model assuming zero dividend yield and using an explicit jump component.- Parameters:
initialValue- Initial spot value.riskFreeCurve- Risk-free discount curve.jumpComponent- Variance Gamma jump component.spaceTimeDiscretization- The space-time discretization.
-
FDMVarianceGammaModel
public FDMVarianceGammaModel(double initialValue, DiscountCurve riskFreeCurve, double sigma, double nu, double theta, double lowerIntegrationBound, double upperIntegrationBound, SpaceTimeDiscretization spaceTimeDiscretization) Creates a Variance Gamma model assuming zero dividend yield and using the usual(sigma, nu, theta)parameterization.- Parameters:
initialValue- Initial spot value.riskFreeCurve- Risk-free discount curve.sigma- The volatility parameter.nu- The variance-of-time-change parameter.theta- The asymmetry parameter.lowerIntegrationBound- Lower integration bound for the log-jump variable.upperIntegrationBound- Upper integration bound for the log-jump variable.spaceTimeDiscretization- The space-time discretization.
-
FDMVarianceGammaModel
public FDMVarianceGammaModel(double initialValue, double riskFreeRate, double dividendYieldRate, VarianceGammaJumpComponent jumpComponent, SpaceTimeDiscretization spaceTimeDiscretization) Creates a Variance Gamma model from flat rates and an explicit jump component.- Parameters:
initialValue- Initial spot value.riskFreeRate- Constant risk-free rate.dividendYieldRate- Constant dividend yield.jumpComponent- Variance Gamma jump component.spaceTimeDiscretization- The space-time discretization.
-
FDMVarianceGammaModel
public FDMVarianceGammaModel(double initialValue, double riskFreeRate, double dividendYieldRate, double sigma, double nu, double theta, double lowerIntegrationBound, double upperIntegrationBound, SpaceTimeDiscretization spaceTimeDiscretization) Creates a Variance Gamma model from flat rates and the usual(sigma, nu, theta)parameterization.- Parameters:
initialValue- Initial spot value.riskFreeRate- Constant risk-free rate.dividendYieldRate- Constant dividend yield.sigma- The volatility parameter.nu- The variance-of-time-change parameter.theta- The asymmetry parameter.lowerIntegrationBound- Lower integration bound for the log-jump variable.upperIntegrationBound- Upper integration bound for the log-jump variable.spaceTimeDiscretization- The space-time discretization.
-
FDMVarianceGammaModel
public FDMVarianceGammaModel(double initialValue, double riskFreeRate, VarianceGammaJumpComponent jumpComponent, SpaceTimeDiscretization spaceTimeDiscretization) Creates a Variance Gamma model from a flat risk-free rate, assuming zero dividend yield, and using an explicit jump component.- Parameters:
initialValue- Initial spot value.riskFreeRate- Constant risk-free rate.jumpComponent- Variance Gamma jump component.spaceTimeDiscretization- The space-time discretization.
-
FDMVarianceGammaModel
public FDMVarianceGammaModel(double initialValue, double riskFreeRate, double sigma, double nu, double theta, double lowerIntegrationBound, double upperIntegrationBound, SpaceTimeDiscretization spaceTimeDiscretization) Creates a Variance Gamma model from a flat risk-free rate, assuming zero dividend yield, and using the usual(sigma, nu, theta)parameterization.- Parameters:
initialValue- Initial spot value.riskFreeRate- Constant risk-free rate.sigma- The volatility parameter.nu- The variance-of-time-change parameter.theta- The asymmetry parameter.lowerIntegrationBound- Lower integration bound for the log-jump variable.upperIntegrationBound- Upper integration bound for the log-jump variable.spaceTimeDiscretization- The space-time discretization.
-
-
Method Details
-
ofCGM
public static FDMVarianceGammaModel ofCGM(double initialValue, DiscountCurve riskFreeCurve, DiscountCurve dividendYieldCurve, double c, double g, double m, double lowerIntegrationBound, double upperIntegrationBound, SpaceTimeDiscretization spaceTimeDiscretization) Named factory using the(C,G,M)parameterization and explicit curves.- Parameters:
initialValue- Initial spot value.riskFreeCurve- Risk-free discount curve.dividendYieldCurve- Dividend yield discount curve.c- The parameterC.g- The parameterG.m- The parameterM.lowerIntegrationBound- Lower integration bound.upperIntegrationBound- Upper integration bound.spaceTimeDiscretization- The space-time discretization.- Returns:
- The corresponding Variance Gamma model.
-
ofCGM
public static FDMVarianceGammaModel ofCGM(double initialValue, DiscountCurve riskFreeCurve, double c, double g, double m, double lowerIntegrationBound, double upperIntegrationBound, SpaceTimeDiscretization spaceTimeDiscretization) Named factory using the(C,G,M)parameterization and zero dividend yield.- Parameters:
initialValue- Initial spot value.riskFreeCurve- Risk-free discount curve.c- The parameterC.g- The parameterG.m- The parameterM.lowerIntegrationBound- Lower integration bound.upperIntegrationBound- Upper integration bound.spaceTimeDiscretization- The space-time discretization.- Returns:
- The corresponding Variance Gamma model.
-
ofCGM
public static FDMVarianceGammaModel ofCGM(double initialValue, double riskFreeRate, double dividendYieldRate, double c, double g, double m, double lowerIntegrationBound, double upperIntegrationBound, SpaceTimeDiscretization spaceTimeDiscretization) Named factory using the(C,G,M)parameterization and flat rates.- Parameters:
initialValue- Initial spot value.riskFreeRate- Constant risk-free rate.dividendYieldRate- Constant dividend yield.c- The parameterC.g- The parameterG.m- The parameterM.lowerIntegrationBound- Lower integration bound.upperIntegrationBound- Upper integration bound.spaceTimeDiscretization- The space-time discretization.- Returns:
- The corresponding Variance Gamma model.
-
ofCGM
public static FDMVarianceGammaModel ofCGM(double initialValue, double riskFreeRate, double c, double g, double m, double lowerIntegrationBound, double upperIntegrationBound, SpaceTimeDiscretization spaceTimeDiscretization) Named factory using the(C,G,M)parameterization, flat risk-free rate, and zero dividend yield.- Parameters:
initialValue- Initial spot value.riskFreeRate- Constant risk-free rate.c- The parameterC.g- The parameterG.m- The parameterM.lowerIntegrationBound- Lower integration bound.upperIntegrationBound- Upper integration bound.spaceTimeDiscretization- The space-time discretization.- Returns:
- The corresponding Variance Gamma model.
-
getRiskFreeCurve
Description copied from interface:FiniteDifferenceEquityModelReturns the risk-free discount curve used for pricing.- Specified by:
getRiskFreeCurvein interfaceFiniteDifferenceEquityModel- Returns:
- The risk-free discount curve.
-
getDividendYieldCurve
Description copied from interface:FiniteDifferenceEquityModelReturns the dividend-yield discount curve.This is the legacy single-asset accessor and remains part of the interface to preserve backward compatibility with the current code base.
For true multi-asset models with one dividend curve per underlying, prefer
FiniteDifferenceEquityModel.getDividendYieldCurves(). Such models may override this method with a convention suitable for backward compatibility.- Specified by:
getDividendYieldCurvein interfaceFiniteDifferenceEquityModel- Returns:
- The dividend-yield discount curve.
-
getInitialValue
public double[] getInitialValue()Description copied from interface:FiniteDifferenceEquityModelReturns the initial state vector of the model.The returned values must be consistent with the state variables used by the PDE. For example, if the first spatial coordinate is
log(S), then the first component should belog(S0)rather thanS0.- Specified by:
getInitialValuein interfaceFiniteDifferenceEquityModel- Returns:
- The initial state vector.
-
getVarianceGammaJumpComponent
Returns the value.- Returns:
- The value.
-
getSpaceTimeDiscretization
Description copied from interface:FiniteDifferenceModelReturns the space-time discretization used by this finite difference model.The discretization defines the grid in both time and space on which the PDE approximation is constructed.
- Specified by:
getSpaceTimeDiscretizationin interfaceFiniteDifferenceModel- Returns:
- The
SpaceTimeDiscretizationused by this model.
-
getDrift
public double[] getDrift(double time, double... stateVariables) Description copied from interface:FiniteDifferenceEquityModelReturns the drift vector of the model state variables.The returned coefficients must be expressed in the same coordinates as the PDE state variables used by the finite-difference solver.
If the state vector is
X = (X1, ..., Xn), then this method returns the vectormu(t, X)indX_i(t) = mu_i(t, X_t) dt + ....- Specified by:
getDriftin interfaceFiniteDifferenceEquityModel- Parameters:
time- The evaluation time.stateVariables- The current values of the model state variables.- Returns:
- The drift vector.
-
getFactorLoading
public double[][] getFactorLoading(double time, double... stateVariables) Description copied from interface:FiniteDifferenceEquityModelReturns the factor-loading matrix of the model state variables.The returned coefficients must be expressed in the same coordinates as the PDE state variables used by the finite-difference solver.
If the state vector is
X = (X1, ..., Xn), then this method returns the matrixb(t, X)indX_i(t) = mu_i(t, X_t) dt + sum_j b_{i,j}(t, X_t) dW_j(t).- Specified by:
getFactorLoadingin interfaceFiniteDifferenceEquityModel- Parameters:
time- The evaluation time.stateVariables- The current values of the model state variables.- Returns:
- The factor-loading matrix.
-
getJumpComponent
Description copied from interface:FiniteDifferenceEquityModelReturns the optional jump component of the infinitesimal generator.The default implementation returns
Optional.empty(), corresponding to a purely diffusive model.If present, the returned
JumpComponentprovides the data needed to assemble the non-local jump part of the generator. The local coefficients returned byFiniteDifferenceEquityModel.getDrift(double, double...)andFiniteDifferenceEquityModel.getFactorLoading(double, double...)keep their current meaning and should remain consistent with the PDE state variables used by the finite-difference discretization.In particular, under the stock-coordinate convention intended for jump models in this framework,
FiniteDifferenceEquityModel.getDrift(double, double...)should continue to return the drift of the local first-order term, while the jump component defines the non-local operator in compensated form.For a one-dimensional spot variable
S, the jump contribution is understood in the formintegral [ f(S exp(y)) - f(S) - S (exp(y) - 1) f'(S) ] nu(dy).
The interpretation of the jump data must remain consistent with the chosen PDE state variables.
- Specified by:
getJumpComponentin interfaceFiniteDifferenceEquityModel- Returns:
- An
Optionalcontaining the jump component of the infinitesimal generator, orOptional.empty()if the model has no jump part.
-
getBoundaryConditionsAtLowerBoundary
public BoundaryCondition[] getBoundaryConditionsAtLowerBoundary(FiniteDifferenceEquityProduct product, double time, double... riskFactors) Description copied from interface:FiniteDifferenceBoundaryReturns the boundary conditions at the lower boundary.The returned array is indexed by state-variable dimension.
- Specified by:
getBoundaryConditionsAtLowerBoundaryin interfaceFiniteDifferenceBoundary- Parameters:
product- The product being valued.time- The running time.riskFactors- The state variables specifying the boundary location.- Returns:
- The lower-boundary conditions by dimension.
-
getBoundaryConditionsAtUpperBoundary
public BoundaryCondition[] getBoundaryConditionsAtUpperBoundary(FiniteDifferenceEquityProduct product, double time, double... riskFactors) Description copied from interface:FiniteDifferenceBoundaryReturns the boundary conditions at the upper boundary.The returned array is indexed by state-variable dimension.
- Specified by:
getBoundaryConditionsAtUpperBoundaryin interfaceFiniteDifferenceBoundary- Parameters:
product- The product being valued.time- The running time.riskFactors- The state variables specifying the boundary location.- Returns:
- The upper-boundary conditions by dimension.
-
getCloneWithModifiedSpaceTimeDiscretization
public FiniteDifferenceEquityModel getCloneWithModifiedSpaceTimeDiscretization(SpaceTimeDiscretization newSpaceTimeDiscretization) Description copied from interface:FiniteDifferenceEquityModelReturns a clone of this model with a modified space-time discretization.The returned model should represent the same stochastic dynamics and market data as the original one, but on the provided discretization.
- Specified by:
getCloneWithModifiedSpaceTimeDiscretizationin interfaceFiniteDifferenceEquityModel- Parameters:
newSpaceTimeDiscretization- The new space-time discretization.- Returns:
- A clone of this model with the modified discretization.
-