Package org.drip.spline.stretch
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 doublegetLeftPredictorOrdinateEdge()Return the Left Predictor Ordinate EdgedoublegetRightPredictorOrdinateEdge()Return the Right Predictor Ordinate EdgebooleanisCoMonotone(double[] measuredResponseArray)Verify whether the Stretch mini-max Behavior matches the MeasurementbooleanisKnot(double predictorOrdinate)Is the given Predictor Ordinate a Knot LocationbooleanisLocallyMonotone()Indicate if all the comprising Segments are MonotoneWengertJacobianjackDResponseDCalibrationInput(double predictorOrdinate, int order)Calculate the Response Derivative to the Calibration Inputs at the specified OrdinateWengertJacobianjackDResponseDManifestMeasure(java.lang.String manifestMeasure, double predictorOrdinate, int order)Calculate the Response Derivative to the Manifest Measure at the specified OrdinateMonotonocitymonotoneType(double predictorOrdinate)Identify the Monotone Type for the Segment underlying the given Predictor OrdinatebooleanresetNode(int predictorOrdinateNodeIndex, double resetResponse)Reset the Predictor Ordinate Node Index with the given ResponsebooleanresetNode(int nodeIndex, SegmentResponseValueConstraint resetSegmentResponseValueConstraint)Reset the Predictor Ordinate Node Index with the given Segment ConstraintdoubleresponseValue(double predictorOrdinate)Calculate the Response Value at the given Predictor OrdinatedoubleresponseValueDerivative(double predictorOrdinate, int order)Calculate the Response Value Derivative at the given Predictor Ordinate for the specified orderbooleansetup(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.R1ToR1toAU()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 ResponsesegmentRightEdgeResponseArray- Array of Segment Right Edge ResponsesstretchBestFitResponse- Stretch Fitness Weighted ResponseboundarySettings- The Calibration Boundary ConditioncalibrationDetail- The Calibration Detail- Returns:
- TRUE - Set up was successful
-
responseValue
double responseValue(double predictorOrdinate) throws java.lang.ExceptionCalculate 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.ExceptionCalculate the Response Value Derivative at the given Predictor Ordinate for the specified order- Parameters:
predictorOrdinate- Predictor Ordinateorder- Order the Derivative- Returns:
- The Response Value
- Throws:
java.lang.Exception- Thrown if the Response Value Derivative cannot be calculated
-
jackDResponseDCalibrationInput
Calculate the Response Derivative to the Calibration Inputs at the specified Ordinate- Parameters:
predictorOrdinate- Predictor Ordinateorder- 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 soughtpredictorOrdinate- Predictor Ordinateorder- Order of Derivative desired- Returns:
- Jacobian of the Response Derivative to the Quote at the Ordinate
-
monotoneType
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.ExceptionIndicate 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.ExceptionVerify 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 resetresetResponse- 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 resetresetSegmentResponseValueConstraint- 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
-