Title: | Client for US Treasury XML Feed and Published Data |
---|---|
Description: | Download daily interest rates from the US Treasury XML feed. Leveraging <https://home.treasury.gov/treasury-daily-interest-rate-xml-feed>, this package serves as a wrapper, facilitating the retrieval of daily treasury rates across various categories, including par yield curves, treasury bills, long-term rates, and real yield curves. |
Authors: | Maximilian Mücke [aut, cre] |
Maintainer: | Maximilian Mücke <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.2.0.9000 |
Built: | 2024-11-11 08:20:52 UTC |
Source: | https://github.com/m-muecke/treasury |
These rates are the daily secondary market quotations on the most recently auctioned Treasury Bills for each maturity tranche (4-week, 8-week, 13-week, 17-week, 26-week, and 52-week) for which Treasury currently issues new bills.
tr_bill_rates(date = NULL)
tr_bill_rates(date = NULL)
date |
|
Market quotations are obtained at approximately 3:30 PM each business day by the Federal Reserve Bank of New York. The Bank Discount rate is the rate at which a bill is quoted in the secondary market and is based on the par value, amount of the discount and a 360-day year. The Coupon Equivalent, also called the Bond Equivalent, or the Investment Yield, is the bill's yield based on the purchase price, discount, and a 365- or 366-day year. The Coupon Equivalent can be used to compare the yield on a discount bill to the yield on a nominal coupon security that pays semiannual interest with the same maturity date.
A data.frame()
containing the rates or NULL
when no entries were found.
https://home.treasury.gov/treasury-daily-interest-rate-xml-feed
Other interest rate:
tr_long_term_rate()
,
tr_real_long_term()
,
tr_real_yield_curve()
,
tr_yield_curve()
# get data for a single month tr_bill_rates("202201") # or for the entire year tr_bill_rates(2022)
# get data for a single month tr_bill_rates("202201") # or for the entire year tr_bill_rates(2022)
The Yield Curve for Treasury Nominal Coupon Issues (TNC yield curve) is derived from Treasury nominal notes and bonds. The Yield Curve for Treasury Real Coupon Issues (TRC yield curve) is derived from Treasury Inflation-Protected Securities (TIPS). The Treasury Breakeven Inflation Curve (TBI curve) is derived from the TNC and TRC yield curves combined.
tr_curve_rate( x = c("hqm", "tnc", "trc", "tbi"), type = c("monthly", "end-of-month"), year = NULL ) tr_par_yields(x = c("hqm", "tnc", "trc"), type = c("monthly", "end-of-month")) tr_forward_rate( x = c("tnc", "trc", "tbi"), type = c("monthly", "end-of-month") )
tr_curve_rate( x = c("hqm", "tnc", "trc", "tbi"), type = c("monthly", "end-of-month"), year = NULL ) tr_par_yields(x = c("hqm", "tnc", "trc"), type = c("monthly", "end-of-month")) tr_forward_rate( x = c("tnc", "trc", "tbi"), type = c("monthly", "end-of-month") )
x |
|
type |
|
year |
|
A data.frame()
containing the treasury rates.
https://home.treasury.gov/data/treasury-coupon-issues-and-corporate-bond-yield-curves
## Not run: # TBI Treasury Curve Breakeven Rates tr_curve_rate("tbi") tr_curve_rate("trc", "end-of-month", 2024L) # TRC Treasury Yield Curve Par Yields, Monthly Average tr_par_yields("trc") # TNC Treasury Yield Curve Forward Rates, End of Month tr_forward_rate("tnc", "end-of-month") ## End(Not run)
## Not run: # TBI Treasury Curve Breakeven Rates tr_curve_rate("tbi") tr_curve_rate("trc", "end-of-month", 2024L) # TRC Treasury Yield Curve Par Yields, Monthly Average tr_par_yields("trc") # TNC Treasury Yield Curve Forward Rates, End of Month tr_forward_rate("tnc", "end-of-month") ## End(Not run)
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.
tr_long_term_rate(date = NULL)
tr_long_term_rate(date = NULL)
date |
|
A data.frame()
containing the rates or NULL
when no entries were found.
https://home.treasury.gov/treasury-daily-interest-rate-xml-feed
Other interest rate:
tr_bill_rates()
,
tr_real_long_term()
,
tr_real_yield_curve()
,
tr_yield_curve()
# get data for a single month tr_long_term_rate("202201") # or for the entire year tr_long_term_rate(2022)
# get data for a single month tr_long_term_rate("202201") # or for the entire year tr_long_term_rate(2022)
The Long-Term Real Rate Average is the unweighted average of bid real yields on all outstanding TIPS with remaining maturities of more than 10 years and is intended as a proxy for long-term real rates.
tr_real_long_term(date = NULL)
tr_real_long_term(date = NULL)
date |
|
A data.frame()
containing the rates or NULL
when no entries were found.
https://home.treasury.gov/treasury-daily-interest-rate-xml-feed
Other interest rate:
tr_bill_rates()
,
tr_long_term_rate()
,
tr_real_yield_curve()
,
tr_yield_curve()
# get data for a single month tr_real_long_term("202201") # or for the entire year tr_real_long_term(2022)
# get data for a single month tr_real_long_term("202201") # or for the entire year tr_real_long_term(2022)
The par real curve, which relates the par real yield on a Treasury Inflation Protected Security (TIPS) to its time to maturity, is based on the closing market bid prices on the most recently auctioned TIPS in the over-the-counter market. The par real 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. Treasury began publishing this series on January 2, 2004. At that time Treasury released 1 year of historical data.
tr_real_yield_curve(date = NULL)
tr_real_yield_curve(date = NULL)
date |
|
A data.frame()
containing the rates or NULL
when no entries were found.
https://home.treasury.gov/treasury-daily-interest-rate-xml-feed
Other interest rate:
tr_bill_rates()
,
tr_long_term_rate()
,
tr_real_long_term()
,
tr_yield_curve()
# get data for a single month tr_real_yield_curve("202201") # or for the entire year tr_real_yield_curve(2022)
# get data for a single month tr_real_yield_curve("202201") # or for the entire year tr_real_yield_curve(2022)
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.
tr_yield_curve(date = NULL)
tr_yield_curve(date = NULL)
date |
|
A data.frame()
containing the rates or NULL
when no entries were found.
https://home.treasury.gov/treasury-daily-interest-rate-xml-feed
Other interest rate:
tr_bill_rates()
,
tr_long_term_rate()
,
tr_real_long_term()
,
tr_real_yield_curve()
# get data for a single month tr_yield_curve("202201") # or for the entire year tr_yield_curve(2022)
# get data for a single month tr_yield_curve("202201") # or for the entire year tr_yield_curve(2022)