WebCab Options and Futures Demo
v2.5
(J2SE Edition)

webcab.lib.finance.options.exotic
Class StronglyPathDependentPayoff

java.lang.Object
  |
  +--webcab.lib.finance.options.exotic.StronglyPathDependentPayoff
All Implemented Interfaces:
PayoffFunction, Serializable

public class StronglyPathDependentPayoff
extends Object
implements PayoffFunction

This class gives an implementation of PayoffFunction for standard strongly path dependent options. The payoff for a strongly path dependent option is independent of the updating formula. So you will use this class for all kinds of SPD options (for example with ASIAN_ARITHMETIC, LOOKBACK_MAX etc.).

See Also:
Serialized Form

Constructor Summary
StronglyPathDependentPayoff(int call_put, int long_short, int strike_rate, double strike_price)
          Creates new StronglyPathDependentPayoff function.
 
Method Summary
 double getValueAt(double t, double[] x, double[] path_dependent_values, int n)
          Computes the value of the payoff function.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StronglyPathDependentPayoff

public StronglyPathDependentPayoff(int call_put,
                                   int long_short,
                                   int strike_rate,
                                   double strike_price)
                            throws Exception
Creates new StronglyPathDependentPayoff function.

Parameters:
call_put - Set this parameter to ExoticOptionsConstants.CALL or ExoticOptionsConstants.PUT
long_short - Set this parameter to ExoticOptionsConstants.LONG or ExoticOptionsConstants.SHORT (LONG - means that you buy the option; SHORT means that you are the writer of the option).
strike_price - The strike (exercise) price of the option.
Method Detail

getValueAt

public double getValueAt(double t,
                         double[] x,
                         double[] path_dependent_values,
                         int n)
Description copied from interface: PayoffFunction
Computes the value of the payoff function. If you don't need one or more parameters which are supplied, you can simply ignore them.

Specified by:
getValueAt in interface PayoffFunction
Parameters:
t - The time, used only for Bermudan options.
x - A vector containing n asset prices.
path_dependent_values - a vector containing the path dependent values. associated with the asset prices. Used only for strongly path dependent options.
n - the total number of assets.
Returns:
The value of the payoff function.

WebCab Options and Futures Demo
v2.5
(J2SE Edition)