|
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.StrangleStrategyPayoff
This class gives an implementation of PayoffFunction for a standard strangle option strategy. The portfolio consists of one call and one put option.
| 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 |
public StrangleStrategyPayoff(int long_short,
double strike_price1,
double strike_price2)
throws Exception
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.
protected StrangleStrategyPayoff()
throws Exception
| Method Detail |
public double getValueAt(double t,
double[] x,
double[] path_dependent_values,
int n)
PayoffFunction
getValueAt in interface PayoffFunctiont - 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.
|
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 | |||||||||