Class SingleFactorStateEvolver

java.lang.Object
org.drip.dynamics.hullwhite.SingleFactorStateEvolver
All Implemented Interfaces:
PointStateEvolver

public class SingleFactorStateEvolver
extends java.lang.Object
implements PointStateEvolver
SingleFactorStateEvolver provides the Hull-White One-Factor Gaussian HJM Short Rate Dynamics Implementation.

Author:
Lakshmi Krishnamurthy
  • Constructor Details

    • SingleFactorStateEvolver

      public SingleFactorStateEvolver​(FundingLabel lslFunding, double dblSigma, double dblA, R1ToR1 auIFRInitial, UnivariateSequenceGenerator usg) throws java.lang.Exception
      SingleFactorStateEvolver Constructor
      Parameters:
      lslFunding - The Funding Latent State Label
      dblSigma - Sigma
      dblA - A
      auIFRInitial - The Initial Instantaneous Forward Rate Term Structure
      usg - Univariate Random Sequence Generator
      Throws:
      java.lang.Exception - Thrown if the Inputs are Invalid
  • Method Details

    • fundingLabel

      public FundingLabel fundingLabel()
      Retrieve the Funding Label
      Returns:
      The Funding Label
    • sigma

      public double sigma()
      Retrieve Sigma
      Returns:
      Sigma
    • a

      public double a()
      Retrieve A
      Returns:
      A
    • ifrInitialTermStructure

      public R1ToR1 ifrInitialTermStructure()
      Retrieve the Initial Instantaneous Forward Rate Term Structure
      Returns:
      The Initial Instantaneous Forward Rate Term Structure
    • rsg

      Retrieve the Random Sequence Generator
      Returns:
      The Random Sequence Generator
    • alpha

      public double alpha​(int iSpotDate, int iViewDate) throws java.lang.Exception
      Calculate the Alpha
      Parameters:
      iSpotDate - The Spot Date
      iViewDate - The View Date
      Returns:
      Alpha
      Throws:
      java.lang.Exception - Thrown if Alpha cannot be computed
    • theta

      public double theta​(int iSpotDate, int iViewDate) throws java.lang.Exception
      Calculate the Theta
      Parameters:
      iSpotDate - The Spot Date
      iViewDate - The View Date
      Returns:
      Theta
      Throws:
      java.lang.Exception - Thrown if Theta cannot be computed
    • shortRateIncrement

      public double shortRateIncrement​(int iSpotDate, int iViewDate, double dblShortRate, int iViewTimeIncrement) throws java.lang.Exception
      Calculate the Short Rate Increment
      Parameters:
      iSpotDate - The Spot Date
      iViewDate - The View Date
      dblShortRate - The Short Rate
      iViewTimeIncrement - The View Time Increment
      Returns:
      The Short Rate Increment
      Throws:
      java.lang.Exception - Thrown if the Short Rate cannot be computed
    • evolve

      public LSQMPointUpdate evolve​(int iSpotDate, int iViewDate, int iSpotTimeIncrement, LSQMPointUpdate lsqmPrev)
      Description copied from interface: PointStateEvolver
      Evolve the Latent State and return the LSQM Point Update
      Specified by:
      evolve in interface PointStateEvolver
      Parameters:
      iSpotDate - The Spot Date
      iViewDate - The View Date
      iSpotTimeIncrement - The Spot Time Increment
      lsqmPrev - The Previous LSQM Point Update
      Returns:
      The LSQM Point Update
    • evolveTrinomialTree

      public TrinomialTreeTransitionMetrics evolveTrinomialTree​(int iSpotDate, int iInitialDate, int iTerminalDate, TrinomialTreeNodeMetrics hwnmInitial)
      Generate the Metrics associated with the Transition that results from using a Trinomial Tree Using the Starting Node Metrics
      Parameters:
      iSpotDate - The Spot/Epoch Date
      iInitialDate - The Initial Date
      iTerminalDate - The Terminal Date
      hwnmInitial - The Initial Node Metrics
      Returns:
      The Hull White Transition Metrics
    • evolveTrinomialTreeSequence

      public boolean evolveTrinomialTreeSequence​(int iSpotDate, int iInitialDate, int iDayIncrement, int iNumIncrement, TrinomialTreeNodeMetrics hwnm, TrinomialTreeSequenceMetrics hwsm)
      Evolve the Trinomial Tree Sequence
      Parameters:
      iSpotDate - The Spot Date
      iInitialDate - The Initial Date
      iDayIncrement - The Day Increment
      iNumIncrement - Number of Times to Increment
      hwnm - Starting Node Metrics
      hwsm - The Sequence Metrics
      Returns:
      TRUE - The Tree Successfully Evolved
    • evolveTrinomialTreeSequence

      public TrinomialTreeSequenceMetrics evolveTrinomialTreeSequence​(int iSpotDate, int iDayIncrement, int iNumIncrement)
      Evolve the Trinomial Tree Sequence
      Parameters:
      iSpotDate - The Spot Date
      iDayIncrement - The Day Increment
      iNumIncrement - Number of Times to Increment
      Returns:
      The Sequence Metrics