| yc_interpolate | R Documentation |
Interpolate rates at arbitrary maturities from an observed or fitted yield curve.
yc_interpolate(curve, maturities, method = c("linear", "log_linear", "cubic"))
curve |
A |
maturities |
Numeric vector of maturities at which to interpolate. |
method |
Character. Interpolation method: |
A data frame with columns maturity and rate.
maturities <- c(1, 2, 5, 10, 30)
rates <- c(0.045, 0.043, 0.042, 0.040, 0.043)
curve <- yc_curve(maturities, rates)
yc_interpolate(curve, c(3, 7, 15, 20))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.