Description Usage Value data.frame format Starting Dates Author(s) References Examples
View source: R/download_rates.R
For the dates 1962-01-02 to 2015-12-31 the data is retrieved from a static file that was previously created from the data downloaded; the data for 2016-01-01 to present are pulled from an XML feed from the US Treasury accessed in real time.
1 | CMTrates()
|
data.frame
containing daily rates from 1962 to the
most-recently completed business day. The class has c("ustreasuries", "CMT")
appended so that the data.frame can be identified by other functions.
The data.frame returned contains one row for every day, sorted in descending order by date. The columns are "Id", "NEW_DATE", "BC_1MONTH", "BC_3MONTH", "BC_6MONTH", "BC_1YEAR", "BC_2YEAR", "BC_3YEAR", "BC_5YEAR", "BC_7YEAR", "BC_10YEAR", "BC_20YEAR", "BC_30YEAR", "BC_30YEARDISPLAY".
"Id" is NA
for the historical data; for the current data it is an
integer returned in the XML feed. "NEW_DATE" is formatted as
as.Date("1962-01-02")
. All the other columns are numeric in
"percentage" format: 7.12 means 7.12% or 0.0712.
Yields are missing for certain maturities on various dates: for example, in the 1990's, as a result of a budget surplus, certain bonds were retired.
The size of the data.frame
downloaded on 2016-01-25 was 1,514,504
bytes.
Different maturities have different starting dates:
M01 2001-07-31
M03 1982-01-04
M06 1982-01-04
Y01 1962-01-02
Y02 1976-06-01
Y03 1962-01-02
Y05 1962-01-02
Y07 1969-07-01
Y10 1962-01-02
Y20 1993-10-01
Y30 1977-02-15
George Fisher GeorgeRFisher@gmail.com
Static Data
http://www.federalreserve.gov/datadownload/Choose.aspx?rel=H15
XML Data
http://data.treasury.gov/feed.svc/DailyTreasuryYieldCurveRateData
1 2 3 4 5 6 7 8 9 10 11 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.