Class TouchOption
- All Implemented Interfaces:
FiniteDifferenceEquityEventProduct, FiniteDifferenceEquityProduct, FiniteDifferenceInternalStateConstraint, FiniteDifferenceOneDimensionalKnockInProduct, FiniteDifferenceProduct<FiniteDifferenceEquityModel>, Product
The product pays a fixed cash amount N depending on whether a barrier event occurs during the life of the contract. Let T denote the maturity, B the barrier and S(t) the underlying level.
tau_B = inf { t in [0,T] : S(t) <= B } for a down barrier,
tau_B = inf { t in [0,T] : S(t) >= B } for an up barrier.
One-touch at expiry: V(T) = N 1_{tau_B <= T}
No-touch at expiry: V(T) = N 1_{tau_B > T}
One-touch at hit: V(tau_B) = N
For expiry settlement, the post-hit state carries the discounted cash amount maturing at T. In other words, once the barrier has been activated, the continuation value is the deterministic cash value implied by the model discount curve.
Barrier-type semantics:
BarrierType.DOWN_INandBarrierType.UP_INrepresent one- touch products,BarrierType.DOWN_OUTandBarrierType.UP_OUTrepresent no- touch products.
Settlement semantics:
TouchSettlementTiming.AT_EXPIRY: the hit / no-hit event is monitored over the full option life and the payoff is settled at maturity,TouchSettlementTiming.AT_HIT: the cash amount is paid immediately when the barrier is hit for the first time; this is currently supported only for one-touch products.
Monitoring semantics:
MonitoringType.CONTINUOUS: the current continuous-monitoring implementation is used,MonitoringType.DISCRETE: monitoring is applied only on the prescribed monitoring dates via vector event conditions. First milestone scope is 1D European cash touch / no-touch.
- Author:
- Alessandro Gnoatto
-
Constructor Summary
ConstructorsConstructorDescriptionTouchOption(double maturity, double barrierValue, BarrierType barrierType, double payoffAmount) Performs the operation.TouchOption(double maturity, double barrierValue, BarrierType barrierType, double payoffAmount, TouchSettlementTiming settlementTiming) Performs the operation.TouchOption(double maturity, double barrierValue, BarrierType barrierType, double payoffAmount, TouchSettlementTiming settlementTiming, Exercise exercise) Performs the operation.TouchOption(double maturity, double barrierValue, BarrierType barrierType, double payoffAmount, TouchSettlementTiming settlementTiming, Exercise exercise, MonitoringType monitoringType, double[] monitoringTimes) Performs the operation.TouchOption(String underlyingName, double maturity, double barrierValue, BarrierType barrierType, double payoffAmount) Performs the operation.TouchOption(String underlyingName, double maturity, double barrierValue, BarrierType barrierType, double payoffAmount, Exercise exercise) Performs the operation.TouchOption(String underlyingName, double maturity, double barrierValue, BarrierType barrierType, double payoffAmount, TouchSettlementTiming settlementTiming) Performs the operation.TouchOption(String underlyingName, double maturity, double barrierValue, BarrierType barrierType, double payoffAmount, TouchSettlementTiming settlementTiming, Exercise exercise) Performs the operation.TouchOption(String underlyingName, double maturity, double barrierValue, BarrierType barrierType, double payoffAmount, TouchSettlementTiming settlementTiming, Exercise exercise, MonitoringType monitoringType, double[] monitoringTimes) Performs the operation. -
Method Summary
Modifier and TypeMethodDescriptiondouble[]applyEventCondition(double time, double[] valuesAfterEvent, FiniteDifferenceEquityModel model) Performs the operation.Returns the barrier type.doubleReturns the barrier level.doublegetConstrainedValue(double time, double... stateVariables) Returns the value to impose at a constrained node.double[]Returns the value.Returns the value.doubleReturns the value prescribed in the inactive regime at maturity.doubleReturns the maturity.double[]Returns the value.Returns the value.doubleReturns the value.Returns the value.Returns the value.double[]getValue(double evaluationTime, FiniteDifferenceEquityModel model) Returns the value.double[][]Returns the value.booleanisConstraintActive(double time, double... stateVariables) Returns true if the internal constraint is active at the given node and time.static TouchOptionnoTouchAtExpiry(double maturity, double barrierValue, BarrierType barrierType, double payoffAmount) Performs the operation.static TouchOptionnoTouchAtExpiry(String underlyingName, double maturity, double barrierValue, BarrierType barrierType, double payoffAmount) Performs the operation.static TouchOptiononeTouchAtExpiry(double maturity, double barrierValue, BarrierType barrierType, double payoffAmount) Performs the operation.static TouchOptiononeTouchAtExpiry(String underlyingName, double maturity, double barrierValue, BarrierType barrierType, double payoffAmount) Performs the operation.static TouchOptiononeTouchAtHit(double maturity, double barrierValue, BarrierType barrierType, double payoffAmount) Performs the operation.static TouchOptiononeTouchAtHit(String underlyingName, double maturity, double barrierValue, BarrierType barrierType, double payoffAmount) Performs the operation.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface FiniteDifferenceEquityProduct
getModelClassMethods inherited from interface FiniteDifferenceProduct
getValue
-
Constructor Details
-
TouchOption
public TouchOption(String underlyingName, double maturity, double barrierValue, BarrierType barrierType, double payoffAmount, TouchSettlementTiming settlementTiming, Exercise exercise) Performs the operation.- Parameters:
underlyingName- The value.maturity- The value.barrierValue- The value.barrierType- The value.payoffAmount- The value.settlementTiming- The value.exercise- The value.
-
TouchOption
public TouchOption(String underlyingName, double maturity, double barrierValue, BarrierType barrierType, double payoffAmount, TouchSettlementTiming settlementTiming, Exercise exercise, MonitoringType monitoringType, double[] monitoringTimes) Performs the operation.- Parameters:
underlyingName- The value.maturity- The value.barrierValue- The value.barrierType- The value.payoffAmount- The value.settlementTiming- The value.exercise- The value.monitoringType- The value.monitoringTimes- The value.
-
TouchOption
public TouchOption(String underlyingName, double maturity, double barrierValue, BarrierType barrierType, double payoffAmount, TouchSettlementTiming settlementTiming) Performs the operation.- Parameters:
underlyingName- The value.maturity- The value.barrierValue- The value.barrierType- The value.payoffAmount- The value.settlementTiming- The value.
-
TouchOption
public TouchOption(String underlyingName, double maturity, double barrierValue, BarrierType barrierType, double payoffAmount, Exercise exercise) Performs the operation.- Parameters:
underlyingName- The value.maturity- The value.barrierValue- The value.barrierType- The value.payoffAmount- The value.exercise- The value.
-
TouchOption
public TouchOption(String underlyingName, double maturity, double barrierValue, BarrierType barrierType, double payoffAmount) Performs the operation.- Parameters:
underlyingName- The value.maturity- The value.barrierValue- The value.barrierType- The value.payoffAmount- The value.
-
TouchOption
public TouchOption(double maturity, double barrierValue, BarrierType barrierType, double payoffAmount, TouchSettlementTiming settlementTiming) Performs the operation.- Parameters:
maturity- The value.barrierValue- The value.barrierType- The value.payoffAmount- The value.settlementTiming- The value.
-
TouchOption
public TouchOption(double maturity, double barrierValue, BarrierType barrierType, double payoffAmount) Performs the operation.- Parameters:
maturity- The value.barrierValue- The value.barrierType- The value.payoffAmount- The value.
-
TouchOption
public TouchOption(double maturity, double barrierValue, BarrierType barrierType, double payoffAmount, TouchSettlementTiming settlementTiming, Exercise exercise, MonitoringType monitoringType, double[] monitoringTimes) Performs the operation.- Parameters:
maturity- The value.barrierValue- The value.barrierType- The value.payoffAmount- The value.settlementTiming- The value.exercise- The value.monitoringType- The value.monitoringTimes- The value.
-
TouchOption
public TouchOption(double maturity, double barrierValue, BarrierType barrierType, double payoffAmount, TouchSettlementTiming settlementTiming, Exercise exercise) Performs the operation.- Parameters:
maturity- The value.barrierValue- The value.barrierType- The value.payoffAmount- The value.settlementTiming- The value.exercise- The value.
-
-
Method Details
-
oneTouchAtExpiry
public static TouchOption oneTouchAtExpiry(String underlyingName, double maturity, double barrierValue, BarrierType barrierType, double payoffAmount) Performs the operation.- Parameters:
underlyingName- The value.maturity- The value.barrierValue- The value.barrierType- The value.payoffAmount- The value.- Returns:
- The value.
-
oneTouchAtExpiry
public static TouchOption oneTouchAtExpiry(double maturity, double barrierValue, BarrierType barrierType, double payoffAmount) Performs the operation.- Parameters:
maturity- The value.barrierValue- The value.barrierType- The value.payoffAmount- The value.- Returns:
- The value.
-
oneTouchAtHit
public static TouchOption oneTouchAtHit(String underlyingName, double maturity, double barrierValue, BarrierType barrierType, double payoffAmount) Performs the operation.- Parameters:
underlyingName- The value.maturity- The value.barrierValue- The value.barrierType- The value.payoffAmount- The value.- Returns:
- The value.
-
oneTouchAtHit
public static TouchOption oneTouchAtHit(double maturity, double barrierValue, BarrierType barrierType, double payoffAmount) Performs the operation.- Parameters:
maturity- The value.barrierValue- The value.barrierType- The value.payoffAmount- The value.- Returns:
- The value.
-
noTouchAtExpiry
public static TouchOption noTouchAtExpiry(String underlyingName, double maturity, double barrierValue, BarrierType barrierType, double payoffAmount) Performs the operation.- Parameters:
underlyingName- The value.maturity- The value.barrierValue- The value.barrierType- The value.payoffAmount- The value.- Returns:
- The value.
-
noTouchAtExpiry
public static TouchOption noTouchAtExpiry(double maturity, double barrierValue, BarrierType barrierType, double payoffAmount) Performs the operation.- Parameters:
maturity- The value.barrierValue- The value.barrierType- The value.payoffAmount- The value.- Returns:
- The value.
-
getValue
Description copied from interface:FiniteDifferenceProductReturns the value.- Specified by:
getValuein interfaceFiniteDifferenceProduct<FiniteDifferenceEquityModel>- Parameters:
evaluationTime- The value.model- The value.- Returns:
- The value.
-
getValues
Description copied from interface:FiniteDifferenceProductReturns the value.- Specified by:
getValuesin interfaceFiniteDifferenceProduct<FiniteDifferenceEquityModel>- Parameters:
model- The value.- Returns:
- The value.
-
getEventTimes
public double[] getEventTimes()Description copied from interface:FiniteDifferenceEquityEventProductReturns the value.- Specified by:
getEventTimesin interfaceFiniteDifferenceEquityEventProduct- Returns:
- The value.
-
applyEventCondition
public double[] applyEventCondition(double time, double[] valuesAfterEvent, FiniteDifferenceEquityModel model) Description copied from interface:FiniteDifferenceEquityEventProductPerforms the operation.- Specified by:
applyEventConditionin interfaceFiniteDifferenceEquityEventProduct- Parameters:
time- The value.valuesAfterEvent- The value.model- The value.- Returns:
- The value.
-
isConstraintActive
public boolean isConstraintActive(double time, double... stateVariables) Description copied from interface:FiniteDifferenceInternalStateConstraintReturns true if the internal constraint is active at the given node and time.- Specified by:
isConstraintActivein interfaceFiniteDifferenceInternalStateConstraint- Parameters:
time- Running time.stateVariables- State variables at the grid node.- Returns:
- True if the node is constrained.
-
getConstrainedValue
public double getConstrainedValue(double time, double... stateVariables) Description copied from interface:FiniteDifferenceInternalStateConstraintReturns the value to impose at a constrained node.This method is called only if
FiniteDifferenceInternalStateConstraint.isConstraintActive(double, double...)returns true.- Specified by:
getConstrainedValuein interfaceFiniteDifferenceInternalStateConstraint- Parameters:
time- Running time.stateVariables- State variables at the grid node.- Returns:
- The constrained value.
-
getUnderlyingName
-
getMaturity
public double getMaturity()Description copied from interface:FiniteDifferenceOneDimensionalKnockInProductReturns the maturity.- Specified by:
getMaturityin interfaceFiniteDifferenceOneDimensionalKnockInProduct- Returns:
- The maturity.
-
getBarrierValue
public double getBarrierValue()Description copied from interface:FiniteDifferenceOneDimensionalKnockInProductReturns the barrier level.- Specified by:
getBarrierValuein interfaceFiniteDifferenceOneDimensionalKnockInProduct- Returns:
- The barrier level.
-
getBarrierType
Description copied from interface:FiniteDifferenceOneDimensionalKnockInProductReturns the barrier type.- Specified by:
getBarrierTypein interfaceFiniteDifferenceOneDimensionalKnockInProduct- Returns:
- The barrier type.
-
getPayoffAmount
public double getPayoffAmount()Returns the value.- Returns:
- The value.
-
getSettlementTiming
-
getExercise
-
getMonitoringType
-
getMonitoringTimes
public double[] getMonitoringTimes()Returns the value.- Returns:
- The value.
-
getInactiveValueAtMaturity
public double getInactiveValueAtMaturity()Description copied from interface:FiniteDifferenceOneDimensionalKnockInProductReturns the value prescribed in the inactive regime at maturity.This is the terminal value in the no-hit region. For vanilla barrier options this is typically the rebate. For digital barrier options it is typically
0.0.- Specified by:
getInactiveValueAtMaturityin interfaceFiniteDifferenceOneDimensionalKnockInProduct- Returns:
- The inactive value at maturity.
-