Class ForwardHazardCreditCurve

java.lang.Object
org.drip.state.credit.CreditCurve
org.drip.state.credit.ExplicitBootCreditCurve
org.drip.state.nonlinear.ForwardHazardCreditCurve
All Implemented Interfaces:
Curve, ExplicitBootCurve, LatentState

public class ForwardHazardCreditCurve
extends ExplicitBootCreditCurve
ForwardHazardCreditCurve manages the Survival Latent State, using the Hazard Rate as the State Response Representation. It exports the following functionality:

  • Boot Methods - Set/Bump Specific Node Quantification Metric, or Set Flat Value
  • Boot Calibration - Initialize Run, Compute Calibration Metric
  • Compute the survival probability, recovery rate, or the hazard rate from the Hazard Rate Latent State
  • Retrieve Array of the Calibration Components
  • Retrieve the Curve Construction Input Set
  • 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

Module Product Core Module
Library Fixed Income Analytics
Project Latent State Inference and Creation Utilities
Package Nonlinear (i.e., Boot) Latent State Construction
Author:
Lakshmi Krishnamurthy
  • Constructor Details

    • ForwardHazardCreditCurve

      public ForwardHazardCreditCurve​(int startDate, EntityCDSLabel entityCDSLabel, java.lang.String currency, double[] hazardRateArray, int[] hazardDateArray, double[] recoveryRateArray, int[] recoveryDateArray, int specificDefaultDate) throws java.lang.Exception
      Create a credit curve from hazard rate and recovery rate term structures
      Parameters:
      startDate - Curve Epoch date
      entityCDSLabel - Credit Curve Label
      currency - Currency
      hazardRateArray - Matched array of hazard rates
      hazardDateArray - Matched array of hazard dates
      recoveryRateArray - Matched array of recovery rates
      recoveryDateArray - Matched array of recovery dates
      specificDefaultDate - (Optional) Specific Default Date
      Throws:
      java.lang.Exception - Thrown if inputs are invalid
  • Method Details

    • survival

      public double survival​(int date) throws java.lang.Exception
      Description copied from class: CreditCurve
      Calculate the survival to the given date
      Specified by:
      survival in class CreditCurve
      Parameters:
      date - Date
      Returns:
      Survival Probability
      Throws:
      java.lang.Exception - Thrown if the survival probability cannot be calculated
    • recovery

      public double recovery​(int date) throws java.lang.Exception
      Description copied from class: CreditCurve
      Calculate the recovery rate to the given date
      Specified by:
      recovery in class CreditCurve
      Parameters:
      date - Date
      Returns:
      Recovery Rate
      Throws:
      java.lang.Exception - Thrown if the Recovery rate cannot be calculated
    • parallelShiftQuantificationMetric

      public ForwardHazardCreditCurve 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
    • parallelShiftManifestMeasure

      public ForwardHazardCreditCurve 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 ForwardHazardCreditCurve 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
    • flatCurve

      public CreditCurve flatCurve​(double flatNodeValue, boolean singleNode, double recovery)
      Description copied from class: CreditCurve
      Create a flat hazard curve from the inputs
      Specified by:
      flatCurve in class CreditCurve
      Parameters:
      flatNodeValue - Flat hazard node value
      singleNode - Uses a single node for Calibration (True)
      recovery - (Optional) Recovery to be used in creation of the flat curve
      Returns:
      New CreditCurve instance
    • customTweakManifestMeasure

      public CreditCurve 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
    • setNodeValue

      public boolean setNodeValue​(int nodeIndex, double value)
      Description copied from interface: ExplicitBootCurve
      Set the Value/Slope at the Node specified by the Index
      Parameters:
      nodeIndex - Node Index
      value - Node Value
      Returns:
      Success (true), failure (false)
    • bumpNodeValue

      public boolean bumpNodeValue​(int nodeIndex, double value)
      Description copied from interface: ExplicitBootCurve
      Bump the node value at the node specified the index by the value
      Parameters:
      nodeIndex - node index
      value - node bump value
      Returns:
      Success (true), failure (false)
    • setFlatValue

      public boolean setFlatValue​(double value)
      Description copied from interface: ExplicitBootCurve
      Set the flat value across all the nodes
      Parameters:
      value - node value
      Returns:
      Success (true), failure (false)