Class BarrierPreHitSpecification

java.lang.Object
net.finmath.finitedifference.solvers.adi.BarrierPreHitSpecification

public final class BarrierPreHitSpecification extends Object
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 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

      public BarrierType getBarrierType()
      Returns the knock-in barrier type.
      Returns:
      The barrier type.
    • 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

      public ActivatedBarrierTrace2D 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.