The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.

treasury

Lifecycle: experimental R-CMD-check CRAN status

Overview

The goal of treasury is to provide a simple and modern interface to the US treasury XML feed for daily interest rates.

Installation

You can install the released version of treasury from CRAN with:

install.packages("treasury")

And the development version from GitHub with:

# install.packages("pak")
pak::pak("m-muecke/treasury")

Usage

treasury functions are prefixed with tr_ and follow the naming convention of the XML feed.

library(treasury)

yield_curve <- tr_yield_curve(2023)
yield_curve
#> # A tibble: 3,250 × 3
#>   date       maturity  rate
#>   <date>     <chr>    <dbl>
#> 1 2023-01-03 1 month   4.17
#> 2 2023-01-03 2 month   4.42
#> 3 2023-01-03 3 month   4.53
#> 4 2023-01-03 4 month   4.7 
#> 5 2023-01-03 6 month   4.77
#> # ℹ 3,245 more rows

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.