- All Known Implementing Classes:
EuropeanOptionWithBoundary.ConstantBarrier
public interface Barrier
The interface describes how an barrier has to be specified for the generation of a process (see LogNormalProcessWithBarrierStrategy).
- Since:
- finmath-lib 4.1.0
- Version:
- 1.0
- Author:
- Christian Fries
-
Method Summary
Modifier and TypeMethodDescriptiongetBarrierDirection(int timeIndex, RandomVariable[] randomVariable)
The barrier direction, i.e.getBarrierLevel(int timeIndex, RandomVariable[] randomVariable)
The barrier levelboolean
-
Method Details
-
getBarrierDirection
RandomVariableFromDoubleArray[] getBarrierDirection(int timeIndex, RandomVariable[] randomVariable)The barrier direction, i.e. a (stochastic) projection vector for the components)- Parameters:
timeIndex
- Time index associated with the model time discretization.randomVariable
- Model process realization at timeIndex.- Returns:
- Direction of barrier.
-
getBarrierLevel
RandomVariable getBarrierLevel(int timeIndex, RandomVariable[] randomVariable) throws CalculationExceptionThe barrier level- Parameters:
timeIndex
- Time index associated with the model time discretization.randomVariable
- Model process realization at timeIndex.- Returns:
- Level of barrier.
- Throws:
CalculationException
- Thrown if the valuation fails, specific cause may be available via thecause()
method.
-
isUpperBarrier
boolean isUpperBarrier()- Returns:
- Returns true, if the barrier is an upper barrier. Returns false, if the barrier is an lower barrier.
-