tr_long_term_rate {treasury}R Documentation

Return the daily treasury long-term rates

Description

Return the daily treasury long-term rates

Usage

tr_long_term_rate(date = NULL)

Arguments

date

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

Value

A data.frame() with columns date, rate_type and rate or NULL when no entries were found.

References

https://home.treasury.gov/treasury-daily-interest-rate-xml-feed

See Also

Other treasury data: tr_bill_rates(), tr_real_long_term(), tr_real_yield_curve(), tr_yield_curve()

Examples


# get data for a single month
tr_long_term_rate("202201")
# or for the entire year
tr_long_term_rate(2022)


[Package treasury version 0.1.0 Index]