Skip to contents

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)

Arguments

date

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

Value

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

See also

Examples

# \donttest{
# get data for a single month
tr_long_term_rate("202201")
#>           date     rate_type  rate
#>         <Date>        <char> <num>
#>  1: 2022-01-03       20 year  2.05
#>  2: 2022-01-03 over 10 years  2.00
#>  3: 2022-01-03     real rate -0.43
#>  4: 2022-01-04       20 year  2.10
#>  5: 2022-01-04 over 10 years  2.06
#>  6: 2022-01-04     real rate -0.35
#>  7: 2022-01-05       20 year  2.12
#>  8: 2022-01-05 over 10 years  2.08
#>  9: 2022-01-05     real rate -0.27
#> 10: 2022-01-06       20 year  2.12
#> 11: 2022-01-06 over 10 years  2.08
#> 12: 2022-01-06     real rate -0.21
#> 13: 2022-01-07       20 year  2.15
#> 14: 2022-01-07 over 10 years  2.11
#> 15: 2022-01-07     real rate -0.22
#> 16: 2022-01-10       20 year  2.15
#> 17: 2022-01-10 over 10 years  2.11
#> 18: 2022-01-10     real rate -0.21
#> 19: 2022-01-11       20 year  2.13
#> 20: 2022-01-11 over 10 years  2.08
#> 21: 2022-01-11     real rate -0.29
#> 22: 2022-01-12       20 year  2.13
#> 23: 2022-01-12 over 10 years  2.09
#> 24: 2022-01-12     real rate -0.23
#> 25: 2022-01-13       20 year  2.10
#> 26: 2022-01-13 over 10 years  2.05
#> 27: 2022-01-13     real rate -0.23
#> 28: 2022-01-14       20 year  2.18
#> 29: 2022-01-14 over 10 years  2.13
#> 30: 2022-01-14     real rate -0.16
#> 31: 2022-01-18       20 year  2.24
#> 32: 2022-01-18 over 10 years  2.19
#> 33: 2022-01-18     real rate -0.12
#> 34: 2022-01-19       20 year  2.20
#> 35: 2022-01-19 over 10 years  2.16
#> 36: 2022-01-19     real rate -0.11
#> 37: 2022-01-20       20 year  2.19
#> 38: 2022-01-20 over 10 years  2.15
#> 39: 2022-01-20     real rate -0.10
#> 40: 2022-01-21       20 year  2.13
#> 41: 2022-01-21 over 10 years  2.08
#> 42: 2022-01-21     real rate -0.18
#> 43: 2022-01-24       20 year  2.15
#> 44: 2022-01-24 over 10 years  2.11
#> 45: 2022-01-24     real rate -0.19
#> 46: 2022-01-25       20 year  2.18
#> 47: 2022-01-25 over 10 years  2.13
#> 48: 2022-01-25     real rate -0.16
#> 49: 2022-01-26       20 year  2.22
#> 50: 2022-01-26 over 10 years  2.18
#> 51: 2022-01-26     real rate -0.10
#> 52: 2022-01-27       20 year  2.17
#> 53: 2022-01-27 over 10 years  2.11
#> 54: 2022-01-27     real rate -0.17
#> 55: 2022-01-28       20 year  2.14
#> 56: 2022-01-28 over 10 years  2.09
#> 57: 2022-01-28     real rate -0.21
#> 58: 2022-01-31       20 year  2.17
#> 59: 2022-01-31 over 10 years  2.12
#> 60: 2022-01-31     real rate -0.19
#>           date     rate_type  rate
# or for the entire year
tr_long_term_rate(2022)
#>            date     rate_type  rate
#>          <Date>        <char> <num>
#>   1: 2022-01-03       20 year  2.05
#>   2: 2022-01-03 over 10 years  2.00
#>   3: 2022-01-03     real rate -0.43
#>   4: 2022-01-04       20 year  2.10
#>   5: 2022-01-04 over 10 years  2.06
#>  ---                               
#> 743: 2022-12-29 over 10 years  4.06
#> 744: 2022-12-29     real rate  1.74
#> 745: 2022-12-30       20 year  4.14
#> 746: 2022-12-30 over 10 years  4.11
#> 747: 2022-12-30     real rate  1.78
# }