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

webcab.lib.finance.options.exotic
Class Dirichlet

java.lang.Object
  |
  +--webcab.lib.finance.options.exotic.Dirichlet
All Implemented Interfaces:
Boundaries, DirichletBoundaries, Serializable
Direct Known Subclasses:
SimpleBoundaries

public abstract class Dirichlet
extends Object
implements DirichletBoundaries

When providing a custom Dirichlet type boundary, the user can extend this class instead of implementing DirichletBoundaries directly, as there is no need to implement each time the type method which always returns BT_DIRICHLET.

See Also:
Serialized Form

Constructor Summary
Dirichlet()
           
 
Method Summary
abstract  double getValueAt(double t, int i, boolean i_max, double[] not_fixed_x, int m)
          Returns the value of the option on the boundary.
 int type()
          Returns the type of the boundary.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Dirichlet

public Dirichlet()
          throws Exception
Method Detail

type

public final int type()
Description copied from interface: Boundaries
Returns the type of the boundary. Currently there are two types of boundaries supported (BT_DIRICHLET and BT_SECOND_ORDER) but only the first can be returned by the user.

Specified by:
type in interface Boundaries

getValueAt

public abstract double getValueAt(double t,
                                  int i,
                                  boolean i_max,
                                  double[] not_fixed_x,
                                  int m)
Returns the value of the option on the boundary. Must be implemented by the user.

Specified by:
getValueAt in interface DirichletBoundaries
Parameters:
t - the time
i - the index of the asset with fixed price. Counting begins with 0.
i_max - if true the method returns the value on the high boundary, otherwise it returns the value on the low boundary.
not_fixed_x - - a vector with m - 1 components - the prices of the remaining (not fixed) assets. It represents a point in the m - 1 dimensional space which represents the boundary. (a plane in the m diminsional space). Obs.: if m is 1 (one spatial coordinate <=> unidimensional <=> uni-asset) then the vector has 0 elements. In this case it will not be used to compute the result.
m - - the number of assets (equal to the number of spatial dimensions).
Returns:
the value of the option in the case that the i-th asset price is maximum or minimum, according to i_max, and the other m - 1 prices are given in not_fixed_i

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