|
WebCab Options and Futures Demo v2.5 (J2SE Edition) |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--webcab.lib.finance.options.exotic.SpreadStrategyPayoff
This class gives an implementation of the PayoffFunction for a standard spread option strategy. The portfolio consists of one short and one long position with options of the same type.
| Constructor Summary | |
SpreadStrategyPayoff(int bull_bear,
double strike_price1,
double strike_price2)
Creates new SpreadStrategyPayoff function. |
|
| Method Summary | |
double |
getValueAt(double t,
double[] x,
double[] path_dependent_values,
int n)
Computes the value of the function in the point x. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public SpreadStrategyPayoff(int bull_bear,
double strike_price1,
double strike_price2)
throws Exception
bull_bear - Set this to ExoticOptionsConstants.BULL or ExoticOptionsConstants.BEAR. A
bull spread benefits from a bull (rising) market. A bear spread benefits from a
bear (falling) market.strike_price1 - The strike (exercise) price of the put option.strike_price2 - The strike (exercise) price of the call option.| Method Detail |
public double getValueAt(double t,
double[] x,
double[] path_dependent_values,
int n)
getValueAt in interface PayoffFunctionx - the point at which the function is evaluated.t - The time, used only for Bermudan options.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.
|
WebCab Options and Futures Demo v2.5 (J2SE Edition) |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||