Fits parametric interpolation functions like NelsonSiegel or NelsonSiegelSvensson.

fit_interpolation(object, x, ...)

Arguments

object

a Interpolation object with initial parameters set.

x

a SpotRateCurve object.

...

additional arguments. Currently unused.

Value

A Interpolation object.

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")
fit_interpolation(interp_nelsonsiegel(0.1, 0.01, 0.01, 0.01), curve)
#> <Interpolation: nelsonsiegel > 
#>  Parameters:
#>   beta1   beta2   beta3 lambda1 
#>   0.145  -0.079   0.098   0.298