Learn R Programming

treasury (version 0.4.0)

tr_long_term_rate: Daily treasury long-term rates

Description

Treasury ceased publication of the 30-year constant maturity series on February 18, 2002 and resumed that series on February 9, 2006. To estimate a 30-year rate during that time frame, this series includes the Treasury 20-year Constant Maturity rate and an "adjustment factor," which may be added to the 20-year rate to estimate a 30-year rate during the period of time in which Treasury did not issue the 30-year bonds.

Usage

tr_long_term_rate(date = NULL)

Value

A data.table::data.table() containing the rates or NULL when no entries were found.

Arguments

date

(NULL | character(1) | numeric(1))
Date in format yyyy or yyyymm. If NULL, all data is returned. Default NULL.

See Also

Other interest rate: tr_bill_rate(), tr_real_long_term(), tr_real_yield_curve(), tr_yield_curve()

Examples

Run this code
# \donttest{
# get data for a single month
tr_long_term_rate("202212")
# or for the entire year
tr_long_term_rate(2022)
# }

Run the code above in your browser using DataLab