build_rates
can create a data frame of interest rates from a start
date to an end date, which are specified by the user. The interest rates will
be later used in CDS pricing. build_rates
also builds the rates.RData
in the package. build_rates
mainly consists download_markit
and
download_FRED
. The two sources are Markit website and FRED website.
build_rates(start.date, end.date)
Another note is that, the rates on both Markit website and FRED website have not been adjusted to the previous business day. In other words, the rates from both website is the exact rate on that day, rather than on the previous business day. But download_markit and download_FRED have adjusted the days already for the convenience of CDS pricing, so we don't have to worry here.
## Not run:
# ## Running this example will take more than two hours.
#
# build_rates(start.date = as.Date("2004-01-01"),
# end.date = as.Date("2014-08-23"))## End(Not run)
Run the code above in your browser using DataLab