Compute forward rates from a yield curve. Can compute either instantaneous forward rates or forward-forward rates between two tenors.
Examples
maturities <- c(0.25, 0.5, 1, 2, 5, 10, 30)
rates <- c(0.052, 0.050, 0.048, 0.045, 0.042, 0.040, 0.043)
fit <- yc_nelson_siegel(maturities, rates)
yc_forward(fit)
#> maturity forward_rate
#> 1 0.25 0.05025837
#> 2 0.50 0.04806223
#> 3 1.00 0.04457581
#> 4 2.00 0.04033815
#> 5 5.00 0.03829762
#> 6 10.00 0.04182315
#> 7 30.00 0.04443227
yc_forward(fit, maturities = c(1, 5, 10), horizon = 1)
#> maturity forward_rate
#> 1 1 0.04220179
#> 2 5 0.03859638
#> 3 10 0.04209786