Interface Span

All Known Implementing Classes:
AggregatedSpan, OverlappingStretchSpan

public interface Span
Span is the interface that exposes the functionality behind the collection of Stretches that may be overlapping or non-overlapping. It exposes the following stubs:
  • Retrieve the Left/Right Span Edge
  • Indicate if the specified Label is part of the Merge State at the specified Predictor Ordinate
  • Compute the Response from the containing Stretches
  • Add a Stretch to the Span
  • Retrieve the first Stretch that contains the Predictor Ordinate
  • Retrieve the Stretch by Name
  • Calculate the Response Derivative to the Quote at the specified Ordinate
  • Display the Span Edge Coordinates

Module Product Core Module
Library Fixed Income Analytics
Project Basis Splines and Linear Compounders across a Broad Family of Spline Basis Functions
Package Aggregated/Overlapping Stretch/Span Grids

Author:
Lakshmi Krishnamurthy
  • Method Summary

    Modifier and Type Method Description
    boolean addStretch​(MultiSegmentSequence multiSegmentSequence)
    Add a Stretch to the Span
    double calcResponseValue​(double predictorOrdinate)
    Compute the Response from the containing Stretches
    double calcResponseValueDerivative​(double predictorOrdinate, int order)
    Compute the Response Value Derivative from the containing Stretches
    java.lang.String displayString()
    Display the Span Edge Coordinates
    MultiSegmentSequence getContainingStretch​(double predictorOrdinate)
    Retrieve the first Stretch that contains the Predictor Ordinate
    MultiSegmentSequence getStretch​(java.lang.String name)
    Retrieve the Stretch by Name
    boolean in​(double predictorOrdinate)
    Check if the Predictor Ordinate is in the Stretch Range
    boolean isMergeState​(double predictorOrdinate, LatentStateLabel latentStateLabel)
    Indicate if the specified Label is part of the Merge State at the specified Predictor Ordinate
    WengertJacobian jackDResponseDManifestMeasure​(java.lang.String manifestMeasure, double predictorOrdinate, int order)
    Calculate the Response Derivative to the Manifest Measure at the specified Ordinate
    double left()
    Retrieve the Left Span Edge
    double right()
    Retrieve the Right Span Edge
  • Method Details

    • left

      double left() throws java.lang.Exception
      Retrieve the Left Span Edge
      Returns:
      The Left Span Edge
      Throws:
      java.lang.Exception - Thrown if the Inputs are invalid
    • right

      double right() throws java.lang.Exception
      Retrieve the Right Span Edge
      Returns:
      The Left Span Edge
      Throws:
      java.lang.Exception - Thrown if the Inputs are invalid
    • isMergeState

      boolean isMergeState​(double predictorOrdinate, LatentStateLabel latentStateLabel)
      Indicate if the specified Label is part of the Merge State at the specified Predictor Ordinate
      Parameters:
      predictorOrdinate - The Predictor Ordinate
      latentStateLabel - Merge State Label
      Returns:
      TRUE - The specified Label is part of the Merge State at the specified Predictor Ordinate
    • calcResponseValue

      double calcResponseValue​(double predictorOrdinate) throws java.lang.Exception
      Compute the Response from the containing Stretches
      Parameters:
      predictorOrdinate - The Predictor Ordinate
      Returns:
      The Response
      Throws:
      java.lang.Exception - Thrown if the Inputs are invalid
    • calcResponseValueDerivative

      double calcResponseValueDerivative​(double predictorOrdinate, int order) throws java.lang.Exception
      Compute the Response Value Derivative from the containing Stretches
      Parameters:
      predictorOrdinate - The Predictor Ordinate
      order - Order of the Derivative to be calculated
      Returns:
      The Response Value Derivative
      Throws:
      java.lang.Exception - Thrown if the Inputs are invalid
    • addStretch

      boolean addStretch​(MultiSegmentSequence multiSegmentSequence)
      Add a Stretch to the Span
      Parameters:
      multiSegmentSequence - Stretch to be added
      Returns:
      TRUE - Stretch added successfully
    • getContainingStretch

      MultiSegmentSequence getContainingStretch​(double predictorOrdinate)
      Retrieve the first Stretch that contains the Predictor Ordinate
      Parameters:
      predictorOrdinate - The Predictor Ordinate
      Returns:
      The containing Stretch
    • getStretch

      MultiSegmentSequence getStretch​(java.lang.String name)
      Retrieve the Stretch by Name
      Parameters:
      name - The Stretch Name
      Returns:
      The Stretch
    • 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 Manifest Measure at the Ordinate
    • in

      boolean in​(double predictorOrdinate) throws java.lang.Exception
      Check if the Predictor Ordinate is in the Stretch Range
      Parameters:
      predictorOrdinate - Predictor Ordinate
      Returns:
      TRUE - Predictor Ordinate is in the Range
      Throws:
      java.lang.Exception - Thrown if the Inputs are invalid
    • displayString

      java.lang.String displayString()
      Display the Span Edge Coordinates
      Returns:
      The Edge Coordinates String