Description Usage Arguments Value See Also Examples
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 credit curves.
1 2 | ## S3 method for class 'CreditCurve'
interpolate(x, at, ...)
|
x |
a |
at |
a non-negative numeric vector representing the years at which to interpolate the Credit curve |
... |
unused in this method |
a numeric vector of zero rates (continuously compounded, act/365)
Other interpolate functions: interpolate.VolSurface
,
interpolate.ZeroCurve
,
interpolate_dfs.CreditCurve
,
interpolate_zeros.CreditCurve
,
interpolate
1 2 | zc <- build_zero_curve(LogDFInterpolation())
interpolate(zc, c(1.5, 3))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.