| yc_carry | R Documentation |
Decompose expected return from holding a bond into carry (yield income minus financing cost) and roll-down (capital gain from sliding down the curve).
yc_carry(curve, maturities = NULL, horizon = 1/12, funding_rate = NULL)
curve |
A |
maturities |
Numeric vector of bond maturities to analyse. If NULL, uses the curve's own maturities (excluding the shortest). |
horizon |
Numeric. Holding period in years. Default is |
funding_rate |
Optional numeric. Overnight funding rate as a decimal. If NULL, uses the shortest rate on the curve. |
A data frame with columns maturity, carry, rolldown, and
total.
maturities <- c(0.25, 1, 2, 5, 10, 30)
rates <- c(0.050, 0.048, 0.045, 0.042, 0.040, 0.043)
fit <- yc_nelson_siegel(maturities, rates)
yc_carry(fit)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.