Class CurveExtrapolators

• java.lang.Object
• com.opengamma.strata.market.curve.interpolator.CurveExtrapolators

• public final class CurveExtrapolators
extends Object
The standard set of curve extrapolators.
• Field Detail

• FLAT

public static final CurveExtrapolator FLAT
Flat extrapolator.

The leftmost (rightmost) point of the data set is used for all extrapolated values.

• LINEAR

public static final CurveExtrapolator LINEAR
Linear extrapolator.

The extrapolation continues linearly from the leftmost (rightmost) point of the data set.

• LOG_LINEAR

public static final CurveExtrapolator LOG_LINEAR
Log linear extrapolator.

The extrapolant is exp(f(x)) where f(x) is a linear function which is smoothly connected with a log-interpolator exp(F(x)).

public static final CurveExtrapolator QUADRATIC_LEFT

This left extrapolator is designed for extrapolating a discount factor where the trivial point (0d,1d) is NOT involved in the data. The extrapolation is completed by applying a quadratic extrapolant on the discount factor (not log of the discount factor), where the point (0d,1d) is inserted and the first derivative value is assumed to be continuous at the first key.

public static final CurveExtrapolator DISCOUNT_FACTOR_QUADRATIC_LEFT_ZERO_RATE
Discount factor quadratic left extrapolator for zero rates.

This left extrapolator is designed for extrapolating a discount factor for zero rate inputs where the trivial point (0d,1d) is NOT involved in the data. Use QUADRATIC_LEFT if the input data is discount factor values.

The extrapolation is completed by applying a quadratic extrapolant on the discount factor (not log of the discount factor), where the point (0d,1d) is inserted and the first derivative value is assumed to be continuous at the first key.

• DISCOUNT_FACTOR_LINEAR_RIGHT_ZERO_RATE

public static final CurveExtrapolator DISCOUNT_FACTOR_LINEAR_RIGHT_ZERO_RATE
Discount factor linear right extrapolator for zeor rates.

This right extrapolator is designed for extrapolating a discount factor for zero rate inputs. Use LINEAR if the input data is discount factor values.

The gradient of the extrapolation is determined so that the first derivative value of the discount factor is continuous at the last key.

• PRODUCT_LINEAR

public static final CurveExtrapolator PRODUCT_LINEAR
Product linear extrapolator.

Given a data set (xValues[i], yValues[i]), extrapolate (x[i], x[i] * y[i]) by a linear function.

The gradient of the extrapolation is obtained from the gradient of the interpolated curve on (x[i], x[i] * y[i]) at the first/last node.

The extrapolation is ambiguous at x=0. Thus the following rule applies: The x value of the first node must be strictly negative for the left extrapolation, whereas the x value of the last node must be strictly positive for the right extrapolation.

• EXPONENTIAL

public static final CurveExtrapolator EXPONENTIAL
Exponential extrapolator.

Outside the data range the function is an exponential exp(m*x) where m is such that on the left exp(m * firstXValue) = firstYValue and on the right exp(m * lastXValue) = lastYValue.

• EXCEPTION

public static final CurveExtrapolator EXCEPTION
Extrapolator that throws an exception if extrapolation is attempted.
• INTERPOLATOR

public static final CurveExtrapolator INTERPOLATOR
Interpolator extrapolator.

The extrapolator does no extrapolation itself and delegates to the interpolator for all operations.