prepare_interpolation | R Documentation |
Creates the interpolation function to a SpotRateCurve object.
prepare_interpolation(object, x, ...)
object |
a Interpolation object. |
x |
a SpotRateCurve object. |
... |
additional arguments. Currently unused. This method is used internally when the interpolation is set to a curve.
It uses the current state of the curve to build the interpolation function.
This is similar to call This method shouldn't be directly called, it is for internal use only. |
A Interpolation
object with the slot func
properly defined.
This slot is set with a function
(closure) that executes
the interpolation method.
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")
prepare_interpolation(interp_flatforward(), curve)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.