| yc_par_to_zero | R Documentation |
Bootstrap zero (spot) rates from par (coupon) rates using iterative stripping.
yc_par_to_zero(maturities, par_rates, frequency = 1)
maturities |
Numeric vector of maturities in years (must be positive integers or half-years). |
par_rates |
Numeric vector of par rates as decimals. |
frequency |
Integer. Coupon frequency per year: 1 for annual (default) or 2 for semi-annual. |
A data frame with columns maturity and zero_rate.
maturities <- c(1, 2, 3, 5, 10)
par_rates <- c(0.040, 0.042, 0.043, 0.044, 0.045)
yc_par_to_zero(maturities, par_rates)
# Semi-annual coupons
yc_par_to_zero(c(0.5, 1, 2), c(0.04, 0.042, 0.043), frequency = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.