interest_rates: Interest-Rate Data

Description Usage Format Author(s) Source Examples

Description

Zero-coupon bond yield curves in CAD and USD.

Usage

1
2
data("ZCB_CAD")
data("ZCB_USD")

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(s)

Marius Hofert

Source

ZCB_CAD was created from data obtained from http://www.bankofcanada.ca/rates/interest-rates/bond-yield-curves/ multiplied by 100. ZCB_USD was obtained from https://www.quandl.com/data/FED/SVENY-US-Treasury-Zero-Coupon-Yield-Curve via Quandl. Both data sets were drawn on 2016-01-03 (ZCB_USD via the function get_data() from qrmtools).

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
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")))

Example output



qrmdata documentation built on Jan. 11, 2020, 9:27 a.m.