Bootstrap annual spot rates from annual coupon-bond yields
z_from_coupon_annual.RdBootstraps annual effective zero-coupon yields from par annual coupon-bearing bond yields of the same maturities.
Examples
maturity <- 1:4
coupon_yield <- c(0.02, 0.04, 0.06, 0.08)
z_from_coupon_annual(maturity, coupon_yield)
#> [1] 0.02000000 0.04040808 0.06169260 0.08447397