Go to Deriscope's documentation start page

Interpolation__Interp_Method

Interp Method refers to List of possible types that describe the interpolation of a reference quantity v that depends on a single independent variable x.
Given a set of independent variable values x₁, x₂, ..., xₙ for which the respective reference quantity values v₁, v₂, ..., vₙ are known, each interpolation type prescribes how the reference quantity value v corresponding to some x is calculated, where x is within the range spanned by x₁, x₂, ..., xₙ.
Available Interp Method types:
Backwd Flat
The reference quantity is interpolated according to the QuantLib BackwardFlat method.
The value at a node is extended flatly back to the previous node.
Comp Cubic
The reference quantity is interpolated according to the QuantLib CompoundedCubic method, whereby the
Interpolation::Interp Method::Cubic interpolation scheme is applied on the discretely compounded transform (as defined in Interpolation::Interp Method::Comp Linear) of the reference quantity.
Comp Linear
The reference quantity r is interpolated according to the QuantLib CompoundedLinear method, whereby its discretely compounded transform R := m(eʳᐟᵐ-1) is linearly interpolated, i.e. according to
Interpolation::Interp Method::Linear
where m is a constant denoting the compounding frequency, where - for example, m = 1 means annual compounding and m = 2 means semiannual compounding.
Simple compounding with m = 0 is not supported.
When r represents the continuously compounded interest rate over a time period t, R represents the corresponding discretely compounded zero rate over the same period t.
This is derived from the fact that the interest accrued by r over t on a unit notional equals exp(rt)-1, whereas that accrued by R equals (1+R/m)ᵗᵐ-1
Setting these two amounts equal to each other leads to the above definition of R
Convex Mono
The reference quantity is interpolated according to the QuantLib ConvexMonotone method.
This results in the reference quantity being both convex (positive second derivative) and monotone (non-vanishing fiorst derivative), both within the intervals and at the interpolating nodes. Web reference available
here
A setting of monotonicity = 1 and quadraticity = 0 will reproduce the basic Hagan/West method.
However, this can produce excessive gradients which can mean P&L swings for some curves.
Setting monotonicity less than 1 and/or quadraticity greater than 0 produces smoother curves.
Extra enhancement to avoid negative values (if required) is in place.
Cubic
The reference quantity is interpolated according to the QuantLib Cubic method.
Cubic interpolation is fully defined when the function values r₁, r₂, ..., rₙ at points x₁, x₂, ..., xₙ are supplemented with function derivative values d₁, d₂, ..., dₙ.
Different type of first derivative approximations are implemented, both local and non-local.
Local schemes (Fourth-order, Parabolic, Modified Parabolic, Fritsch-Butland, Akima, Kruger) use only function values near the given points to calculate each derivative value.
Non-local schemes (Spline with different boundary conditions) use all function values and obtain the derivative values d₁, d₂, ..., dₙ by solving a linear system of equations.
Local schemes produce interpolants with continuous first derivative function, while the spline schemes generate interpolants with continuous second derivative function.
Hyman's monotonicity constraint filter is also implemented:
It can be applied to all schemes to ensure that in the regions of local monotoniticity of the input (three successive increasing or decreasing values) the interpolating cubic remains monotonic.
If the interpolating cubic is already monotonic, the Hyman filter leaves it unchanged preserving all its original features.
In the case of interpolants with continuous second derivative function the Hyman filter ensures local monotonicity at the expense of the second derivative of the interpolant which will no longer be continuous in the points where the filter has been applied.
While some non-linear schemes (Modified Parabolic, Fritsch-Butland, Kruger) are guaranteed to be locally monotonic in their original approximation, all other schemes must be filtered according to the Hyman criteria at the expense of their linearity.
See R. L. Dougherty, A. Edelman, and J. M. Hyman, "Nonnegativity-, Monotonicity-, or Convexity-Preserving CubicSpline and Quintic Hermite Interpolation" Mathematics Of Computation, v. 52, n. 186, April 1989, pp. 471-494.
Fin Cubic
This is equivalent to a monotonic
Interpolation::Interp Method::Cubic, whereby the derivatives are approximated according to Interpolation::Deriv Approx::Kruger and the first derivative at short end as well as the second derivative at long end of each segment equal zero.
More details at Web reference available
here
Fwd Flat
The reference quantity is interpolated according to the QuantLib ForwardFlat method.
The value at a node is extended flatly forward to the next node.
Linear
The reference quantity r is linearly interpolated in piecewise fashion according to the QuantLib Linear method.
Formally, given any two successive nodes (x₁,r₁) and (x₂,r₂) then the value r corresponding to some x lying between x₁ and x₂ is given by
r = w₁*r₁ + w₂*r₂
where the weights are given by
w₁ = (x₂-x)/(x₂-x₁)
and
w₂ = 1 - w₁
Log Cubic
The reference quantity is interpolated according to the QuantLib LogCubic method, whereby the
Interpolation::Interp Method::Cubic interpolation scheme is applied on the logarithm of the reference quantity.
Log Linear
The reference quantity r is interpolated according to the QuantLib LogLinear method, whereby its logarithm ln(r) is linearly interpolated, i.e. according to
Interpolation::Interp Method::Linear
Mxd Lin Cubic
The reference quantity is interpolated according to the QuantLib MixedLinearCubic method.
For a user-supplied number N, the first N nodes are linearly interpolated, whereas the remaining nodes are interpolated according to the cubic method.
Nat Cubic
This is equivalent to a monotonic
Interpolation::Interp Method::Cubic, whereby the derivatives are approximated according to Interpolation::Deriv Approx::Kruger and both second derivatives equal zero.
More details at Web reference available
here