Class BarrierOptionHestonModelBoundary
java.lang.Object
net.finmath.finitedifference.assetderivativevaluation.boundaries.BarrierOptionHestonModelBoundary
- All Implemented Interfaces:
FiniteDifferenceBoundary
Boundary conditions for
BarrierOption under the FDMHestonModel.
State variables are assumed to be (S, v), where S is the asset level and v
the variance.
For knock-out options, Dirichlet conditions are imposed on the barrier side
in the asset direction.
Variance-direction boundaries are left untouched via StandardBoundaryCondition.none().
The barrier is assumed to coincide with the lower or upper boundary of the asset grid. In-options may still be handled elsewhere by the product logic.
This version uses grid-aware continuation-side spot boundary values, with two targeted exceptions motivated by the remaining Heston outlier cases:
- for UP_OUT CALL at the lower spot boundary, use
none()instead of a hard zero, - for DOWN_OUT PUT at the upper spot boundary, use
none()instead of a hard zero.
- Author:
- Alessandro Gnoatto
-
Constructor Summary
ConstructorsConstructorDescriptionPerforms the operation. -
Method Summary
Modifier and TypeMethodDescriptiongetBoundaryConditionsAtLowerBoundary(FiniteDifferenceEquityProduct product, double time, double... stateVariables) Returns the boundary conditions at the lower boundary.getBoundaryConditionsAtUpperBoundary(FiniteDifferenceEquityProduct product, double time, double... stateVariables) Returns the boundary conditions at the upper boundary.
-
Constructor Details
-
BarrierOptionHestonModelBoundary
Performs the operation.- Parameters:
model- The value.
-
-
Method Details
-
getBoundaryConditionsAtLowerBoundary
public BoundaryCondition[] getBoundaryConditionsAtLowerBoundary(FiniteDifferenceEquityProduct product, double time, double... stateVariables) 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.stateVariables- The state variables specifying the boundary location.- Returns:
- The lower-boundary conditions by dimension.
-
getBoundaryConditionsAtUpperBoundary
public BoundaryCondition[] getBoundaryConditionsAtUpperBoundary(FiniteDifferenceEquityProduct product, double time, double... stateVariables) 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.stateVariables- The state variables specifying the boundary location.- Returns:
- The upper-boundary conditions by dimension.
-