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

webcab.lib.finance.options.exotic
Class StrangleStrategyPayoff

java.lang.Object
  |
  +--webcab.lib.finance.options.exotic.StrangleStrategyPayoff
All Implemented Interfaces:
PayoffFunction, Serializable
Direct Known Subclasses:
StraddleStrategyPayoff

public class StrangleStrategyPayoff
extends Object
implements PayoffFunction

This class gives an implementation of PayoffFunction for a standard strangle option strategy. The portfolio consists of one call and one put option.

See Also:
Serialized Form

Constructor Summary
protected StrangleStrategyPayoff()
           
  StrangleStrategyPayoff(int long_short, double strike_price1, double strike_price2)
          Creates new StrangleStrategyPayoff
 
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

StrangleStrategyPayoff

public StrangleStrategyPayoff(int long_short,
                              double strike_price1,
                              double strike_price2)
                       throws Exception
Creates new StrangleStrategyPayoff

Parameters:
long_short - Set this parameter to ExoticOptionsConstants.LONG or ExoticOptionsConstants.SHORT (LONG - means that you are the buyer of the strategy; SHORT means that you are the writer of the strategy).
strike_price1 - The strike (exercise) price of the put option.
strike_price2 - The strike (exercise) price of the call option.

StrangleStrategyPayoff

protected StrangleStrategyPayoff()
                          throws Exception
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)