org.jquantlib.instruments
Class DiscretizedAsset
- java.lang.Object
-
- org.jquantlib.instruments.DiscretizedAsset
-
- Direct Known Subclasses:
- DiscretizedConvertible, DiscretizedDiscountBond, DiscretizedOption, DiscretizedVanillaOption
public abstract class DiscretizedAsset extends java.lang.ObjectDiscretized asset class used by numerical methods
-
-
Constructor Summary
Constructors Constructor and Description DiscretizedAsset()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method and Description voidadjustValues()This method performs both pre- and post-adjustmentvoidinitialize(Lattice method, double t)abstract java.util.List<java.lang.Double>mandatoryTimes()This method returns the times at which the numerical method should stop while rolling back the asset.Latticemethod()voidpartialRollback(double to)voidpostAdjustValues()This method will be invoked after rollback and after any other asset had their chance to look at the values.voidpreAdjustValues()This method will be invoked after rollback and before any other asset (i.e., an option on this one) has any chance to look at the values.doublepresentValue()abstract voidreset(int size)This method should initialize the asset values to an Array of the given size and with values depending on the particular asset.voidrollback(double to)voidsetTime(double t)voidsetValues(Array newValues)doubletime()Arrayvalues()
-
-
-
Method Detail
-
time
public double time()
-
setTime
public void setTime(double t)
-
values
public Array values()
-
method
public Lattice method()
-
initialize
public void initialize(Lattice method, double t)
-
rollback
public void rollback(double to)
-
partialRollback
public void partialRollback(double to)
-
presentValue
public double presentValue()
-
reset
public abstract void reset(int size)
This method should initialize the asset values to an Array of the given size and with values depending on the particular asset.
-
mandatoryTimes
public abstract java.util.List<java.lang.Double> mandatoryTimes()
This method returns the times at which the numerical method should stop while rolling back the asset. Typical examples include payment times, exercise times and such.
-
preAdjustValues
public void preAdjustValues()
This method will be invoked after rollback and before any other asset (i.e., an option on this one) has any chance to look at the values. For instance, payments happening at times already spanned by the rollback will be added here.This method is not virtual; derived classes must override the protected preAdjustValuesImpl() method instead.
-
postAdjustValues
public void postAdjustValues()
This method will be invoked after rollback and after any other asset had their chance to look at the values. For instance, payments happening at the present time (and therefore not included in an option to be exercised at this time) will be added here.This method is not virtual; derived classes must override the protected postAdjustValuesImpl() method instead.
-
adjustValues
public void adjustValues()
This method performs both pre- and post-adjustment
-
setValues
public void setValues(Array newValues)
-
-
DataMelt 3.0 © DataMelt by jWork.ORG