|
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.BinaryPayoff
This class gives an implementation of PayoffFunction for a binary option. A binary call is a contract which pays the holder a specified price at expiry if the asset price is greater than the strike price. Similarly a binary put pays the holder a specified amount if the asset price at expiry is less than the strike price.
| Constructor Summary | |
BinaryPayoff(int call_put,
int long_short,
double strike_price,
double high_payoff)
Creates new BinaryPayoff |
|
| 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 BinaryPayoff(int call_put,
int long_short,
double strike_price,
double high_payoff)
throws Exception
call_put - Set this parameter to ExoticOptionsConstants.CALL or ExoticOptionsConstants.PUTlong_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.high_payoff - The amount of money the holder receives if the asset price
is higher/lower than the strike price for CALL/PUT options respectively.| 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 | |||||||||