Regression Suite

 

RegressionSuite aims to incorporate measurement of the startup lag, measurement of accurate execution times, generating execution statistics, customized input distributions, and processable regression specific details as part of the regular unit tests.

 

RegressionSuite library achieves its design goal by implementing its functionality over several packages:

·        Regression Engine: Provides control for distribution set, invocation strategy, and load.

·        Unit Regression Executor: Framework that implements set up and tear-down, as well as generate run details

·        Regression Statistics: Execution time distribution, start-up and other event delay measurements, and system load monitoring

·        Regression Output: Fine grained regressor level output, module aggregated output, sub-element execution time estimation.

·        Regressor Set: Module containing set of regressors, group level turn on/off and execution control

·        Regression Utilities: Formatting and tolerance checking.

 

Download Source and the binary from the Downloads area.

 

Regression Suite Library consists of the following 5 packages:

 

1.      Core Regression Library: This contains the full set of Regression Suite’s core framework and the set of extensible interfaces.

 

2.      Curve Regression Suite: The Curve Regression Package demonstrates the core curve regression functionality – regression of discount curve, credit curve, FX forward/basis curve, and zero curves.

 

3.      Curve Jacobian Regression Suite: The Product Curve Jacobian Regression package carries out regression across the core suite of products Jacobian to the curve - Cash, EDF, and Fix-float IRS. It also implements the Curve Jacobian Regression Engine.

 

4.      Fixed Point Finder Regression Suite: This contains the suite for regression testing of the non-linear univariate fixed-point finder.

 

5.      Basis Spline Regression Suite: This package contains the random input regression runs on the spline and stretch instances. Runs regress on C1Hermite, local control smoothing, single segment Lagrangians, multi-segment sequences using a variety of spline/stretch basis functions and controls.


Regression Suite: Core

 

 

The core functionality of the regression suite library is implemented in the package org.drip.regression.core. This contains the full set of Regression Suite’s core framework and the set of extensible interfaces.

 

Functionality in this package is implemented over 7 classes – RegressionEngine, RegressionRunDetail, RegressionRunOutput, RegressorSet, UnitRegressionExecutor, UnitRegressionStat, and UnitRegressor.

 

 

RegressionEngine

 

RegressionEngine provides the control and frame-work functionality for the General Purpose Regression Suite. It invokes the following steps as part of the execution:

·        Initialize the regression environment. This step sets up the regression sets, and adds individual regressors to the set.

·        Invoke the regressors in each set one by one.

·        Collect the results and details of the regression runs.

·        Compile the regression statistics.

·        Optionally display the regression statistics.

 

 

RegressionRunDetail

 

RegressionRunDetail contains named field level detailed output of the regression activity.

 

 

RegressionRunOutput

 

RegressionRunOutput contains the output of a single regression activity. It holds the following:

·        The execution time

·        The Success/failure status of the run

·        The regression scenario that was executed

·        The Completion time for the regression module

·        The Regression Run Detail for the regression run

 

 

RegressorSet

 

RegressorSet interface provides the Regression set stubs. It contains a set of regressors and is associated with a unique name. It provides the functionality to set up the contained regressors.

 

 

UnitRegressionExecutor

 

UnitRegressionExecutor implements the UnitRegressor, and splits the regression execution into pre-, execute, and post-regression. It provides default implementations for pre-regression and post-regression. Most typical regressors only need to over-ride the execRegression method.

 

 

UnitRegressionStat

 

UnitRegressionStat creates the statistical details for the Unit Regressor. It holds the following:

·        Execution Initialization Delay

·        Execution time mean, variance, maximum, and minimum

·        The full list of individual execution times

 

 

UnitRegressor

 

UnitRegressor provides the stub functionality for the Individual Regressors. Its derived classes implement the actual regression run. Individual regressors are named.


Curve Regression Suite

 

 

The core functionality of the curve regression library is implemented in the package org.drip.regression.curve. The Curve Regression Package demonstrates the core curve regression functionality – regression of discount curve, credit curve, FX forward/basis curve, and zero curves.

 

Functionality in this package is implemented over 5 classes – DiscountCurveRegressor, ZeroCurveRegressor, CreditCurveRegressor, FXCurveRegressor, and CreditAnalyticsRegressionEngine.

 

 

DiscountCurveRegressor

 

DiscountCurveRegressor implements the regression set analysis for the Discount Curve. DiscountCurveRegressor regresses 11 scenarios:

·        #1: Create the discount curve from a set 30 instruments (cash/future/swap).

·        #2: Create the discount curve from a flat discount rate.

·        #3: Create the discount curve from a set of discount factors.

·        #4: Create the discount curve from the implied discount rates.

·        #5: Extract the discount curve instruments and quotes.

·        #6: Create a parallel shifted discount curve.

·        #7: Create a rate shifted discount curve.

·        #8: Create a basis rate shifted discount curve.

·        #9: Create a node tweaked discount curve.

·        #10: Compute the effective discount factor between 2 dates.

·        #11: Compute the effective implied rate between 2 dates.

 

 

ZeroCurveRegressor

 

ZeroCurveRegressor implements the regression analysis set for the Zero Curve. The regression tests do the following:

·        Build a discount curve, followed by the zero curve.

·        Regressor #1: Compute zero curve discount factors.

·        Regressor #2: Compute zero curve zero rates.

 

 

CreditCurveRegressor

 

CreditCurveRegressor implements the regression set analysis for the Credit Curve. CreditCurveRegressor regresses 12 scenarios:

·        #1: Create an SNAC CDS.

·        #2: Create the credit curve from a set of CDS instruments.

·        #3: Create the credit curve from a flat hazard rate.

·        #4: Create the credit curve from a set of survival probabilities.

·        #5: Create the credit curve from an array of hazard rates.

·        #6: Extract the credit curve instruments and quotes.

·        #7: Create a parallel hazard shifted credit curve.

·        #8: Create a parallel quote shifted credit curve.

·        #9: Create a node tweaked credit curve.

·        #10: Set a specific default date on the credit curve.

·        #11: Compute the effective survival probability between 2 dates.

·        #12: Compute the effective hazard rate between 2 dates.

 

 

FXCurveRegressor

 

FXCurveRegressor implements the regression analysis set for the FX Curve. FXCurveRegressor implements 3 regression tests:

·        #1: FX Basis and FX Curve Creation: Construct a FX forward Curve from an array of FX forward nodes and the spot.

·        #2: Imply the FX Forward given the domestic and foreign discount curves.

·        #3a: Compute the domestic and foreign basis given the market FX forward.

·        #3b: Build the domestic/foreign basis curve given the corresponding basis nodes.

·        #3c: Imply the array of FX forward points/PIPs from the array of basis and domestic/foreign discount curves.

 

 

CreditAnalyticsRegressionEngine

 

CreditAnalyticsRegressionEngine implements the RegressionEngine for the curve regression. It adds the CreditCurveRegressor, DiscountCurveRegressor, FXCurveRegressor, and ZeroCurveRegressor, and launches the regression engine.


Curve Jacobian Regression Suite

 

 

The core functionality of the curve Jacobian regression library is implemented in the package org.drip.regression.curveJacobian. The Product Curve Jacobian Regression package carries out regression across the core suite of products Jacobian to the curve– Cash, EDF, and Fix-float IRS. It also implements the Curve Jacobian Regression Engine.

 

Functionality in this package is implemented over 5 classes – CashJacobianRegressorSet, EDFJacobianRegressorSet, IRSJacobianRegressorSet, DiscountCurveJacobianRegressorSet, and CurveJacobianRegressionEngine.

 

 

CashJacobianRegressorSet

 

CashJacobianRegressorSet implements the regression analysis set for the Cash product related Sensitivity Jacobians. Specifically, it computes the PVDF micro-Jack.

 

 

EDFJacobianRegressorSet

 

EDFJacobianRegressorSet implements the regression analysis set for the EDF product related Sensitivity Jacobians. Specifically, it computes the PVDF micro-Jack.

 

 

IRSJacobianRegressorSet

 

IRSJacobianRegressorSet implements the regression analysis set for the IRS product related Sensitivity Jacobians. Specifically, it computes the PVDF micro-Jack.

 

 

DiscountCurveJacobianRegressorSet

 

DiscountCurveJacobianRegressorSet implements the regression analysis for the full discount curve (built from cash/future/swap) Sensitivity Jacobians. Specifically, it computes the PVDF micro-Jack.

 

 

CurveJacobianRegressionEngine

 

CurveJacobianRegressionEngine implements the RegressionEngine for the curve Jacobian regression. It adds the CashJacobianRegressorSet, the EDFJacobianRegressorSet, the IRSJacobianRegressorSet, and the DiscountCurveJacobianRegressorSet, and launches the regression engine.


Fixed-Point Finder Regression Suite

 

 

The core functionality of the non-linear fixed-point finder regression library is implemented in the package org.drip.regression.fixedpointfinder. This contains the suite for regression testing of the non-linear univariate fixed-point finder.

 

Functionality in this package is implemented over 4 classes – OpenRegressorSet, BracketingRegressorSet, CompoundBracketingRegressorSet, and FixedPointFinderRegressionEngine.

 

 

OpenRegressorSet

 

OpenRegressorSet implements the regression run for the Open (i.e., Newton) Fixed Point Search Method.

 

 

BracketingRegressorSet

 

BracketingRegressorSet implements regression run for the Primitive Bracketing Fixed Point Search Method. It implements the following 4 primitive bracketing schemes: Bisection, False Position, Quadratic, and Inverse Quadratic.

 

 

CompoundBracketingRegressorSet

 

CompoundBracketingRegressorSet implements regression run for the Compound Bracketing Fixed Point Search Method. It implements the following 2 compound bracketing schemes: Brent and Zheng.

 

 

FixedPointFinderRegressionEngine

 

FixedPointFinderRegressionEngine implements the RegressionEngine for the Fixed Point Finder regression. It adds the OpenRegressorSet, the BracketingRegressorSet, and the CompoundBracketingRegressorSet, and launches the regression engine.


Basis Spline Regression Suite

 

 

The core functionality of the basis spline regression library is implemented in the package org.drip.regression.spline. This package contains the random input regression runs on the spline and stretch instances. Runs regress on C1Hermite, local control smoothing, single segment Lagrangians, multi-segment sequences using a variety of spline/stretch basis functions and controls.

 

Functionality in this package is implemented over 6 classes - BasisSplineRegressor, HermiteBasisSplineRegressor, LagrangePolynomialStretchRegressor, LocalControlBasisSplineRegressor, BasisSplineRegressorSet, and BasisSplineRegressionEngine.

 

 

BasisSplineRegressor

 

BasisSplineRegressor implements the custom basis spline regressor for the given basis spline. As part of the regression run, it executes the following:

·        Calibrate and compute the left and he right Jacobian.

·        Reset right node and re-run calibration.

·        Compute an intermediate value Jacobian.

 

 

HermiteBasisSplineRegressor

 

HermiteBasisSplineRegressor implements the BasisSplineRegressor using the Hermite basis spline regressor.

 

 

LagrangePolynomialStretchRegressor

 

LagrangePolynomialStretchRegressor implements the BasisSplineRegressor using the SingleSegmentLagrangePolynomial regressor.

 

 

LocalControlBasisSplineRegressor

 

LocalControlBasisSplineRegressor implements the local control basis spline regressor for the given basis spline. As part of the regression run, it executes the following:

·        Calibrate and compute the left and the right Jacobian

·        Insert the Local Control Hermite, Cardinal, and Catmull-Rom knots

·        Run Regressor for the C1 Local Control C1 Slope Insertion Bessel/Hermite Spline

·        Compute an intermediate value Jacobian

 

 

BasisSplineRegressorSet

 

BasisSplineRegressorSet carries out regression testing for the following series of basis splines:

·        Polynomial Basis Spline, n = 2 basis functions, and

·        Polynomial Basis Spline, n = 3 basis functions, and

·        Polynomial Basis Spline, n = 4 basis functions, and

·        Polynomial Basis Spline, n = 4 basis functions, and

·        Polynomial Basis Spline, n = 5 basis functions, and

·        Polynomial Basis Spline, n = 5 basis functions, and

·        Polynomial Basis Spline, n = 5 basis functions, and

·        Polynomial Basis Spline, n = 6 basis functions, and

·        Polynomial Basis Spline, n = 6 basis functions, and

·        Polynomial Basis Spline, n = 6 basis functions, and

·        Polynomial Basis Spline, n = 6 basis functions, and

·        Polynomial Basis Spline, n = 7 basis functions, and

·        Polynomial Basis Spline, n = 7 basis functions, and

·        Polynomial Basis Spline, n = 7 basis functions, and

·        Polynomial Basis Spline, n = 7 basis functions, and

·        Polynomial Basis Spline, n = 7 basis functions, and

·        Bernstein Polynomial Basis Spline, n = 4 basis functions, and

·        Exponential Tension Spline, n = 4 basis functions, Tension = 1., and

·        Hyperbolic Tension Spline, n = 4 basis functions, Tension = 1., and

·        Kaklis-Pandelis Tension Spline, n = 4 basis functions, KP = 2, and

·        C1 Hermite Local Spline, n = 4 basis functions, and

·        Hermite Local Spline with Local, Catmull-Rom, and Cardinal Knots, n = 4 basis functions, and

 

 

BasisSplineRegressionEngine

 

BasisSplineRegressionEngine implements the RegressionEngine class for the basis spline functionality.