WebCab Portfolio for COM v5.0 Demo

Interpolation.CubicSplinePointwisePreEvaluation Method 

Returns the cubic spline interpolation of a function at a point.

public double CubicSplinePointwisePreEvaluation(
   double[] tabulationPointsInX,
   double[] functionValuesAtTabulationPoints,
   double[] secondDifferential,
   double interpolationPoint
);

Parameters

tabulationPointsInX
The array containing the values at which the function is tabulated, i.e. functionValuesAtTabulationPoints[i] = f(tabulationPointsInX[i]).
functionValuesAtTabulationPoints
An array of doubles of the values of the function evaluated at the interpolation points, i.e. functionValuesAtTabulationPoints[i] = f(tabulationPointsInX[i]).
secondDifferential
An array containing the 2nd differential of the cubic spline at the tabulation points. These 2nd differentials can be evaluated using the method CubicSpline2ndDifferential.
interpolationPoint
The point at which the interpolation function is evaluated and returned. Note that this is the point at which we wished to find the value of the given function which we only knew at the tabulation points.

Return Value

The value of the cubic spline interpolation function at a point.

Remarks

We have designed this method so that the 2nd derivatives can be pre-evaluated using the method CubicSpline2ndDifferential.

General Description of Parameters

Given the arrays tabulationPointsInX[0..n-1] and functionValuesAtTabulationPoints[0..n-1], which tabulate a function where the tabulationPointsInX is an array where the elements are monotonically increasing. Moreover, given the array secondDifferenttial[0..n-1], which is the output of the method cubicSpline2ndDifferential, and given a value of the interpolation points interpolationPoint, this method returns the value of the function at interpolationPoint according to the cubic-spline interpolation method.

Description of the Parameters in terms of the Efficient Frontier

With direct regards to the Efficient Frontier the points tabulationPointsInX[0..n-1], will refer to the risk of the portfolios on the Efficient Frontier and be evaluated using GetEfficientFrontierPortfolioRisks of the Markowitz class. The values functionValuesAtTabulationPoints[0..n-1] will refer to the expected returns of the known portfolios on the Efficient Frontier and can be evaluated using GetEfficientFrontierExpectedReturns of the Markowitz class. The 2nd derivatives can be thought of as the rate of change of the increase in the expected return for taken on more risk. That is, the second derivatives express a qualitative property of the Efficient Frontier. The point at which the cubic spline in interpolated namely, interpolationPoint, will refer to the value of the portfolio risk for which the value of corresponding expected return will be returned.

Remarks:

Exceptions

Exception TypeCondition
InterpolationExceptionThrown when the input values do not meet the requirements mentioned above.

See Also

Interpolation Class | WebCab.COM.Finance.Portfolio Namespace | CubicSplinePointwise - this is an alternative means by which the value of the cubic spline can be evaluated at a point. Here rather than providing the 2nd differentials we are required to provide the values of the differentials at the end points. | CubicSpline2ndDifferential - use this method in order to evaluate the 2nd differentials at the tabulation points which most be provided to this method a parameter.