All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class optionCalc.AbstractOption

java.lang.Object
   |
   +----optionCalc.AbstractOption

public abstract class AbstractOption
extends Object

Constructor Index

 o AbstractOption(int, double, double, double, double)
A superclass constructor for derived objects, this function sets the initial values of the member fields.

Method Index

 o calc_american_option()
Calculates the option value on the PDAG using the American method where payoff can be evaluated at any node
 o calc_european_option()
Calculates the option value on the PDAG using the European method where payoff is evaluated only at the time horizon.
 o F(double, double)
Determines how the auxillary process evolves over time.
 o genPDAG()
Generates the PDAG out to the time Horizon T according to the values of the member fields.
 o payoff(double, double, int)
Determines the payoff in terms of the stock price, auxilliary process and time.
 o printPDAG()
Prints the PDAG.

Constructors

 o AbstractOption
 public AbstractOption(int T,
                       double r,
                       double u,
                       double d,
                       double s_0)
A superclass constructor for derived objects, this function sets the initial values of the member fields.

Parameters:
T - the (int) time Horizon
r - the (double) short rate
u - the (double) up-factor
d - the (double) down-factor
s_0 - the (double) initial stock price

Methods

 o F
 public abstract double F(double s,
                          double x)
Determines how the auxillary process evolves over time. This method is abstract and must be implemented in a derived class.

Parameters:
s - the (double) new stock price
x - the (double) old value of the aux process
 o payoff
 public abstract double payoff(double s,
                               double x,
                               int t)
Determines the payoff in terms of the stock price, auxilliary process and time. This method is abstract and must be implemented in a derived class.

Parameters:
s - the (double) stock price
x - the (double) value of the aux process
t - the (int) time value
 o genPDAG
 public void genPDAG()
Generates the PDAG out to the time Horizon T according to the values of the member fields. Must be called before any of the calc methods.

 o calc_european_option
 public void calc_european_option()
Calculates the option value on the PDAG using the European method where payoff is evaluated only at the time horizon.

 o calc_american_option
 public void calc_american_option()
Calculates the option value on the PDAG using the American method where payoff can be evaluated at any node

 o printPDAG
 public void printPDAG()
Prints the PDAG.


All Packages  Class Hierarchy  This Package  Previous  Next  Index