Class ZeroRateDiscountCurve

java.lang.Object
All Implemented Interfaces:
Curve, DiscountFactorEstimator, LatentState

public class ZeroRateDiscountCurve
extends MergedDiscountForwardCurve
ZeroRateDiscountCurve manages the Discounting Latent State, using the Zero Rate as the State Response Representation. It exports the following functionality:

  • ZeroRateDiscountCurve Constructor
  • Compute the discount factor, forward rate, or the zero rate from the Zero Rate Latent State
  • Create a ForwardRateEstimator instance for the given Index
  • Retrieve Array of the Calibration Components
  • Retrieve the Curve Construction Input Set
  • Compute the Jacobian of the Discount Factor Latent State to the input Quote
  • Synthesize scenario Latent State by parallel shifting/custom tweaking the quantification metric
  • Synthesize scenario Latent State by parallel/custom shifting/custom tweaking the manifest measure
  • Serialize into and de-serialize out of byte array

Module Product Core Module
Library Fixed Income Analytics
Project Latent State Inference and Creation Utilities
Package Basis Spline Based Latent States
Author:
Lakshmi Krishnamurthy
  • Constructor Details

    • ZeroRateDiscountCurve

      public ZeroRateDiscountCurve​(java.lang.String currency, Span span) throws java.lang.Exception
      ZeroRateDiscountCurve constructor
      Parameters:
      currency - Currency
      span - The Span Instance
      Throws:
      java.lang.Exception - Thrown if the Inputs are Invalid
  • Method Details

    • df

      public double df​(int 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
    • forward

      public double forward​(int date1, int date2) throws java.lang.Exception
      Description copied from class: MergedDiscountForwardCurve
      Compute the Forward Rate between two Dates
      Specified by:
      forward in class MergedDiscountForwardCurve
      Parameters:
      date1 - First Date
      date2 - Second Date
      Returns:
      The Forward Rate
      Throws:
      java.lang.Exception - Thrown if the Forward Rate cannot be calculated
    • zero

      public double zero​(int date) throws java.lang.Exception
      Description copied from class: MergedDiscountForwardCurve
      Calculate the implied rate to the given date
      Specified by:
      zero in class MergedDiscountForwardCurve
      Parameters:
      date - Date
      Returns:
      Implied rate
      Throws:
      java.lang.Exception - Thrown if the discount factor cannot be calculated
    • forwardRateEstimator

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

      public java.lang.String latentStateQuantificationMetric()
      Description copied from class: MergedDiscountForwardCurve
      Retrieve the Latent State Quantification Metric
      Specified by:
      latentStateQuantificationMetric in class MergedDiscountForwardCurve
      Returns:
      The Latent State Quantification Metric
    • parallelShiftManifestMeasure

      public ZeroRateDiscountCurve parallelShiftManifestMeasure​(java.lang.String manifestMeasure, double shift)
      Description copied from interface: LatentState
      Create a LatentState Instance from the Manifest Measure Parallel Shift
      Parameters:
      manifestMeasure - The Specified Manifest Measure
      shift - Parallel shift of the Manifest Measure
      Returns:
      New LatentState Instance corresponding to the Parallel Shifted Manifest Measure
    • shiftManifestMeasure

      public ZeroRateDiscountCurve shiftManifestMeasure​(int spanIndex, java.lang.String manifestMeasure, double shift)
      Description copied from interface: LatentState
      Create a LatentState Instance from the Shift of the Specified Manifest Measure
      Parameters:
      spanIndex - Index into the Span that identifies the Instrument
      manifestMeasure - The Specified Manifest Measure
      shift - Shift of the Manifest Measure
      Returns:
      New LatentState Instance corresponding to the Shift of the Specified Manifest Measure
    • customTweakManifestMeasure

      public MergedDiscountForwardCurve customTweakManifestMeasure​(java.lang.String manifestMeasure, ManifestMeasureTweak manifestMeasureTweak)
      Description copied from interface: LatentState
      Create a LatentState Instance from the Manifest Measure Tweak Parameters
      Parameters:
      manifestMeasure - The Specified Manifest Measure
      manifestMeasureTweak - Manifest Measure Tweak Parameters
      Returns:
      New LatentState Instance corresponding to the Tweaked Manifest Measure
    • parallelShiftQuantificationMetric

      public ZeroRateDiscountCurve parallelShiftQuantificationMetric​(double shift)
      Description copied from interface: LatentState
      Create a LatentState Instance from the Quantification Metric Parallel Shift
      Parameters:
      shift - Parallel shift of the Quantification Metric
      Returns:
      New LatentState Instance corresponding to the Parallel Shifted Quantification Metric
    • customTweakQuantificationMetric

      public Curve customTweakQuantificationMetric​(ManifestMeasureTweak manifestMeasureTweak)
      Description copied from interface: LatentState
      Create a LatentState Instance from the Quantification Metric Tweak Parameters
      Parameters:
      manifestMeasureTweak - Quantification Metric Tweak Parameters
      Returns:
      New LatentState Instance corresponding to the Tweaked Quantification Metric
    • jackDDFDManifestMeasure

      public WengertJacobian jackDDFDManifestMeasure​(int date, java.lang.String manifestMeasure)
      Description copied from class: MergedDiscountForwardCurve
      Retrieve the Manifest Measure Jacobian of the Discount Factor to the given date
      Specified by:
      jackDDFDManifestMeasure in class MergedDiscountForwardCurve
      Parameters:
      date - Date
      manifestMeasure - Manifest Measure
      Returns:
      The Manifest Measure Jacobian of the Discount Factor to the given date
    • calibComp

      public CalibratableComponent[] calibComp()
      Description copied from interface: Curve
      Retrieve the Calibration Components
      Returns:
      Array of Calibration Components
    • manifestMeasure

      public CaseInsensitiveTreeMap<java.lang.Double> manifestMeasure​(java.lang.String instrumentCode)
      Description copied from interface: Curve
      Retrieve the Manifest Measure Map of the given Instrument used to construct the Curve
      Parameters:
      instrumentCode - The Calibration Instrument's Code whose Manifest Measure Map is sought
      Returns:
      The Manifest Measure Map of the given Instrument used to construct the Curve