Skip to contents

This par yield curve, which relates the par yield on a security to its time to maturity, is based on the closing market bid prices on the most recently auctioned Treasury securities in the over-the-counter market. The par yields are derived from input market prices, which are indicative quotations obtained by the Federal Reserve Bank of New York at approximately 3:30 PM each business day.

Usage

tr_yield_curve(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() containing the rates or NULL when no entries were found.

See also

Examples

# \donttest{
# get data for a single month
tr_yield_curve("202201")
#> # A tibble: 240 × 3
#>    date       maturity  rate
#>    <date>     <chr>    <dbl>
#>  1 2022-01-03 1 month   0.05
#>  2 2022-01-03 2 month   0.06
#>  3 2022-01-03 3 month   0.08
#>  4 2022-01-03 6 month   0.22
#>  5 2022-01-03 1 year    0.4 
#>  6 2022-01-03 2 year    0.78
#>  7 2022-01-03 3 year    1.04
#>  8 2022-01-03 5 year    1.37
#>  9 2022-01-03 7 year    1.55
#> 10 2022-01-03 10 year   1.63
#> # ℹ 230 more rows
# or for the entire year
tr_yield_curve(2022)
#> # A tibble: 3,038 × 3
#>    date       maturity  rate
#>    <date>     <chr>    <dbl>
#>  1 2022-01-03 1 month   0.05
#>  2 2022-01-03 2 month   0.06
#>  3 2022-01-03 3 month   0.08
#>  4 2022-01-03 6 month   0.22
#>  5 2022-01-03 1 year    0.4 
#>  6 2022-01-03 2 year    0.78
#>  7 2022-01-03 3 year    1.04
#>  8 2022-01-03 5 year    1.37
#>  9 2022-01-03 7 year    1.55
#> 10 2022-01-03 10 year   1.63
#> # ℹ 3,028 more rows
# }