There are two key interpolation schemes available in the stats
package:
constant and linear interpolation via stats::approxfun()
and
spline interpolation via stats::splinefun()
. The interpolate()
method
is a simple wrapper around these methods that are useful for the purposes
of interpolation financial market objects like zero coupon interest rate
curves.
# S3 method for ZeroCurve interpolate(x, at, ...)
x | a |
---|---|
at | a non-negative numeric vector representing the years at which to interpolate the zero curve |
... | unused in this method |
a numeric vector of zero rates (continuously compounded, act/365)
Other interpolate functions: interpolate.VolSurface
,
interpolate_dfs
,
interpolate_zeros
,
interpolate
#> [1] 0.01853957 0.01949990