Class CurveStretch

All Implemented Interfaces:
MultiSegmentSequence, SingleSegmentSequence

public class CurveStretch
extends CalibratableMultiSegmentSequence
CurveStretch expands the regular Multi-Segment Stretch to aid the calibration of Boot-strapped Instruments. In particular, CurveStretch implements the following functions that are used at different stages of curve construction sequence:
  • Mark the Range of the "built" Segments
  • Clear the built range mark to signal the start of a fresh calibration run
  • Indicate if the specified Predictor Ordinate is inside the "Built" Range
  • Retrieve the MergeSubStretchManager

Module Product Core Module
Library Fixed Income Analytics
Project Latent State Inference and Creation Utilities
Package Multi-Pass Customized Stretch Curve
Author:
Lakshmi Krishnamurthy
  • Constructor Details

    • CurveStretch

      public CurveStretch​(java.lang.String name, LatentStateResponseModel[] latentStateResponseModelArray, SegmentCustomBuilderControl[] segmentCustomBuilderControlArray) throws java.lang.Exception
      CurveStretch constructor - Construct a sequence of Basis Spline Segments
      Parameters:
      name - Name of the Stretch
      latentStateResponseModelArray - Array of Segments
      segmentCustomBuilderControlArray - Array of Segment Builder Parameters
      Throws:
      java.lang.Exception - Thrown if the inputs are invalid
  • Method Details

    • markSegmentBuilt

      public boolean markSegmentBuilt​(int segmentIndex, java.util.Set<LatentStateLabel> latentStateLabelSet)
      Mark the Range of the "built" Segments, and set the set of Merge Latent States
      Parameters:
      segmentIndex - The Current Segment Range Built
      latentStateLabelSet - Set of the merging Latent State Labels
      Returns:
      TRUE - Range successfully marked as "built"
    • clearBuiltRange

      public boolean clearBuiltRange()
      Clear the built range mark to signal the start of a fresh calibration run
      Returns:
      TRUE - Built Range successfully cleared
    • inBuiltRange

      public boolean inBuiltRange​(double predictorOrdinate) throws java.lang.Exception
      Indicate if the specified Predictor Ordinate is inside the "Built" Range
      Parameters:
      predictorOrdinate - The Predictor Ordinate
      Returns:
      TRUE - The specified Predictor Ordinate is inside the "Built" Range
      Throws:
      java.lang.Exception - Thrown if inputs are invalid
    • msm

      public MergeSubStretchManager msm()
      Description copied from interface: MultiSegmentSequence
      Retrieve the Merge Stretch Manager if it exists.
      Specified by:
      msm in interface MultiSegmentSequence
      Overrides:
      msm in class CalibratableMultiSegmentSequence
      Returns:
      The Merge Stretch Manager