Class DerivedZeroRate

java.lang.Object
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 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 Frequency
      zeroCurveDayCount - Zero Curve Day Count
      zeroCurveCalendar - Zero Curve Calendar
      zeroCurveApplyEOMAdjustment - Zero Coupon EOM Adjustment Flag
      couponPeriodList - List of Bond coupon periods
      workoutDate - Work-out Date
      valuationDate - Value Date
      cashPayDate - Cash-Pay Date
      discountCurve - Underlying Discount Curve
      zeroCurveBump - DC Bump
      valuationCustomizationParams - Valuation Customization Parameters
      segmentCustomBuilderControl - 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 Frequency
      zeroCurveDayCountConvention - Zero Curve Day Count
      zeroCurveCalendar - Zero Curve Calendar
      zeroCurveApplyEOMAdjustment - Zero Coupon EOM Adjustment Flag
      couponPeriodList - List of bond coupon periods
      workoutDate - Work-out Date
      valuationDate - Value Date
      cashPayDate - Cash-Pay Date
      govvieCurve - Underlying Govvie Curve
      zeroCurveBump - DC Bump
      valuationCustomizationParams - Valuation Customization Parameters
      segmentCustomBuilderControl - 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 Frequency
      dayCount - Zero Curve Day Count
      calendar - Zero Curve Calendar
      applyEOMAdjustment - Zero Coupon EOM Adjustment Flag
      couponPeriodList - List of bond coupon periods
      workoutDate - Work-out Date
      valuationDate - Value Date
      cashPayDate - Cash-Pay Date
      discountCurve - Underlying Discount Curve
      bump - DC Bump
      valuationCustomizationParams - Valuation Customization Parameters
      segmentCustomBuilderControl - Segment Custom Builder Control Parameters
      Returns:
      The Derived Zero Rate Instance
    • 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
    • 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
    • zeroRate

      public double zeroRate​(int date) throws java.lang.Exception
      Description copied from class: ZeroCurve
      Retrieve the zero rate corresponding to the given date
      Specified by:
      zeroRate in class ZeroCurve
      Parameters:
      date - Date for which the zero rate is requested
      Returns:
      Zero Rate
      Throws:
      java.lang.Exception - Thrown if the date is not represented in the map
    • manifestMeasure

      public CaseInsensitiveTreeMap<java.lang.Double> manifestMeasure​(java.lang.String instrument)
      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

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

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

      public Curve 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 Curve 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 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 Measure
      manifestMeasureTweak - Manifest Measure Tweak Parameters
      Returns:
      New LatentState Instance corresponding to the Tweaked Manifest Measure
    • 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
    • parallelShiftQuantificationMetric

      public LatentState 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 LatentState 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
    • 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
    • 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