Package org.drip.state.nonlinear
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 Summary
Constructors Constructor Description ForwardHazardCreditCurve(int startDate, EntityCDSLabel entityCDSLabel, java.lang.String currency, double[] hazardRateArray, int[] hazardDateArray, double[] recoveryRateArray, int[] recoveryDateArray, int specificDefaultDate)
Create a credit curve from hazard rate and recovery rate term structures -
Method Summary
Modifier and Type Method Description boolean
bumpNodeValue(int nodeIndex, double value)
Bump the node value at the node specified the index by the valueCreditCurve
customTweakManifestMeasure(java.lang.String manifestMeasure, ManifestMeasureTweak manifestMeasureTweak)
Create a LatentState Instance from the Manifest Measure Tweak ParametersCurve
customTweakQuantificationMetric(ManifestMeasureTweak manifestMeasureTweak)
Create a LatentState Instance from the Quantification Metric Tweak ParametersCreditCurve
flatCurve(double flatNodeValue, boolean singleNode, double recovery)
Create a flat hazard curve from the inputsForwardHazardCreditCurve
parallelShiftManifestMeasure(java.lang.String manifestMeasure, double shift)
Create a LatentState Instance from the Manifest Measure Parallel ShiftForwardHazardCreditCurve
parallelShiftQuantificationMetric(double shift)
Create a LatentState Instance from the Quantification Metric Parallel Shiftdouble
recovery(int date)
Calculate the recovery rate to the given dateboolean
setFlatValue(double value)
Set the flat value across all the nodesboolean
setNodeValue(int nodeIndex, double value)
Set the Value/Slope at the Node specified by the IndexForwardHazardCreditCurve
shiftManifestMeasure(int spanIndex, java.lang.String manifestMeasure, double shift)
Create a LatentState Instance from the Shift of the Specified Manifest Measuredouble
survival(int date)
Calculate the survival to the given dateMethods inherited from class org.drip.state.credit.CreditCurve
calibComp, currency, effectiveRecovery, effectiveRecovery, effectiveRecovery, effectiveSurvival, effectiveSurvival, effectiveSurvival, epoch, hazard, hazard, hazard, label, manifestMeasure, recovery, recovery, setCCIS, setInstrCalibInputs, setSpecificDefault, survival, survival, unsetSpecificDefault
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
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.ExceptionCreate a credit curve from hazard rate and recovery rate term structures- Parameters:
startDate
- Curve Epoch dateentityCDSLabel
- Credit Curve Labelcurrency
- CurrencyhazardRateArray
- Matched array of hazard rateshazardDateArray
- Matched array of hazard datesrecoveryRateArray
- Matched array of recovery ratesrecoveryDateArray
- Matched array of recovery datesspecificDefaultDate
- (Optional) Specific Default Date- Throws:
java.lang.Exception
- Thrown if inputs are invalid
-
-
Method Details
-
survival
public double survival(int date) throws java.lang.ExceptionDescription copied from class:CreditCurve
Calculate the survival to the given date- Specified by:
survival
in classCreditCurve
- 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.ExceptionDescription copied from class:CreditCurve
Calculate the recovery rate to the given date- Specified by:
recovery
in classCreditCurve
- Parameters:
date
- Date- Returns:
- Recovery Rate
- Throws:
java.lang.Exception
- Thrown if the Recovery rate cannot be calculated
-
parallelShiftQuantificationMetric
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
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 Measureshift
- 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 InstrumentmanifestMeasure
- The Specified Manifest Measureshift
- Shift of the Manifest Measure- Returns:
- New LatentState Instance corresponding to the Shift of the Specified Manifest Measure
-
flatCurve
Description copied from class:CreditCurve
Create a flat hazard curve from the inputs- Specified by:
flatCurve
in classCreditCurve
- Parameters:
flatNodeValue
- Flat hazard node valuesingleNode
- 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 MeasuremanifestMeasureTweak
- 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 Indexvalue
- 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 indexvalue
- 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)
-