Class FDMThetaMethod1DJump
- All Implemented Interfaces:
FDMSolver
The local diffusive part is handled through the usual theta-method discretization, leading to a tridiagonal linear system at each time step. The non-local jump contribution is treated explicitly and is therefore added to the right-hand side in IMEX form.
For a one-dimensional state variable x, the jump term is interpreted
as
integral [ u(x exp(y)) - u(x) - x (exp(y) - 1) u_x(x) ] nu(dy),
where y denotes the log-relative jump size.
The numerical quadrature splits the integration interval at zero in order to avoid sampling the Levy density exactly at the singular point. This makes the implementation suitable not only for finite-activity jump models such as Merton, but also for infinite-activity models such as Variance Gamma, provided the jump component supplies a finite numerical integration window.
Current scope:
- one-dimensional space grids only,
- jumps acting on state variable index
0, - explicit treatment of the jump operator,
- linear interpolation with constant extrapolation for shifted values.
- Author:
- Alessandro Gnoatto
-
Constructor Summary
ConstructorsConstructorDescriptionFDMThetaMethod1DJump(net.finmath.finitedifference.assetderivativevaluation.models.FiniteDifferenceEquityModel model, net.finmath.finitedifference.assetderivativevaluation.products.FiniteDifferenceEquityProduct product, net.finmath.finitedifference.grids.SpaceTimeDiscretization spaceTimeDiscretization, Exercise exercise) Creates a one-dimensional theta-method PIDE solver with explicit jump term.FDMThetaMethod1DJump(net.finmath.finitedifference.assetderivativevaluation.models.FiniteDifferenceEquityModel model, net.finmath.finitedifference.assetderivativevaluation.products.FiniteDifferenceEquityProduct product, net.finmath.finitedifference.grids.SpaceTimeDiscretization spaceTimeDiscretization, Exercise exercise, int quadraturePointsPerSide) Creates a one-dimensional theta-method PIDE solver with explicit jump term. -
Method Summary
Modifier and TypeMethodDescriptiondouble[]getValue(double evaluationTime, double time, double[] terminalValues) Returns the solution at a given evaluation time for terminal values already sampled on the spatial grid.double[]getValue(double evaluationTime, double time, double[] terminalValues, DoubleBinaryOperator continuousObstacleValue) Returns the solution at a given evaluation time for a problem with a continuous obstacle.double[]getValue(double evaluationTime, double time, double[] terminalValues, DoubleUnaryOperator exerciseValue) Returns the solution at a given evaluation time for a product with discrete early exercise opportunities.double[]getValue(double evaluationTime, double time, DoubleUnaryOperator valueAtMaturity) Returns the solution at a given evaluation time for a payoff specified as a terminal value function.double[][]getValues(double time, double[] terminalValues) Returns the full space-time solution for terminal values already sampled on the spatial grid.double[][]getValues(double time, double[] terminalValues, DoubleBinaryOperator continuousObstacleValue) Returns the full space-time solution for a problem with a continuous obstacle.double[][]getValues(double time, double[] terminalValues, DoubleUnaryOperator exerciseValue) Returns the full space-time solution for a product with discrete early exercise opportunities.double[][]getValues(double time, DoubleUnaryOperator valueAtMaturity) Returns the full space-time solution for a payoff specified as a terminal value function.
-
Constructor Details
-
FDMThetaMethod1DJump
public FDMThetaMethod1DJump(net.finmath.finitedifference.assetderivativevaluation.models.FiniteDifferenceEquityModel model, net.finmath.finitedifference.assetderivativevaluation.products.FiniteDifferenceEquityProduct product, net.finmath.finitedifference.grids.SpaceTimeDiscretization spaceTimeDiscretization, Exercise exercise) Creates a one-dimensional theta-method PIDE solver with explicit jump term.This constructor uses a default number of quadrature cells on each side of zero for the evaluation of the jump integral.
- Parameters:
model- The finite-difference model.product- The product to be valued.spaceTimeDiscretization- The space-time discretization.exercise- The exercise specification.
-
FDMThetaMethod1DJump
public FDMThetaMethod1DJump(net.finmath.finitedifference.assetderivativevaluation.models.FiniteDifferenceEquityModel model, net.finmath.finitedifference.assetderivativevaluation.products.FiniteDifferenceEquityProduct product, net.finmath.finitedifference.grids.SpaceTimeDiscretization spaceTimeDiscretization, Exercise exercise, int quadraturePointsPerSide) Creates a one-dimensional theta-method PIDE solver with explicit jump term.The local operator is handled implicitly through the theta method, while the jump contribution is evaluated explicitly by numerical quadrature.
- Parameters:
model- The finite-difference model.product- The product to be valued.spaceTimeDiscretization- The space-time discretization.exercise- The exercise specification.quadraturePointsPerSide- Number of quadrature cells used on each side of zero for the numerical evaluation of the jump integral.
-
-
Method Details
-
getValues
Returns the full space-time solution for a payoff specified as a terminal value function.The payoff is sampled on the spatial grid at maturity and then propagated backwards in time.
-
getValue
Returns the solution at a given evaluation time for a payoff specified as a terminal value function. -
getValues
public double[][] getValues(double time, double[] terminalValues) Returns the full space-time solution for terminal values already sampled on the spatial grid. -
getValue
public double[] getValue(double evaluationTime, double time, double[] terminalValues) Returns the solution at a given evaluation time for terminal values already sampled on the spatial grid. -
getValues
public double[][] getValues(double time, double[] terminalValues, DoubleUnaryOperator exerciseValue) Returns the full space-time solution for a product with discrete early exercise opportunities. -
getValue
public double[] getValue(double evaluationTime, double time, double[] terminalValues, DoubleUnaryOperator exerciseValue) Returns the solution at a given evaluation time for a product with discrete early exercise opportunities.- Specified by:
getValuein interfaceFDMSolver- Parameters:
evaluationTime- The time at which the solution is requested.time- The maturity time.terminalValues- The terminal values on the spatial grid.exerciseValue- The pointwise exercise value.- Returns:
- The solution vector on the spatial grid at the requested time.
-
getValues
public double[][] getValues(double time, double[] terminalValues, DoubleBinaryOperator continuousObstacleValue) Returns the full space-time solution for a problem with a continuous obstacle.- Parameters:
time- The maturity time.terminalValues- The terminal values on the spatial grid.continuousObstacleValue- The obstacle as a function of time and state.- Returns:
- The full space-time solution matrix.
-
getValue
public double[] getValue(double evaluationTime, double time, double[] terminalValues, DoubleBinaryOperator continuousObstacleValue) Returns the solution at a given evaluation time for a problem with a continuous obstacle.- Parameters:
evaluationTime- The time at which the solution is requested.time- The maturity time.terminalValues- The terminal values on the spatial grid.continuousObstacleValue- The obstacle as a function of time and state.- Returns:
- The solution vector on the spatial grid at the requested time.
-