public final class RecombiningTrinomialTreeData extends Object implements org.joda.beans.ImmutableBean, Serializable
This includes state values and transition probabilities for all of the nodes, as well as discount factors and time (time from valuation date) for individual time steps.
| Modifier and Type | Class and Description |
|---|---|
static class |
RecombiningTrinomialTreeData.Meta
The meta-bean for
RecombiningTrinomialTreeData. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
DoubleArray |
getDiscountFactor()
Gets the discount factor.
|
double |
getDiscountFactorAtLayer(int i)
Obtains discount factor between the
i-th layer to the (i+1)-th layer. |
int |
getNumberOfSteps()
Obtains the number of time steps.
|
DoubleMatrix |
getProbabilityAtLayer(int i)
Obtains the transition probability values at the
i-th time layer. |
double |
getSpot()
Obtains the spot.
|
DoubleMatrix |
getStateValue()
Gets the state value.
|
DoubleArray |
getStateValueAtLayer(int i)
Obtains the state values at the
i-th time layer. |
DoubleArray |
getTime()
Gets the time.
|
double |
getTime(int i)
Obtains the time for the
i-th layer. |
ImmutableList<DoubleMatrix> |
getTransitionProbability()
Gets the transition probability.
|
int |
hashCode() |
static RecombiningTrinomialTreeData.Meta |
meta()
The meta-bean for
RecombiningTrinomialTreeData. |
RecombiningTrinomialTreeData.Meta |
metaBean() |
static RecombiningTrinomialTreeData |
of(DoubleMatrix stateValue,
List<DoubleMatrix> transitionProbability,
DoubleArray discountFactor,
DoubleArray time)
Creates an instance.
|
String |
toString() |
public static RecombiningTrinomialTreeData of(DoubleMatrix stateValue, List<DoubleMatrix> transitionProbability, DoubleArray discountFactor, DoubleArray time)
stateValue - the state valuetransitionProbability - the transition probabilitydiscountFactor - the discount factortime - the timepublic int getNumberOfSteps()
public DoubleArray getStateValueAtLayer(int i)
i-th time layer.i - the layerpublic DoubleMatrix getProbabilityAtLayer(int i)
i-th time layer.i - the layerpublic double getDiscountFactorAtLayer(int i)
i-th layer to the (i+1)-th layer.i - the layerpublic double getSpot()
public double getTime(int i)
i-th layer.
The time is the year fraction between the 0-th layer and the i-th layer.
i - the layerpublic static RecombiningTrinomialTreeData.Meta meta()
RecombiningTrinomialTreeData.public RecombiningTrinomialTreeData.Meta metaBean()
metaBean in interface org.joda.beans.Beanpublic DoubleMatrix getStateValue()
The (i,j) component of this matrix represents the underlying asset price at the j-th lowest node
at the i-th time layer.
public ImmutableList<DoubleMatrix> getTransitionProbability()
The i-th element of the list represents the transition probability values for the nodes
at the i-th time layer.
The matrix is (2*i+1) times 3, and its j-th row involves [0] down probability,
[1] middle probability and [2] up probability for the j-th lowest node.
public DoubleArray getDiscountFactor()
The i-th element is the discount factor between the i-th layer and the (i+1)-th layer.
public DoubleArray getTime()
The i-th element is the year fraction between the 0-th time layer and the i-th layer.
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.