Learn R Programming

creditr (version 0.6.1)

get_rates: Get interest rates from rates.RData or the Markit website

Description

get_rates returns the deposits and swap rates for the day input, along with the date conventions for that specific currency. The day input should be a weekday. If not, go to the most recent previous weekday.

Usage

get_rates(date, currency)

Arguments

date
Trade date. The rates for a trade date T are published on T-1 weekday. This date refers to the day on which we want the CDS to be priced, not the date for the interest rates as the interest rates will be used is the day before the trade date. Eg. If we are trying to find the rates used to price a CDS on 2014-04-22, it will return the rates of 2014-04-21
currency
the three-letter currency code. As of now, it works for USD, EUR, and JPY. The default is USD.

Value

a data frame that contains date (the CDS pricing date),

Examples

Run this code
## Not run: 
# get_rates(as.Date("2014-05-07"), currency = "USD")
# ## End(Not run)

Run the code above in your browser using DataLab