Learn R Programming

qrmdata (version 2022-05-31-1)

interest_rates: Interest-Rate Data

Description

Zero-coupon bond yield curves in CAD and USD.

Usage

data("ZCB_CAD")
data("ZCB_USD")

Arguments

Format

ZCB_CAD:

xts object containing, in each row, zero-coupon bond yield curves in percent for 120 times to maturity (ranging from 0.25 to 30 years); only trading days from 1991-01-02 to 2015-08-31 with available values for all maturities are included.

ZCB_USD:

xts object containing, in each row, zero-coupon bond yield curves in percent for 30 times to maturity (ranging from 1 to 30 years); only trading days from 1985-11-25 to 2015-12-29 with available values for all maturities are included.

Author

Marius Hofert

Examples

Run this code
data("ZCB_CAD")
data("ZCB_USD")
mat <- as.matrix(ZCB_USD['2015-01-01/2015-12-31',])
df <- data.frame(Day = rep(1:nrow(mat), each = ncol(mat)),
                 Maturity = rep(1:ncol(mat), nrow(mat)),
                 Value = as.vector(t(mat)))
lattice::wireframe(Value ~ Day * Maturity, data = df,
                   alpha.regions = 0.5,
                   scales = list(arrows = FALSE, col = "black"),
                   par.settings = list(axis.line = list(col = "transparent")))

Run the code above in your browser using DataLab