Functions to create intepolation objects.

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

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.

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.

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]]
#>         SpotRateCurve
#> 1 day         0.07190
#> 2 days        0.06313
#> 3 days        0.06022
#> 4 days        0.05877
#> 5 days        0.05790
#> 6 days        0.05732
#> 7 days        0.05690
#> 8 days        0.05659
#> 9 days        0.05635
#> 10 days       0.05616
#> discrete actual/365 actual 
#> Reference date: 2023-06-27