Package org.drip.state.curve
Class DerivedZeroRate
java.lang.Object
org.drip.state.discount.DiscountCurve
org.drip.state.discount.ZeroCurve
org.drip.state.curve.DerivedZeroRate
- All Implemented Interfaces:
Curve
,DiscountFactorEstimator
,LatentState
public class DerivedZeroRate extends ZeroCurve
DerivedZeroRate implements the delegated ZeroCurve functionality. Beyond discount factor/zero rate
computation at specific cash pay nodes, all other functions are delegated to the embedded discount curve.
It exports the following Functionality:
- Construct an Instance from the Discount Curve and the related Parameters
- Construct an Instance from the Govvie Curve and the related Parameters
- Construct an Instance from the Input Curve and the related Parameters
Module | Product Core Module |
Library | Fixed Income Analytics |
Project | Latent State Inference and Creation Utilities |
Package | Basis Spline Based Latent States |
- Author:
- Lakshmi Krishnamurthy
-
Method Summary
Modifier and Type Method Description CalibratableComponent[]
calibComp()
Retrieve the Calibration ComponentsCurve
customTweakManifestMeasure(java.lang.String manifestMeasure, ManifestMeasureTweak manifestMeasureTweak)
Create a LatentState Instance from the Manifest Measure Tweak ParametersLatentState
customTweakQuantificationMetric(ManifestMeasureTweak manifestMeasureTweak)
Create a LatentState Instance from the Quantification Metric Tweak Parametersdouble
df(int date)
Calculate the Discount Factor to the given Datedouble
df(java.lang.String tenor)
Calculate the Discount Factor to the given Tenordouble
df(JulianDate date)
Calculate the discount factor to the given datedouble
effectiveDF(int date1, int date2)
Compute the time-weighted discount factor between 2 datesdouble
effectiveDF(java.lang.String tenor1, java.lang.String tenor2)
Compute the time-weighted discount factor between 2 tenorsdouble
effectiveDF(JulianDate date1, JulianDate date2)
Compute the time-weighted discount factor between 2 datesstatic DerivedZeroRate
FromBaseCurve(int frequency, java.lang.String dayCount, java.lang.String calendar, boolean applyEOMAdjustment, java.util.List<CompositePeriod> couponPeriodList, int workoutDate, int valuationDate, int cashPayDate, DiscountCurve discountCurve, double bump, ValuationCustomizationParams valuationCustomizationParams, SegmentCustomBuilderControl segmentCustomBuilderControl)
Construct an Instance from the Input Curve and the related Parametersstatic DerivedZeroRate
FromDiscountCurve(int zeroCurveFrequency, java.lang.String zeroCurveDayCount, java.lang.String zeroCurveCalendar, boolean zeroCurveApplyEOMAdjustment, java.util.List<CompositePeriod> couponPeriodList, int workoutDate, int valuationDate, int cashPayDate, DiscountCurve discountCurve, double zeroCurveBump, ValuationCustomizationParams valuationCustomizationParams, SegmentCustomBuilderControl segmentCustomBuilderControl)
Construct an Instance from the Discount Curve and the related Parametersstatic DerivedZeroRate
FromGovvieCurve(int zeroCurveFrequency, java.lang.String zeroCurveDayCountConvention, java.lang.String zeroCurveCalendar, boolean zeroCurveApplyEOMAdjustment, java.util.List<CompositePeriod> couponPeriodList, int workoutDate, int valuationDate, int cashPayDate, GovvieCurve govvieCurve, double zeroCurveBump, ValuationCustomizationParams valuationCustomizationParams, SegmentCustomBuilderControl segmentCustomBuilderControl)
Construct an Instance from the Govvie Curve and the related ParametersLatentStateLabel
label()
Get the Curve Latent State Identifier LabelCaseInsensitiveTreeMap<java.lang.Double>
manifestMeasure(java.lang.String instrument)
Retrieve the Manifest Measure Map of the given Instrument used to construct the CurveCurve
parallelShiftManifestMeasure(java.lang.String manifestMeasure, double shift)
Create a LatentState Instance from the Manifest Measure Parallel ShiftLatentState
parallelShiftQuantificationMetric(double shift)
Create a LatentState Instance from the Quantification Metric Parallel Shiftboolean
setCCIS(CurveConstructionInputSet curveConstructionInputSet)
Set the Curve Construction Input Set ParametersCurve
shiftManifestMeasure(int spanIndex, java.lang.String manifestMeasure, double shift)
Create a LatentState Instance from the Shift of the Specified Manifest Measuredouble
zeroRate(int date)
Retrieve the zero rate corresponding to the given dateMethods inherited from class org.drip.state.discount.DiscountCurve
flatForward, flatNativeForward, flatNativeForward, flatNativeForwardEI
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Method Details
-
FromDiscountCurve
public static final DerivedZeroRate FromDiscountCurve(int zeroCurveFrequency, java.lang.String zeroCurveDayCount, java.lang.String zeroCurveCalendar, boolean zeroCurveApplyEOMAdjustment, java.util.List<CompositePeriod> couponPeriodList, int workoutDate, int valuationDate, int cashPayDate, DiscountCurve discountCurve, double zeroCurveBump, ValuationCustomizationParams valuationCustomizationParams, SegmentCustomBuilderControl segmentCustomBuilderControl)Construct an Instance from the Discount Curve and the related Parameters- Parameters:
zeroCurveFrequency
- Zero Curve FrequencyzeroCurveDayCount
- Zero Curve Day CountzeroCurveCalendar
- Zero Curve CalendarzeroCurveApplyEOMAdjustment
- Zero Coupon EOM Adjustment FlagcouponPeriodList
- List of Bond coupon periodsworkoutDate
- Work-out DatevaluationDate
- Value DatecashPayDate
- Cash-Pay DatediscountCurve
- Underlying Discount CurvezeroCurveBump
- DC BumpvaluationCustomizationParams
- Valuation Customization ParameterssegmentCustomBuilderControl
- Segment Custom Builder Control Parameters- Returns:
- The Derived Zero Rate Instance
-
FromGovvieCurve
public static final DerivedZeroRate FromGovvieCurve(int zeroCurveFrequency, java.lang.String zeroCurveDayCountConvention, java.lang.String zeroCurveCalendar, boolean zeroCurveApplyEOMAdjustment, java.util.List<CompositePeriod> couponPeriodList, int workoutDate, int valuationDate, int cashPayDate, GovvieCurve govvieCurve, double zeroCurveBump, ValuationCustomizationParams valuationCustomizationParams, SegmentCustomBuilderControl segmentCustomBuilderControl)Construct an Instance from the Govvie Curve and the related Parameters- Parameters:
zeroCurveFrequency
- Zero Curve FrequencyzeroCurveDayCountConvention
- Zero Curve Day CountzeroCurveCalendar
- Zero Curve CalendarzeroCurveApplyEOMAdjustment
- Zero Coupon EOM Adjustment FlagcouponPeriodList
- List of bond coupon periodsworkoutDate
- Work-out DatevaluationDate
- Value DatecashPayDate
- Cash-Pay DategovvieCurve
- Underlying Govvie CurvezeroCurveBump
- DC BumpvaluationCustomizationParams
- Valuation Customization ParameterssegmentCustomBuilderControl
- Segment Custom Builder Control Parameters- Returns:
- The Derived Zero Rate Instance
-
FromBaseCurve
public static final DerivedZeroRate FromBaseCurve(int frequency, java.lang.String dayCount, java.lang.String calendar, boolean applyEOMAdjustment, java.util.List<CompositePeriod> couponPeriodList, int workoutDate, int valuationDate, int cashPayDate, DiscountCurve discountCurve, double bump, ValuationCustomizationParams valuationCustomizationParams, SegmentCustomBuilderControl segmentCustomBuilderControl)Construct an Instance from the Input Curve and the related Parameters- Parameters:
frequency
- Zero Curve FrequencydayCount
- Zero Curve Day Countcalendar
- Zero Curve CalendarapplyEOMAdjustment
- Zero Coupon EOM Adjustment FlagcouponPeriodList
- List of bond coupon periodsworkoutDate
- Work-out DatevaluationDate
- Value DatecashPayDate
- Cash-Pay DatediscountCurve
- Underlying Discount Curvebump
- DC BumpvaluationCustomizationParams
- Valuation Customization ParameterssegmentCustomBuilderControl
- Segment Custom Builder Control Parameters- Returns:
- The Derived Zero Rate Instance
-
df
public double df(int date) throws java.lang.ExceptionDescription 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.ExceptionDescription 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
-
zeroRate
public double zeroRate(int date) throws java.lang.ExceptionDescription copied from class:ZeroCurve
Retrieve the zero rate corresponding to the given date -
manifestMeasure
Description copied from interface:Curve
Retrieve the Manifest Measure Map of the given Instrument used to construct the Curve- Parameters:
instrument
- 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
-
calibComp
Description copied from interface:Curve
Retrieve the Calibration Components- Returns:
- Array of Calibration Components
-
label
Description copied from interface:Curve
Get the Curve Latent State Identifier Label- Returns:
- The Curve Latent State Identifier Label
-
parallelShiftManifestMeasure
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
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
-
customTweakManifestMeasure
public Curve 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
-
setCCIS
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
-
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
-
df
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
-
effectiveDF
public double effectiveDF(int date1, int date2) throws java.lang.ExceptionDescription copied from interface:DiscountFactorEstimator
Compute the time-weighted discount factor between 2 dates- Parameters:
date1
- First Datedate2
- Second Date- Returns:
- Discount Factor
- Throws:
java.lang.Exception
- Thrown if the discount factor cannot be calculated
-
effectiveDF
Description copied from interface:DiscountFactorEstimator
Compute the time-weighted discount factor between 2 dates- Parameters:
date1
- First Datedate2
- 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.ExceptionDescription copied from interface:DiscountFactorEstimator
Compute the time-weighted discount factor between 2 tenors- Parameters:
tenor1
- First Datetenor2
- Second Date- Returns:
- Discount Factor
- Throws:
java.lang.Exception
- Thrown if the discount factor cannot be calculated
-