Class G2PlusPlus

java.lang.Object
org.drip.dynamics.hjm.G2PlusPlus

public class G2PlusPlus
extends java.lang.Object
G2PlusPlus provides the Hull-White-type, but 2F Gaussian HJM Short Rate Dynamics Implementation.

Author:
Lakshmi Krishnamurthy
  • Constructor Summary

    Constructors
    Constructor Description
    G2PlusPlus​(double dblSigma, double dblA, double dblEta, double dblB, UnivariateSequenceGenerator[] aRSG, double dblRho, R1ToR1 auIFRInitial)
    G2PlusPlus Constructor
  • Method Summary

    Modifier and Type Method Description
    double a()
    Retrieve A
    double b()
    Retrieve B
    double deltaX​(int iSpotDate, int iViewDate, double dblX, int iSpotTimeIncrement)
    Compute the X Increment
    double deltaY​(int iSpotDate, int iViewDate, double dblY, int iSpotTimeIncrement)
    Compute the Y Increment
    double eta()
    Retrieve Eta
    R1ToR1 ifrInitialTermStructure()
    Retrieve the Initial Instantaneous Forward Rate Term Structure
    double phi​(int iSpotDate, int iViewDate)
    Compute the G2++ Phi
    double rho()
    Retrieve Rho
    UnivariateSequenceGenerator[] rsg()
    Retrieve the Random Sequence Generator Array
    double sigma()
    Retrieve Sigma

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • G2PlusPlus

      public G2PlusPlus​(double dblSigma, double dblA, double dblEta, double dblB, UnivariateSequenceGenerator[] aRSG, double dblRho, R1ToR1 auIFRInitial) throws java.lang.Exception
      G2PlusPlus Constructor
      Parameters:
      dblSigma - Sigma
      dblA - A
      dblEta - Eta
      dblB - B
      aRSG - Array of the Random Sequence Generators
      dblRho - Rho
      auIFRInitial - The Initial Instantaneous Forward Rate Term Structure
      Throws:
      java.lang.Exception - Thrown if the Inputs are Invalid
  • Method Details

    • sigma

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

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

      public double eta()
      Retrieve Eta
      Returns:
      Eta
    • b

      public double b()
      Retrieve B
      Returns:
      B
    • 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 Array
      Returns:
      The Random Sequence Generator Array
    • rho

      public double rho()
      Retrieve Rho
      Returns:
      Rho
    • phi

      public double phi​(int iSpotDate, int iViewDate) throws java.lang.Exception
      Compute the G2++ Phi
      Parameters:
      iSpotDate - The Spot Date
      iViewDate - The View Date
      Returns:
      The G2++ Phi
      Throws:
      java.lang.Exception - Thrown if the G2++ Phi cannot be computed
    • deltaX

      public double deltaX​(int iSpotDate, int iViewDate, double dblX, int iSpotTimeIncrement) throws java.lang.Exception
      Compute the X Increment
      Parameters:
      iSpotDate - The Spot Date
      iViewDate - The View Date
      dblX - The X Value
      iSpotTimeIncrement - The Spot Time Increment
      Returns:
      The X Increment
      Throws:
      java.lang.Exception - Thrown if the Inputs are Invalid
    • deltaY

      public double deltaY​(int iSpotDate, int iViewDate, double dblY, int iSpotTimeIncrement) throws java.lang.Exception
      Compute the Y Increment
      Parameters:
      iSpotDate - The Spot Date
      iViewDate - The View Date
      dblY - The Y Value
      iSpotTimeIncrement - The Spot Time Increment
      Returns:
      The Y Increment
      Throws:
      java.lang.Exception - Thrown if the Inputs are Invalid