Class MergedDiscountForwardCurve

java.lang.Object
org.drip.state.discount.DiscountCurve
org.drip.state.discount.MergedDiscountForwardCurve
All Implemented Interfaces:
Curve, DiscountFactorEstimator, LatentState
Direct Known Subclasses:
DeterministicCollateralChoiceDiscountCurve, DiscountFactorDiscountCurve, ExplicitBootDiscountCurve, ZeroRateDiscountCurve

public abstract class MergedDiscountForwardCurve
extends DiscountCurve
MergedDiscountForwardCurve is the Stub for the Merged Discount and Forward Curve Functionality. It extends the both the Curve and the DiscountFactorEstimator instances by implementing their functions, and exposing the following:
  • Set the Discount Curve Turns'
  • Apply the Turns' DF Adjustment
  • Construct the Native Forward Curve for the given Tenor from the Discount Curve
  • Compute the Forward Rate between two Dates
  • Compute the Forward Rate between two Tenors
  • Calculate the implied rate to the given date
  • Calculate the implied rate to the given tenor
  • Compute the LIBOR between 2 dates given the Day Count
  • Compute the LIBOR between 2 dates
  • Calculate the LIBOR to the given tenor at the specified Julian Date
  • Calculate the DV01 of the Par Swap that Matures at the given date
  • Estimate the manifest measure value for the given date
  • Proxy the Manifest Measure Value using the Closest Node for the given Date
  • Retrieve the Forward Curve that might be implied by the Latent State of this Discount Curve Instance corresponding to the specified Floating Rate Index
  • Retrieve the Latent State Quantification Metric
  • Retrieve the Manifest Measure Jacobian of the Discount Factor to the given date
  • Retrieve the Manifest Measure Jacobian of the Discount Factor to the date implied by the given Tenor
  • Calculate the Jacobian of PV at the given date to the Manifest Measure of each component in the calibration set to the DF
  • Retrieve the Jacobian of the Forward Rate to the Manifest Measure between the given dates
  • Retrieve the Jacobian of the Forward Rate to the Manifest Measure at the given date
  • Retrieve the Jacobian for the Zero Rate to the given date
  • Convert the inferred Formulation Constraint into a "Truthness" Entity

Module Product Core Module
Library Fixed Income Analytics
Project Latent State Inference and Creation Utilities
Package Discount Curve Spline Latent State
Author:
Lakshmi Krishnamurthy
  • Method Details

    • label

      public LatentStateLabel label()
      Description copied from interface: Curve
      Get the Curve Latent State Identifier Label
      Returns:
      The Curve Latent State Identifier Label
    • currency

      public java.lang.String currency()
      Description copied from interface: Curve
      Get the Currency
      Returns:
      Currency
    • epoch

      public JulianDate epoch()
      Description copied from interface: Curve
      Get the Epoch Date
      Returns:
      The Epoch Date
    • setTurns

      public boolean setTurns​(TurnListDiscountFactor turnListDiscountFactor)
      Set the Discount Curve Turns'
      Parameters:
      turnListDiscountFactor - Turn List Discount Factor
      Returns:
      TRUE - Valid Turn List Discount Factor Set
    • turnAdjust

      public double turnAdjust​(int startDate, int finishDate) throws java.lang.Exception
      Apply the Turns' DF Adjustment
      Parameters:
      startDate - Turn Start Date
      finishDate - Turn Finish Date
      Returns:
      Turns' DF Adjustment
      Throws:
      java.lang.Exception - Thrown if the Inputs are invalid
    • nativeForwardCurve

      public ForwardCurve nativeForwardCurve​(java.lang.String tenor)
      Construct the Native Forward Curve for the given Tenor from the Discount Curve
      Parameters:
      tenor - The Tenor
      Returns:
      The Tenor-Native Forward Curve
    • df

      public double df​(JulianDate date) throws java.lang.Exception
      Description copied from interface: DiscountFactorEstimator
      Calculate the discount factor to the given date
      Parameters:
      date - Date
      Returns:
      Discount factor
      Throws:
      java.lang.Exception - Thrown if the discount factor cannot be calculated
    • df

      public double df​(java.lang.String tenor) throws java.lang.Exception
      Description copied from interface: DiscountFactorEstimator
      Calculate the Discount Factor to the given Tenor
      Parameters:
      tenor - Tenor
      Returns:
      Discount factor
      Throws:
      java.lang.Exception - Thrown if the Discount Factor cannot be calculated
    • effectiveDF

      public double effectiveDF​(int date1, int date2) throws java.lang.Exception
      Description copied from interface: DiscountFactorEstimator
      Compute the time-weighted discount factor between 2 dates
      Parameters:
      date1 - First Date
      date2 - Second Date
      Returns:
      Discount Factor
      Throws:
      java.lang.Exception - Thrown if the discount factor cannot be calculated
    • effectiveDF

      public double effectiveDF​(JulianDate date1, JulianDate date2) throws java.lang.Exception
      Description copied from interface: DiscountFactorEstimator
      Compute the time-weighted discount factor between 2 dates
      Parameters:
      date1 - First Date
      date2 - Second Date
      Returns:
      Discount Factor
      Throws:
      java.lang.Exception - Thrown if the discount factor cannot be calculated
    • effectiveDF

      public double effectiveDF​(java.lang.String tenor1, java.lang.String tenor2) throws java.lang.Exception
      Description copied from interface: DiscountFactorEstimator
      Compute the time-weighted discount factor between 2 tenors
      Parameters:
      tenor1 - First Date
      tenor2 - Second Date
      Returns:
      Discount Factor
      Throws:
      java.lang.Exception - Thrown if the discount factor cannot be calculated
    • forward

      public abstract double forward​(int date1, int date2) throws java.lang.Exception
      Compute the Forward Rate between two Dates
      Parameters:
      date1 - First Date
      date2 - Second Date
      Returns:
      The Forward Rate
      Throws:
      java.lang.Exception - Thrown if the Forward Rate cannot be calculated
    • forward

      public double forward​(java.lang.String tenor1, java.lang.String tenor2) throws java.lang.Exception
      Compute the Forward Rate between two Tenors
      Parameters:
      tenor1 - Tenor Start
      tenor2 - Tenor End
      Returns:
      The Forward Rate
      Throws:
      java.lang.Exception - Thrown if the Forward Rate cannot be calculated
    • zero

      public abstract double zero​(int date) throws java.lang.Exception
      Calculate the implied rate to the given date
      Parameters:
      date - Date
      Returns:
      Implied rate
      Throws:
      java.lang.Exception - Thrown if the discount factor cannot be calculated
    • zero

      public double zero​(java.lang.String tenor) throws java.lang.Exception
      Calculate the implied rate to the given tenor
      Parameters:
      tenor - Tenor
      Returns:
      Implied rate
      Throws:
      java.lang.Exception - Thrown if the discount factor cannot be calculated
    • libor

      public double libor​(int date1, int date2, double yearFraction) throws java.lang.Exception
      Compute the LIBOR between 2 dates given the Year Fraction from the Day Count Convention
      Parameters:
      date1 - First Date
      date2 - Second Date
      yearFraction - Year Fraction
      Returns:
      LIBOR
      Throws:
      java.lang.Exception - Thrown if the discount factor cannot be calculated
    • libor

      public double libor​(int date1, int date2) throws java.lang.Exception
      Compute the LIBOR between 2 dates
      Parameters:
      date1 - First Date
      date2 - Second Date
      Returns:
      LIBOR
      Throws:
      java.lang.Exception - Thrown if the discount factor cannot be calculated
    • libor

      public double libor​(int startDate, java.lang.String tenor) throws java.lang.Exception
      Calculate the LIBOR to the given tenor at the specified date
      Parameters:
      startDate - Start Date
      tenor - Tenor
      Returns:
      LIBOR
      Throws:
      java.lang.Exception - Thrown if LIBOR cannot be calculated
    • libor

      public double libor​(JulianDate date, java.lang.String tenor) throws java.lang.Exception
      Calculate the LIBOR to the given tenor at the specified Julian Date
      Parameters:
      date - Julian Date
      tenor - Tenor
      Returns:
      LIBOR
      Throws:
      java.lang.Exception - Thrown if LIBOR cannot be calculated
    • parSwapDV01

      public double parSwapDV01​(int date) throws java.lang.Exception
      Calculate the DV01 of the Par Swap that Matures at the given date
      Parameters:
      date - Date
      Returns:
      DV01 of the Par Swap that Matures at the given date
      Throws:
      java.lang.Exception - Thrown if DV01 cannot be calculated
    • estimateManifestMeasure

      public double estimateManifestMeasure​(java.lang.String manifestMeasure, int date) throws java.lang.Exception
      Estimate the manifest measure value for the given date
      Parameters:
      manifestMeasure - The Manifest Measure to be Estimated
      date - Date
      Returns:
      The estimated calibrated measure value
      Throws:
      java.lang.Exception - Thrown if the estimated manifest measure cannot be computed
    • proxyManifestMeasure

      public double proxyManifestMeasure​(java.lang.String manifestMeasure, int date) throws java.lang.Exception
      Proxy the Manifest Measure Value using the Closest Node for the given Date
      Parameters:
      manifestMeasure - The Manifest Measure to be Proxied
      date - Date
      Returns:
      The Measure Value Proxy
      Throws:
      java.lang.Exception - Thrown if the Manifest Measure Proxy cannot be computed
    • setCCIS

      public boolean setCCIS​(CurveConstructionInputSet curveConstructionInputSet)
      Description copied from interface: Curve
      Set the Curve Construction Input Set Parameters
      Parameters:
      curveConstructionInputSet - The Curve Construction Input Set Parameters
      Returns:
      TRUE - Inputs successfully Set
    • forwardRateEstimator

      public abstract ForwardRateEstimator forwardRateEstimator​(int date, ForwardLabel forwardLabel)
      Retrieve the Forward Curve that might be implied by the Latent State of this Discount Curve Instance corresponding to the specified Floating Rate Index
      Parameters:
      date - The Date
      forwardLabel - The Floating Rate Index
      Returns:
      The Forward Curve Implied by the Discount Curve Latent State
    • latentStateQuantificationMetric

      public abstract java.lang.String latentStateQuantificationMetric()
      Retrieve the Latent State Quantification Metric
      Returns:
      The Latent State Quantification Metric
    • jackDDFDManifestMeasure

      public abstract WengertJacobian jackDDFDManifestMeasure​(int date, java.lang.String manifestMeasure)
      Retrieve the Manifest Measure Jacobian of the Discount Factor to the given date
      Parameters:
      date - Date
      manifestMeasure - Manifest Measure
      Returns:
      The Manifest Measure Jacobian of the Discount Factor to the given date
    • jackDDFDManifestMeasure

      public WengertJacobian jackDDFDManifestMeasure​(JulianDate date, java.lang.String manifestMeasure)
      Retrieve the Manifest Measure Jacobian of the Discount Factor to the given date
      Parameters:
      date - Date
      manifestMeasure - Manifest Measure
      Returns:
      The Manifest Measure Jacobian of the Discount Factor to the given date
    • jackDDFDManifestMeasure

      public WengertJacobian jackDDFDManifestMeasure​(java.lang.String tenor, java.lang.String manifestMeasure)
      Retrieve the Manifest Measure Jacobian of the Discount Factor to the date implied by the given Tenor
      Parameters:
      tenor - Tenor
      manifestMeasure - Manifest Measure
      Returns:
      The Manifest Measure Jacobian of the Discount Factor to the date implied by the given Tenor
    • compJackDPVDManifestMeasure

      public WengertJacobian compJackDPVDManifestMeasure​(int date)
      Calculate the Jacobian of PV at the given date to the Manifest Measure of each component in the calibration set to the DF
      Parameters:
      date - Date for which the Jacobian is needed
      Returns:
      The Jacobian
    • compJackDPVDManifestMeasure

      public WengertJacobian compJackDPVDManifestMeasure​(JulianDate date)
      Calculate the Jacobian of PV at the given date to the Manifest Measure of each component in the calibration set to the DF
      Parameters:
      date - Date for which the Jacobian is needed
      Returns:
      The Jacobian
    • jackDForwardDManifestMeasure

      public WengertJacobian jackDForwardDManifestMeasure​(int date1, int date2, java.lang.String manifestMeasure, double elapsedYearFraction)
      Retrieve the Jacobian of the Forward Rate to the Manifest Measure between the given dates
      Parameters:
      date1 - Date 1
      date2 - Date 2
      manifestMeasure - Manifest Measure
      elapsedYearFraction - The Elapsed Year (in the appropriate Day Count) between dates 1 and 2
      Returns:
      The Jacobian
    • jackDForwardDManifestMeasure

      public WengertJacobian jackDForwardDManifestMeasure​(JulianDate date1, JulianDate date2, java.lang.String manifestMeasure, double elapsedYearFraction)
      Retrieve the Jacobian of the Forward Rate to the Manifest Measure between the given dates
      Parameters:
      date1 - Julian Date 1
      date2 - Julian Date 2
      manifestMeasure - Manifest Measure
      elapsedYearFraction - The Elapsed Year (in the appropriate Day Count) between dates 1 and 2
      Returns:
      The Jacobian
    • jackDForwardDManifestMeasure

      public WengertJacobian jackDForwardDManifestMeasure​(JulianDate date, java.lang.String tenor, java.lang.String manifestMeasure, double elapsedYearFraction)
      Retrieve the Jacobian of the Forward Rate to the Manifest Measure at the given date
      Parameters:
      date - Given Julian Date
      tenor - Tenor
      manifestMeasure - Manifest Measure
      elapsedYearFraction - The Elapsed Year (in the appropriate Day Count) implied by the Tenor
      Returns:
      The Jacobian
    • zeroRateJack

      public WengertJacobian zeroRateJack​(int date, java.lang.String manifestMeasure)
      Retrieve the Jacobian for the Zero Rate to the given date
      Parameters:
      date - Date
      manifestMeasure - Manifest Measure
      Returns:
      The Jacobian
    • zeroRateJack

      public WengertJacobian zeroRateJack​(JulianDate date, java.lang.String manifestMeasure)
      Retrieve the Jacobian for the Zero Rate to the given date
      Parameters:
      date - Julian Date
      manifestMeasure - Manifest Measure
      Returns:
      The Jacobian
    • canonicalTruthness

      public java.util.Map<java.lang.Integer,​java.lang.Double> canonicalTruthness​(java.lang.String latentStateQuantificationMetric)
      Convert the inferred Formulation Constraint into a "Truthness" Entity
      Parameters:
      latentStateQuantificationMetric - Latent State Quantification Metric
      Returns:
      Map of the Truthness Entities