Class BarrierOptionSabrModelBoundary
java.lang.Object
net.finmath.finitedifference.assetderivativevaluation.boundaries.BarrierOptionSabrModelBoundary
- All Implemented Interfaces:
FiniteDifferenceBoundary
Boundary conditions for
BarrierOption under the FDMSabrModel.
State variables are assumed to be (S, alpha), where S is the
asset level and alpha the stochastic volatility factor.
For knock-out options, Dirichlet conditions are imposed on the barrier side
in the asset direction. Volatility-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:
- for
UP_OUT CALLat the lower spot boundary, usenone()instead of a hard zero, - for
DOWN_OUT PUTat the upper spot boundary, usenone()instead of a hard zero.
- Author:
- Alessandro Gnoatto
-
Constructor Summary
Constructors -
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
-
BarrierOptionSabrModelBoundary
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.
-