yc_carry: Carry and Roll-Down Analysis

View source: R/carry.R

yc_carryR Documentation

Carry and Roll-Down Analysis

Description

Decompose expected return from holding a bond into carry (yield income minus financing cost) and roll-down (capital gain from sliding down the curve).

Usage

yc_carry(curve, maturities = NULL, horizon = 1/12, funding_rate = NULL)

Arguments

curve

A yc_curve object.

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 1/12 (one month).

funding_rate

Optional numeric. Overnight funding rate as a decimal. If NULL, uses the shortest rate on the curve.

Value

A data frame with columns maturity, carry, rolldown, and total.

Examples

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)

yieldcurves documentation built on March 26, 2026, 5:06 p.m.