Class BarrierPreHitSpecification
java.lang.Object
net.finmath.finitedifference.solvers.adi.BarrierPreHitSpecification
Immutable specification for the pre-hit continuation PDE used in the direct
2D knock-in formulation.
The pre-hit PDE is solved only on the continuation side of the barrier. The barrier itself is represented by a spot-side interface row carrying the activated trace.
- Author:
- Alessandro Gnoatto
-
Constructor Summary
ConstructorsConstructorDescriptionBarrierPreHitSpecification(BarrierType barrierType, double barrierValue, int barrierSpotIndex, double spotMin, double spotMax, int numberOfSpotSteps, ActivatedBarrierTrace2D activatedTrace) Creates the pre-hit PDE specification. -
Method Summary
Modifier and TypeMethodDescriptionReturns the activated trace prescribed on the barrier.intReturns the barrier node index on the pre-hit spot grid.Returns the knock-in barrier type.doubleReturns the barrier level.intReturns the number of spot steps of the pre-hit uniform grid.doubleReturns the upper bound of the pre-hit spot domain.doubleReturns the lower bound of the pre-hit spot domain.doubleReturns the implied uniform spot step size.booleanisDownIn()Returns true if the pre-hit domain corresponds to a down-in option.booleanisUpIn()Returns true if the pre-hit domain corresponds to an up-in option.
-
Constructor Details
-
BarrierPreHitSpecification
public BarrierPreHitSpecification(BarrierType barrierType, double barrierValue, int barrierSpotIndex, double spotMin, double spotMax, int numberOfSpotSteps, ActivatedBarrierTrace2D activatedTrace) Creates the pre-hit PDE specification.- Parameters:
barrierType- The barrier type. Only DOWN_IN and UP_IN are valid here.barrierValue- The barrier level.barrierSpotIndex- The spot-grid index corresponding to the barrier node on the pre-hit auxiliary grid.spotMin- The lower bound of the pre-hit spot grid.spotMax- The upper bound of the pre-hit spot grid.numberOfSpotSteps- The number of uniform spot steps.activatedTrace- The activated post-hit trace prescribed on the barrier.
-
-
Method Details
-
getBarrierType
-
getBarrierValue
public double getBarrierValue()Returns the barrier level.- Returns:
- The barrier value.
-
getBarrierSpotIndex
public int getBarrierSpotIndex()Returns the barrier node index on the pre-hit spot grid.- Returns:
- The barrier spot index.
-
getSpotMin
public double getSpotMin()Returns the lower bound of the pre-hit spot domain.- Returns:
- The lower spot bound.
-
getSpotMax
public double getSpotMax()Returns the upper bound of the pre-hit spot domain.- Returns:
- The upper spot bound.
-
getNumberOfSpotSteps
public int getNumberOfSpotSteps()Returns the number of spot steps of the pre-hit uniform grid.- Returns:
- The number of spot steps.
-
getActivatedTrace
Returns the activated trace prescribed on the barrier.- Returns:
- The activated barrier trace.
-
isDownIn
public boolean isDownIn()Returns true if the pre-hit domain corresponds to a down-in option.- Returns:
- True for down-in.
-
isUpIn
public boolean isUpIn()Returns true if the pre-hit domain corresponds to an up-in option.- Returns:
- True for up-in.
-
getSpotStepSize
public double getSpotStepSize()Returns the implied uniform spot step size.- Returns:
- The spot step size.
-