Class RecombiningTrinomialTreeData

  • All Implemented Interfaces:
    Serializable, org.joda.beans.Bean, org.joda.beans.ImmutableBean

    public final class RecombiningTrinomialTreeData
    extends Object
    implements org.joda.beans.ImmutableBean, Serializable
    Recombining trinomial tree data.

    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.

    See Also:
    Serialized Form
    • Method Detail

      • getNumberOfSteps

        public int getNumberOfSteps()
        Obtains the number of time steps.
        Returns:
        the number of time steps
      • getStateValueAtLayer

        public DoubleArray getStateValueAtLayer​(int i)
        Obtains the state values at the i-th time layer.
        Parameters:
        i - the layer
        Returns:
        the state values
      • getProbabilityAtLayer

        public DoubleMatrix getProbabilityAtLayer​(int i)
        Obtains the transition probability values at the i-th time layer.
        Parameters:
        i - the layer
        Returns:
        the transition probability
      • getDiscountFactorAtLayer

        public double getDiscountFactorAtLayer​(int i)
        Obtains discount factor between the i-th layer to the (i+1)-th layer.
        Parameters:
        i - the layer
        Returns:
        the discount factor
      • getSpot

        public double getSpot()
        Obtains the spot.
        Returns:
        the spot
      • getTime

        public double getTime​(int i)
        Obtains the time for the i-th layer.

        The time is the year fraction between the 0-th layer and the i-th layer.

        Parameters:
        i - the layer
        Returns:
        the time
      • getStateValue

        public DoubleMatrix getStateValue()
        Gets the state value.

        The (i,j) component of this matrix represents the underlying asset price at the j-th lowest node at the i-th time layer.

        Returns:
        the value of the property
      • getTransitionProbability

        public ImmutableList<DoubleMatrix> getTransitionProbability()
        Gets the transition probability.

        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.

        Returns:
        the value of the property
      • getDiscountFactor

        public DoubleArray getDiscountFactor()
        Gets the discount factor.

        The i-th element is the discount factor between the i-th layer and the (i+1)-th layer.

        Returns:
        the value of the property
      • getTime

        public DoubleArray getTime()
        Gets the time.

        The i-th element is the year fraction between the 0-th time layer and the i-th layer.

        Returns:
        the value of the property
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object