yc_predict: Predict Rates from a Fitted Yield Curve

View source: R/predict.R

yc_predictR Documentation

Predict Rates from a Fitted Yield Curve

Description

Evaluate a fitted yield curve at new maturities.

Usage

yc_predict(curve, maturities)

Arguments

curve

A yc_curve object from a fitting function.

maturities

Numeric vector of maturities at which to predict rates.

Value

A data frame with columns maturity and rate.

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_predict(fit, c(3, 7, 15, 20))

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