Class ScenarioDiscountCurveBuilder

java.lang.Object
org.drip.state.creator.ScenarioDiscountCurveBuilder

public class ScenarioDiscountCurveBuilder
extends java.lang.Object
ScenarioDiscountCurveBuilder implements the the construction of the scenario discount curve using the input discount curve instruments, and a wide variety of custom builds. It implements the following functionality:
  • Create an DiscountCurveScenarioContainer Instance from the currency and the array of the calibration instruments
  • Create Discount Curve from the Calibration Instruments
  • Build the Shape Preserving Discount Curve using the Custom Parameters
  • Build a Globally Smoothed Instance of the Discount Curve using the Custom Parameters
  • Build a Locally Smoothed Instance of the Discount Curve using the Custom Parameters
  • Construct an instance of the Shape Preserver of the desired basis type, using the specified basis set builder parameters
  • Construct an instance of the Shape Preserver of the KLK Hyperbolic Tension Type, using the specified basis set builder parameters
  • Construct an instance of the Shape Preserver of the Cubic Polynomial Type, using the specified basis set builder parameters
  • Customizable DENSE Curve Creation Methodology
  • Standard DENSE Curve Creation Methodology
  • DUAL DENSE Curve Creation Methodology
  • Create an Instance of the Custom Splined DF Discount Curve
  • Create an Instance of the Cubic Polynomial Splined DF Discount Curve
  • Create an Instance of the Quartic Polynomial Splined DF Discount Curve
  • Create an Instance of the Kaklis-Pandelis Splined DF Discount Curve
  • Create an Instance of the KLK Hyperbolic Splined DF Discount Curve
  • Create an Instance of the KLK Exponential Splined DF Discount Curve
  • Create an Instance of the KLK Linear Rational Splined DF Discount Curve
  • Create an Instance of the KLK Quadratic Rational Splined DF Discount Curve
  • Build a Discount Curve from an array of discount factors
  • Create a Discount Curve from the Exponentially Compounded Flat Rate
  • Create a Discount Curve from the Discretely Compounded Flat Rate
  • Create a Discount Curve from the Flat Yield
  • Create a discount curve from an array of dates/rates

Module Product Core Module
Library Fixed Income Analytics
Project Latent State Inference and Creation Utilities
Package Scenario State Curve/Surface Builders
Author:
Lakshmi Krishnamurthy
  • Constructor Details

    • ScenarioDiscountCurveBuilder

      public ScenarioDiscountCurveBuilder()
  • Method Details

    • FromIRCSG

      public static final DiscountCurveScenarioContainer FromIRCSG​(java.lang.String currency, CalibratableComponent[] calibratableComponentArray)
      Create an DiscountCurveScenarioContainer Instance from the currency and the array of the calibration instruments
      Parameters:
      currency - Currency
      calibratableComponentArray - Array of the calibration instruments
      Returns:
      The DiscountCurveScenarioContainer instance
    • NonlinearBuild

      public static final MergedDiscountForwardCurve NonlinearBuild​(JulianDate date, java.lang.String currency, CalibratableComponent[] calibrationInstrumentArray, double[] calibrationQuoteArray, java.lang.String[] calibrationMeasureArray, LatentStateFixingsContainer latentStateFixingsContainer)
      Create Discount Curve from the Calibration Instruments
      Parameters:
      date - Valuation Date
      currency - Currency
      calibrationInstrumentArray - Input Calibration Instruments
      calibrationQuoteArray - Input Calibration Quotes
      calibrationMeasureArray - Input Calibration Measures
      latentStateFixingsContainer - Latent State Fixings Container
      Returns:
      The Calibrated Discount Curve
    • ShapePreservingDFBuild

      public static final MergedDiscountForwardCurve ShapePreservingDFBuild​(java.lang.String currency, LinearLatentStateCalibrator linearLatentStateCalibrator, LatentStateStretchSpec[] latentStateStretchSpecArray, ValuationParams valuationParams, CreditPricerParams creditPricerParams, CurveSurfaceQuoteContainer curveSurfaceQuoteContainer, ValuationCustomizationParams valuationCustomizationParams, double epochResponse)
      Build the Shape Preserving Discount Curve using the Custom Parameters
      Parameters:
      currency - Currency
      linearLatentStateCalibrator - The Linear Latent State Calibrator Instance
      latentStateStretchSpecArray - Array of the Instrument Representation Stretches
      valuationParams - Valuation Parameters
      creditPricerParams - Pricer Parameters
      curveSurfaceQuoteContainer - Market Parameters
      valuationCustomizationParams - Quoting Parameters
      epochResponse - The Starting Response Value
      Returns:
      Instance of the Shape Preserving Discount Curve
    • SmoothingGlobalControlBuild

      public static final MergedDiscountForwardCurve SmoothingGlobalControlBuild​(MergedDiscountForwardCurve shapePreserverDiscountCurve, LinearLatentStateCalibrator linearLatentStateCalibrator, GlobalControlCurveParams globalControlCurveParams, ValuationParams valuationParams, CreditPricerParams creditPricerParams, CurveSurfaceQuoteContainer curveSurfaceQuoteContainer, ValuationCustomizationParams valuationCustomizationParams)
      Build a Globally Smoothed Instance of the Discount Curve using the Custom Parameters
      Parameters:
      shapePreserverDiscountCurve - Instance of the Shape Preserving Discount Curve
      linearLatentStateCalibrator - The Linear Latent State Calibrator Instance
      globalControlCurveParams - Global Smoothing Curve Control Parameters
      valuationParams - Valuation Parameters
      creditPricerParams - Pricer Parameters
      curveSurfaceQuoteContainer - Market Parameters
      valuationCustomizationParams - Quoting Parameters
      Returns:
      Globally Smoothed Instance of the Discount Curve
    • SmoothingLocalControlBuild

      public static final MergedDiscountForwardCurve SmoothingLocalControlBuild​(MergedDiscountForwardCurve shapePreserverDiscountCurve, LinearLatentStateCalibrator linearLatentStateCalibrator, LocalControlCurveParams localControlCurveParams, ValuationParams valuationParams, CreditPricerParams creditPricerParams, CurveSurfaceQuoteContainer curveSurfaceQuoteContainer, ValuationCustomizationParams valuationCustomizationParams)
      Build a Locally Smoothed Instance of the Discount Curve using the Custom Parameters
      Parameters:
      shapePreserverDiscountCurve - Instance of the Shape Preserving Discount Curve
      linearLatentStateCalibrator - The Linear Latent State Calibrator Instance
      localControlCurveParams - Local Smoothing Curve Control Parameters
      valuationParams - Valuation Parameters
      creditPricerParams - Pricer Parameters
      curveSurfaceQuoteContainer - Market Parameters
      valuationCustomizationParams - Quoting Parameters
      Returns:
      Locally Smoothed Instance of the Discount Curve
    • DFRateShapePreserver

      public static final MergedDiscountForwardCurve DFRateShapePreserver​(java.lang.String name, ValuationParams valuationParams, CreditPricerParams creditPricerParams, CurveSurfaceQuoteContainer curveSurfaceQuoteContainer, ValuationCustomizationParams valuationCustomizationParams, java.lang.String basisType, FunctionSetBuilderParams functionSetBuilderParams, CalibratableComponent[] calibrationComponentArray1, double[] calibrationQuoteArray1, java.lang.String[] manifestMeasureArray1, CalibratableComponent[] calibrationComponentArray2, double[] calibrationQuoteArray2, java.lang.String[] manifestMeasureArray2, double epochResponse, boolean zeroSmooth)
      Construct an instance of the Shape Preserver of the desired basis type, using the specified basis set builder parameters.
      Parameters:
      name - Curve Name
      valuationParams - Valuation Parameters
      creditPricerParams - Pricer Parameters
      curveSurfaceQuoteContainer - Market Parameters
      valuationCustomizationParams - Quoting Parameters
      basisType - The Basis Type
      functionSetBuilderParams - The Function Set Basis Parameters
      calibrationComponentArray1 - Array of Calibration Components #1
      calibrationQuoteArray1 - Array of Calibration Quotes #1
      manifestMeasureArray1 - Array of Manifest Measures for component Array #1
      calibrationComponentArray2 - Array of Calibration Components #2
      calibrationQuoteArray2 - Array of Calibration Quotes #2
      manifestMeasureArray2 - Array of Manifest Measures for component Array #2
      epochResponse - The Stretch Start DF
      zeroSmooth - TRUE - Turn on the Zero Rate Smoothing
      Returns:
      Instance of the Shape Preserver of the desired basis type
    • CubicKLKHyperbolicDFRateShapePreserver

      public static final MergedDiscountForwardCurve CubicKLKHyperbolicDFRateShapePreserver​(java.lang.String name, ValuationParams valuationParams, CalibratableComponent[] calibrationComponentArray1, double[] calibrationQuoteArray1, java.lang.String[] manifestMeasureArray1, CalibratableComponent[] calibrationComponentArray2, double[] calibrationQuoteArray2, java.lang.String[] manifestMeasureArray2, boolean zeroSmooth)
      Construct an instance of the Shape Preserver of the KLK Hyperbolic Tension Type, using the specified basis set builder parameters.
      Parameters:
      name - Curve Name
      valuationParams - Valuation Parameters
      calibrationComponentArray1 - Array of Calibration Components #1
      calibrationQuoteArray1 - Array of Calibration Quotes #1
      manifestMeasureArray1 - Array of Manifest Measures for component Array #1
      calibrationComponentArray2 - Array of Calibration Components #2
      calibrationQuoteArray2 - Array of Calibration Quotes #2
      manifestMeasureArray2 - Array of Manifest Measures for component Array #2
      zeroSmooth - TRUE - Turn on the Zero Rate Smoothing
      Returns:
      Instance of the Shape Preserver of the desired basis type
    • CubicPolyDFRateShapePreserver

      public static final MergedDiscountForwardCurve CubicPolyDFRateShapePreserver​(java.lang.String name, ValuationParams valuationParams, CalibratableComponent[] calibrationComponentArray1, double[] calibrationQuoteArray1, java.lang.String[] manifestMeasureArray1, CalibratableComponent[] calibrationComponentArray2, double[] calibrationQuoteArray2, java.lang.String[] manifestMeasureArray2, boolean zeroSmooth)
      Construct an instance of the Shape Preserver of the Cubic Polynomial Type, using the specified basis set builder parameters.
      Parameters:
      name - Curve Name
      valuationParams - Valuation Parameters
      calibrationComponentArray1 - Array of Calibration Components #1
      calibrationQuoteArray1 - Array of Calibration Quotes #1
      manifestMeasureArray1 - Array of Manifest Measures for component Array #1
      calibrationComponentArray2 - Array of Calibration Components #2
      calibrationQuoteArray2 - Array of Calibration Quotes #2
      manifestMeasureArray2 - Array of Manifest Measures for component Array #2
      zeroSmooth - TRUE - Turn on the Zero Rate Smoothing
      Returns:
      Instance of the Shape Preserver of the desired basis type
    • CustomDENSE

      public static final MergedDiscountForwardCurve CustomDENSE​(java.lang.String name, ValuationParams valuationParams, CalibratableComponent[] calibrationComponentArray1, double[] calibrationQuoteArray1, java.lang.String tenor1, java.lang.String[] manifestMeasureArray1, CalibratableComponent[] calibrationComponentArray2, double[] calibrationQuoteArray2, java.lang.String tenor2, java.lang.String[] manifestMeasureArray2, TurnListDiscountFactor turnListDiscountFactor)
      Customizable DENSE Curve Creation Methodology - the references are: - Sankar, L. (1997): OFUTS – An Alternative Yield Curve Interpolator F. A. S. T. Research Documentation Bear Sterns. - Nahum, E. (2004): Changes to Yield Curve Construction – Linear Stripping of the Short End of the Curve F. A. S. T. Research Documentation Bear Sterns. - Kinlay, J., and X. Bai (2009): Yield Curve Construction Models – Tools and Techniques (http://www.jonathankinlay.com/Articles/Yield Curve Construction Models.pdf)
      Parameters:
      name - Curve Name
      valuationParams - Valuation Parameters
      calibrationComponentArray1 - Array of Calibration Components #1
      calibrationQuoteArray1 - Array of Calibration Quotes #1
      tenor1 - Stretch #1 Instrument set re-construction Tenor
      manifestMeasureArray1 - Array of Manifest Measures for component Array #1
      calibrationComponentArray2 - Array of Calibration Components #2
      calibrationQuoteArray2 - Array of Calibration Quotes #2
      tenor2 - Stretch #2 Instrument set re-construction Tenor
      manifestMeasureArray2 - Array of Manifest Measures for component Array #2
      turnListDiscountFactor - The Turns List
      Returns:
      The Customized DENSE Curve.
    • DENSE

      public static final MergedDiscountForwardCurve DENSE​(java.lang.String name, ValuationParams valuationParams, CalibratableComponent[] calibrationComponentArray1, double[] calibrationQuoteArray1, java.lang.String[] manifestMeasureArray1, CalibratableComponent[] calibrationComponentArray2, double[] calibrationQuoteArray2, java.lang.String[] manifestMeasureArray2, TurnListDiscountFactor turnListDiscountFactor)
      The Standard DENSE Curve Creation Methodology - this uses no re-construction set for the short term, and uses 3M dense re-construction for the Swap Set. The references are: - Sankar, L. (1997): OFUTS – An Alternative Yield Curve Interpolator F. A. S. T. Research Documentation Bear Sterns. - Nahum, E. (2004): Changes to Yield Curve Construction – Linear Stripping of the Short End of the Curve F. A. S. T. Research Documentation Bear Sterns. - Kinlay, J., and X. Bai (2009): Yield Curve Construction Models – Tools and Techniques (http://www.jonathankinlay.com/Articles/Yield Curve Construction Models.pdf)
      Parameters:
      name - Curve Name
      valuationParams - Valuation Parameters
      calibrationComponentArray1 - Array of Calibration Components #1
      calibrationQuoteArray1 - Array of Calibration Quotes #1
      manifestMeasureArray1 - Array of Manifest Measures for component Array #1
      calibrationComponentArray2 - Array of Calibration Components #2
      calibrationQuoteArray2 - Array of Calibration Quotes #2
      manifestMeasureArray2 - Array of Manifest Measures for component Array #2
      turnListDiscountFactor - The Turns List
      Returns:
      The Customized DENSE Curve.
    • DUALDENSE

      public static final MergedDiscountForwardCurve DUALDENSE​(java.lang.String name, ValuationParams valuationParams, CalibratableComponent[] calibrationComponentArray1, double[] calibrationQuoteArray1, java.lang.String tenor1, java.lang.String[] manifestMeasureArray1, CalibratableComponent[] calibrationComponentArray2, double[] calibrationQuoteArray2, java.lang.String tenor2, java.lang.String[] manifestMeasureArray2, TurnListDiscountFactor turnListDiscountFactor)
      The DUAL DENSE Curve Creation Methodology - this uses configurable re-construction set for the short term, and another configurable re-construction for the Swap Set. 1D re-construction tenor for the short end will result in CDF (Constant Daily Forward) Discount Curve. The references are: - Sankar, L. (1997): OFUTS – An Alternative Yield Curve Interpolator F. A. S. T. Research Documentation Bear Sterns. - Nahum, E. (2004): Changes to Yield Curve Construction – Linear Stripping of the Short End of the Curve F. A. S. T. Research Documentation Bear Sterns. - Kinlay, J., and X. Bai (2009): Yield Curve Construction Models – Tools and Techniques (http://www.jonathankinlay.com/Articles/Yield Curve Construction Models.pdf)
      Parameters:
      name - Curve Name
      valuationParams - Valuation Parameters
      calibrationComponentArray1 - Array of Calibration Components #1
      calibrationQuoteArray1 - Array of Calibration Quotes #1
      tenor1 - Stretch #1 Instrument set re-construction Tenor
      manifestMeasureArray1 - Array of Manifest Measures for component Array #1
      calibrationComponentArray2 - Array of Calibration Components #2
      calibrationQuoteArray2 - Array of Calibration Quotes #2
      tenor2 - Stretch #2 Instrument set re-construction Tenor
      manifestMeasureArray2 - Array of Manifest Measures for component Array #2
      turnListDiscountFactor - The Turns List
      Returns:
      The Customized DENSE Curve.
    • CustomSplineDiscountCurve

      public static final MergedDiscountForwardCurve CustomSplineDiscountCurve​(java.lang.String name, JulianDate startDate, java.lang.String currency, int[] dateArray, double[] discountFactorArray, SegmentCustomBuilderControl segmentCustomBuilderControl)
      Create an Instance of the Custom Splined Discount Curve
      Parameters:
      name - Curve Name
      startDate - Tenor Start Date
      currency - The Currency
      dateArray - Array of Dates
      discountFactorArray - Array of Discount Factors
      segmentCustomBuilderControl - The Segment Custom Builder Control
      Returns:
      The Instance of the Basis Curve
    • CubicPolynomialDiscountCurve

      public static final MergedDiscountForwardCurve CubicPolynomialDiscountCurve​(java.lang.String name, JulianDate startDate, java.lang.String currency, int[] dateArray, double[] discountFactorArray)
      Create an Instance of the Cubic Polynomial Splined DF Discount Curve
      Parameters:
      name - Curve Name
      startDate - Tenor Start Date
      currency - The Currency
      dateArray - Array of Dates
      discountFactorArray - Array of Discount Factors
      Returns:
      The Instance of the Discount Curve
    • QuarticPolynomialDiscountCurve

      public static final MergedDiscountForwardCurve QuarticPolynomialDiscountCurve​(java.lang.String name, JulianDate startDate, java.lang.String currency, int[] dateArray, double[] discountFactorArray)
      Create an Instance of the Quartic Polynomial Splined DF Discount Curve
      Parameters:
      name - Curve Name
      startDate - Tenor Start Date
      currency - The Currency
      dateArray - Array of Dates
      discountFactorArray - Array of Discount Factors
      Returns:
      The Instance of the Discount Curve
    • KaklisPandelisDiscountCurve

      public static final MergedDiscountForwardCurve KaklisPandelisDiscountCurve​(java.lang.String name, JulianDate startDate, java.lang.String currency, int[] dateArray, double[] discountFactorArray)
      Create an Instance of the Kaklis-Pandelis Splined DF Discount Curve
      Parameters:
      name - Curve Name
      startDate - Tenor Start Date
      currency - The Currency
      dateArray - Array of Dates
      discountFactorArray - Array of Discount Factors
      Returns:
      The Instance of the Discount Curve
    • KLKHyperbolicDiscountCurve

      public static final MergedDiscountForwardCurve KLKHyperbolicDiscountCurve​(java.lang.String name, JulianDate startDate, java.lang.String currency, int[] dateArray, double[] discountFactorArray, double tension)
      Create an Instance of the KLK Hyperbolic Splined DF Discount Curve
      Parameters:
      name - Curve Name
      startDate - Tenor Start Date
      currency - The Currency
      dateArray - Array of Dates
      discountFactorArray - Array of Discount Factors
      tension - The Tension Parameter
      Returns:
      The Instance of the Discount Curve
    • KLKExponentialDiscountCurve

      public static final MergedDiscountForwardCurve KLKExponentialDiscountCurve​(java.lang.String name, JulianDate startDate, java.lang.String currency, int[] dateArray, double[] discountFactorArray, double tension)
      Create an Instance of the KLK Exponential Splined DF Discount Curve
      Parameters:
      name - Curve Name
      startDate - Tenor Start Date
      currency - The Currency
      dateArray - Array of Dates
      discountFactorArray - Array of Discount Factors
      tension - The Tension Parameter
      Returns:
      The Instance of the Discount Curve
    • KLKRationalLinearDiscountCurve

      public static final MergedDiscountForwardCurve KLKRationalLinearDiscountCurve​(java.lang.String name, JulianDate startDate, java.lang.String currency, int[] dateArray, double[] discountFactorArray, double tension)
      Create an Instance of the KLK Linear Rational Splined DF Discount Curve
      Parameters:
      name - Curve Name
      startDate - Tenor Start Date
      currency - The Currency
      dateArray - Array of Dates
      discountFactorArray - Array of Discount Factors
      tension - The Tension Parameter
      Returns:
      The Instance of the Discount Curve
    • KLKRationalQuadraticDiscountCurve

      public static final MergedDiscountForwardCurve KLKRationalQuadraticDiscountCurve​(java.lang.String name, JulianDate startDate, java.lang.String currency, int[] dateArray, double[] discountFactorArray, double tension)
      Create an Instance of the KLK Quadratic Rational Splined DF Discount Curve
      Parameters:
      name - Curve Name
      startDate - Tenor Start Date
      currency - The Currency
      dateArray - Array of Dates
      discountFactorArray - Array of Discount Factors
      tension - The Tension Parameter
      Returns:
      The Instance of the Discount Curve
    • BuildFromDF

      public static final MergedDiscountForwardCurve BuildFromDF​(JulianDate startDate, java.lang.String currency, int[] dateArray, double[] discountFactorArray)
      Build a Discount Curve from an array of discount factors
      Parameters:
      startDate - Start Date
      currency - Currency
      dateArray - Array of dates
      discountFactorArray - array of discount factors
      Returns:
      Discount Curve
    • ExponentiallyCompoundedFlatRate

      public static final ExplicitBootDiscountCurve ExponentiallyCompoundedFlatRate​(JulianDate startDate, java.lang.String currency, double rate)
      Create a Discount Curve from the Exponentially Compounded Flat Rate
      Parameters:
      startDate - Start Date
      currency - Currency
      rate - Rate
      Returns:
      Discount Curve
    • DiscretelyCompoundedFlatRate

      public static final ExplicitBootDiscountCurve DiscretelyCompoundedFlatRate​(JulianDate startDate, java.lang.String currency, double rate, java.lang.String compoundingDayCount, int compoundingFrequency)
      Create a Discount Curve from the Discretely Compounded Flat Rate
      Parameters:
      startDate - Start Date
      currency - Currency
      rate - Rate
      compoundingDayCount - Day Count Convention to be used for Discrete Compounding
      compoundingFrequency - Frequency to be used for Discrete Compounding
      Returns:
      Discount Curve
    • CreateFromFlatYield

      public static final ExplicitBootDiscountCurve CreateFromFlatYield​(JulianDate startDate, java.lang.String currency, double yield, java.lang.String compoundingDayCount, int compoundingFrequency)
      Create a Discount Curve from the Flat Yield
      Parameters:
      startDate - Start Date
      currency - Currency
      yield - Yield
      compoundingDayCount - Day Count Convention to be used for Discrete Compounding
      compoundingFrequency - Frequency to be used for Discrete Compounding
      Returns:
      The Discount Curve Instance
    • PiecewiseForward

      public static final ExplicitBootDiscountCurve PiecewiseForward​(JulianDate startDate, java.lang.String currency, int[] dateArray, double[] rateArray)
      Create a discount curve from an array of dates/rates
      Parameters:
      startDate - Start Date
      currency - Currency
      dateArray - array of dates
      rateArray - array of rates
      Returns:
      Creates the discount curve