Class CurveInterpolators


  • public final class CurveInterpolators
    extends java.lang.Object
    The standard set of curve interpolators.
    • Field Detail

      • LINEAR

        public static final CurveInterpolator LINEAR
        Linear interpolator.

        The interpolated value of the function y at x between two data points (x1, y1) and (x2, y2) is given by:
        y = y1 + (x - x1) * (y2 - y1) / (x2 - x1).

      • LOG_LINEAR

        public static final CurveInterpolator LOG_LINEAR
        Log linear interpolator.

        The interpolated value of the function y at x between two data points (x1, y1) and (x2, y2) is given by:
        y = y1 (y2 / y1) ^ ((x - x1) / (x2 - x1))
        It is the equivalent of performing a linear interpolation on a data set after taking the logarithm of the y-values.

      • SQUARE_LINEAR

        public static final CurveInterpolator SQUARE_LINEAR
        Square linear interpolator.

        The interpolator is used for interpolation on variance for options. Interpolation is linear on y^2. All values of y must be positive.

      • DOUBLE_QUADRATIC

        public static final CurveInterpolator DOUBLE_QUADRATIC
        Double quadratic interpolator.
      • TIME_SQUARE

        public static final CurveInterpolator TIME_SQUARE
        Time square interpolator.

        The interpolation is linear on x y^2. The interpolator is used for interpolation on integrated variance for options. All values of y must be positive.

      • LOG_NATURAL_SPLINE_MONOTONE_CUBIC

        public static final CurveInterpolator LOG_NATURAL_SPLINE_MONOTONE_CUBIC
        Log natural spline interpolation with monotonicity filter.

        Finds an interpolant F(x) = exp( f(x) ) where f(x) is a Natural cubic spline with Monotonicity cubic filter.

      • LOG_NATURAL_SPLINE_DISCOUNT_FACTOR

        public static final CurveInterpolator LOG_NATURAL_SPLINE_DISCOUNT_FACTOR
        Log natural spline interpolator for discount factors.

        Finds an interpolant F(x) = exp( f(x) ) where f(x) is a natural cubic spline going through the point (0,1).

      • NATURAL_CUBIC_SPLINE

        public static final CurveInterpolator NATURAL_CUBIC_SPLINE
        Natural cubic spline interpolator.
      • NATURAL_SPLINE

        public static final CurveInterpolator NATURAL_SPLINE
        Natural spline interpolator.
      • NATURAL_SPLINE_NONNEGATIVITY_CUBIC

        public static final CurveInterpolator NATURAL_SPLINE_NONNEGATIVITY_CUBIC
        Natural spline interpolator with non-negativity filter.
      • PRODUCT_NATURAL_SPLINE

        public static final CurveInterpolator PRODUCT_NATURAL_SPLINE
        Product natural spline interpolator.

        Given a data set (x[i], y[i]), interpolate (x[i], x[i] * y[i]) by natural cubic spline.

        As a curve for the product x * y is not well-defined at x = 0, we impose the condition that all of the x data to be the same sign, such that the origin is not within data range. The x key value must not be close to zero.

      • PRODUCT_NATURAL_SPLINE_MONOTONE_CUBIC

        public static final CurveInterpolator PRODUCT_NATURAL_SPLINE_MONOTONE_CUBIC
        Product natural spline interpolator with monotonicity filter.

        Given a data set (x[i], y[i]), interpolate (x[i], x[i] * y[i]) by natural cubic spline with monotonicity filter.

      • PRODUCT_LINEAR

        public static final CurveInterpolator PRODUCT_LINEAR
        Product linear interpolator.

        Given a data set (x[i], y[i]), interpolate (x[i], x[i] * y[i]) by linear functions.

        As a curve for the product x * y is not well-defined at x = 0, we impose the condition that all of the x data to be the same sign, such that the origin is not within data range. The x key value must not be close to zero.

      • STEP_UPPER

        public static final CurveInterpolator STEP_UPPER
        Step upper interpolator.

        The interpolated value at x s.t. x1 < x =< x2 is the value at x2.

      • PCHIP

        public static final CurveInterpolator PCHIP
        Piecewise cubic Hermite interpolator with monotonicity.