interpolation-constructor: Create Interpolation objects

interpolation-constructorR Documentation

Create Interpolation objects

Description

Functions to create intepolation objects.

Usage

interp_flatforward()

interp_linear()

interp_loglinear()

interp_naturalspline()

interp_hermitespline()

interp_monotonespline()

interp_nelsonsiegel(beta1, beta2, beta3, lambda1)

interp_nelsonsiegelsvensson(beta1, beta2, beta3, beta4, lambda1, lambda2)

Arguments

beta1

a single numeric

beta2

a single numeric

beta3

a single numeric

lambda1

a single numeric

beta4

a single numeric

lambda2

a single numeric

Details

interp_flatforward creates a FlatForward interpolation object.

interp_linear creates a Linear interpolation object.

interp_loglinear creates a LogLinear interpolation object.

interp_naturalspline creates a NaturalSpline interpolation object.

interp_hermitespline creates a HermiteSpline interpolation object.

interp_monotonespline creates a MonotoneSpline interpolation object.

interp_nelsonsiegel creates a NelsonSiegel interpolation object. The arguments beta1, beta2, beta3, lambda1 are the paremeters of the Nelson-Siegel model for term structure.

interp_nelsonsiegelsvensson creates a NelsonSiegelSvensson interpolation object. The arguments beta1, beta2, beta3, beta4, lambda1, lambda2 are the paremeters of Svensson's extension to Nelson-Siegel the model for term structure.

Value

An Interpolation object. That object knows the interpolation method but doesn't have the data points. When the Interpolation is set to the curve with ⁠interpolation<-⁠ the interpolation engine is properly configured.

References

Charles R. Nelson and Andrew F. Siegel (1987), The Journal of Business

Lars E.O. Svensson (1994), National Bureau of Economic Research

Examples

terms <- c(1, 11, 26, 27, 28)
rates <- c(0.0719, 0.056, 0.0674, 0.0687, 0.07)

curve <- spotratecurve(rates, terms, "discrete", "actual/365", "actual")

interpolation(curve) <- interp_flatforward()

curve[[1:10]]

fixedincome documentation built on July 9, 2023, 7:28 p.m.