Thanks to visit codestin.com
Credit goes to github.com

Skip to content
/ treasury Public

❗ This is a read-only mirror of the CRAN R package repository. treasury — Client for US Treasury XML Feed and Published Data. Homepage: https://m-muecke.github.io/treasury/https://github.com/m-muecke/treasury Report bugs for this package: https://github.com/m-muecke/treasury/issues

License

Notifications You must be signed in to change notification settings

cran/treasury

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

treasury

Lifecycle: experimental R-CMD-check CRAN status R-universe version

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)
head(yield_curve)
#>          date maturity  rate
#>        <Date>   <char> <num>
#> 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.70
#> 5: 2023-01-03  6 month  4.77
#> 6: 2023-01-03   1 year  4.72

Related work

  • ustyc - R package to download and parse the US Treasury yield curve data
  • ustfd - R client for US Treasury Fiscal Data API

About

❗ This is a read-only mirror of the CRAN R package repository. treasury — Client for US Treasury XML Feed and Published Data. Homepage: https://m-muecke.github.io/treasury/https://github.com/m-muecke/treasury Report bugs for this package: https://github.com/m-muecke/treasury/issues

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages