Interface SingleSegmentSequence

All Known Subinterfaces:
MultiSegmentSequence
All Known Implementing Classes:
CalibratableMultiSegmentSequence, CurveStretch, SingleSegmentLagrangePolynomial

public interface SingleSegmentSequence
SingleSegmentSequence is the interface that exposes functionality that spans multiple segments. Its derived instances hold the ordered segment sequence, the segment control parameters, and, if available, the spanning Jacobian. SingleSegmentSequence exports the following group of functionality:
  • Set up (i.e., calibrate) the individual Segments in the Stretch to the Response Values corresponding to each Segment Predictor right Ordinate
  • Calculate the Response Value at the given Predictor Ordinate
  • Calculate the Response Value Derivative at the given Predictor Ordinate for the specified order
  • Calculate the Response Derivative to the Calibration Inputs at the specified Ordinate
  • Calculate the Response Derivative to the Manifest Measure at the specified Ordinate
  • Identify the Monotone Type for the Segment underlying the given Predictor Ordinate
  • Indicate if all the comprising Segments are Monotone
  • Verify whether the Stretch mini-max Behavior matches the Measurement
  • Is the given Predictor Ordinate a Knot Location
  • Reset the Predictor Ordinate Node Index with the given Response
  • Reset the Predictor Ordinate Node Index with the given Segment Constraint
  • Return the Left Predictor Ordinate Edge
  • Return the Right Predictor Ordinate Edge
  • Convert the Segment Sequence into an Abstract Univariate Instance

Module Product Core Module
Library Fixed Income Analytics
Project Basis Splines and Linear Compounders across a Broad Family of Spline Basis Functions
Package Multi-Segment Sequence Spline Stretch

Author:
Lakshmi Krishnamurthy
  • Method Summary

    Modifier and Type Method Description
    double getLeftPredictorOrdinateEdge()
    Return the Left Predictor Ordinate Edge
    double getRightPredictorOrdinateEdge()
    Return the Right Predictor Ordinate Edge
    boolean isCoMonotone​(double[] measuredResponseArray)
    Verify whether the Stretch mini-max Behavior matches the Measurement
    boolean isKnot​(double predictorOrdinate)
    Is the given Predictor Ordinate a Knot Location
    boolean isLocallyMonotone()
    Indicate if all the comprising Segments are Monotone
    WengertJacobian jackDResponseDCalibrationInput​(double predictorOrdinate, int order)
    Calculate the Response Derivative to the Calibration Inputs at the specified Ordinate
    WengertJacobian jackDResponseDManifestMeasure​(java.lang.String manifestMeasure, double predictorOrdinate, int order)
    Calculate the Response Derivative to the Manifest Measure at the specified Ordinate
    Monotonocity monotoneType​(double predictorOrdinate)
    Identify the Monotone Type for the Segment underlying the given Predictor Ordinate
    boolean resetNode​(int predictorOrdinateNodeIndex, double resetResponse)
    Reset the Predictor Ordinate Node Index with the given Response
    boolean resetNode​(int nodeIndex, SegmentResponseValueConstraint resetSegmentResponseValueConstraint)
    Reset the Predictor Ordinate Node Index with the given Segment Constraint
    double responseValue​(double predictorOrdinate)
    Calculate the Response Value at the given Predictor Ordinate
    double responseValueDerivative​(double predictorOrdinate, int order)
    Calculate the Response Value Derivative at the given Predictor Ordinate for the specified order
    boolean setup​(double stretchLeadingResponse, double[] segmentRightEdgeResponseArray, StretchBestFitResponse stretchBestFitResponse, BoundarySettings boundarySettings, int calibrationDetail)
    Set up (i.e., calibrate) the individual Segments in the Stretch to the Response Values corresponding to each Segment Predictor right Ordinate.
    R1ToR1 toAU()
    Convert the Segment Sequence into an AbstractUnivariate Instance
  • Method Details

    • setup

      boolean setup​(double stretchLeadingResponse, double[] segmentRightEdgeResponseArray, StretchBestFitResponse stretchBestFitResponse, BoundarySettings boundarySettings, int calibrationDetail)
      Set up (i.e., calibrate) the individual Segments in the Stretch to the Response Values corresponding to each Segment Predictor right Ordinate.
      Parameters:
      stretchLeadingResponse - Stretch Left-most Response
      segmentRightEdgeResponseArray - Array of Segment Right Edge Responses
      stretchBestFitResponse - Stretch Fitness Weighted Response
      boundarySettings - The Calibration Boundary Condition
      calibrationDetail - The Calibration Detail
      Returns:
      TRUE - Set up was successful
    • responseValue

      double responseValue​(double predictorOrdinate) throws java.lang.Exception
      Calculate the Response Value at the given Predictor Ordinate
      Parameters:
      predictorOrdinate - Predictor Ordinate
      Returns:
      The Response Value
      Throws:
      java.lang.Exception - Thrown if the Response Value cannot be calculated
    • responseValueDerivative

      double responseValueDerivative​(double predictorOrdinate, int order) throws java.lang.Exception
      Calculate the Response Value Derivative at the given Predictor Ordinate for the specified order
      Parameters:
      predictorOrdinate - Predictor Ordinate
      order - Order the Derivative
      Returns:
      The Response Value
      Throws:
      java.lang.Exception - Thrown if the Response Value Derivative cannot be calculated
    • jackDResponseDCalibrationInput

      WengertJacobian jackDResponseDCalibrationInput​(double predictorOrdinate, int order)
      Calculate the Response Derivative to the Calibration Inputs at the specified Ordinate
      Parameters:
      predictorOrdinate - Predictor Ordinate
      order - Order of Derivative desired
      Returns:
      Jacobian of the Response Derivative to the Calibration Inputs at the Ordinate
    • jackDResponseDManifestMeasure

      WengertJacobian jackDResponseDManifestMeasure​(java.lang.String manifestMeasure, double predictorOrdinate, int order)
      Calculate the Response Derivative to the Manifest Measure at the specified Ordinate
      Parameters:
      manifestMeasure - Manifest Measure whose Sensitivity is sought
      predictorOrdinate - Predictor Ordinate
      order - Order of Derivative desired
      Returns:
      Jacobian of the Response Derivative to the Quote at the Ordinate
    • monotoneType

      Monotonocity monotoneType​(double predictorOrdinate)
      Identify the Monotone Type for the Segment underlying the given Predictor Ordinate
      Parameters:
      predictorOrdinate - Predictor Ordinate
      Returns:
      Segment Monotone Type
    • isLocallyMonotone

      boolean isLocallyMonotone() throws java.lang.Exception
      Indicate if all the comprising Segments are Monotone
      Returns:
      TRUE - Fully locally monotonic
      Throws:
      java.lang.Exception - Thrown if the Segment Monotone Type could not be estimated
    • isCoMonotone

      boolean isCoMonotone​(double[] measuredResponseArray) throws java.lang.Exception
      Verify whether the Stretch mini-max Behavior matches the Measurement
      Parameters:
      measuredResponseArray - The Array of Measured Responses
      Returns:
      TRUE - Stretch is co-monotonic with the measured Responses
      Throws:
      java.lang.Exception - Thrown if the Segment Monotone Type could not be estimated
    • isKnot

      boolean isKnot​(double predictorOrdinate)
      Is the given Predictor Ordinate a Knot Location
      Parameters:
      predictorOrdinate - Predictor Ordinate
      Returns:
      TRUE - Given Predictor Ordinate corresponds to a Knot
    • resetNode

      boolean resetNode​(int predictorOrdinateNodeIndex, double resetResponse)
      Reset the Predictor Ordinate Node Index with the given Response
      Parameters:
      predictorOrdinateNodeIndex - The Predictor Ordinate Node Index whose Response is to be reset
      resetResponse - The Response to reset
      Returns:
      TRUE - Reset succeeded
    • resetNode

      boolean resetNode​(int nodeIndex, SegmentResponseValueConstraint resetSegmentResponseValueConstraint)
      Reset the Predictor Ordinate Node Index with the given Segment Constraint
      Parameters:
      nodeIndex - The Predictor Ordinate Node Index whose Response is to be reset
      resetSegmentResponseValueConstraint - The Segment Constraint
      Returns:
      TRUE - Reset succeeded
    • getLeftPredictorOrdinateEdge

      double getLeftPredictorOrdinateEdge()
      Return the Left Predictor Ordinate Edge
      Returns:
      The Left Predictor Ordinate Edge
    • getRightPredictorOrdinateEdge

      double getRightPredictorOrdinateEdge()
      Return the Right Predictor Ordinate Edge
      Returns:
      The Right Predictor Ordinate Edge
    • toAU

      R1ToR1 toAU()
      Convert the Segment Sequence into an AbstractUnivariate Instance
      Returns:
      The AbstractUnivariate Instance