add.dates: Return CDS dates.

Description Usage Arguments Value References Examples

Description

add.dates takes a data frame which contains dates, tenor (or maturity) and currency and returns appropriate dates for pricing a CDS contract.

Usage

1
2
add.dates(x, date.var = "date", maturity.var = "maturity",
  tenor.var = "tenor", currency.var = "currency")

Arguments

x

a data frame, containing all necessary information

date.var

character, column name of date variable

maturity.var

character, column name of maturity variable

tenor.var

character, column name of tenor variable

currency.var

character, column name of currency variable

Value

a date frame containing all the input columns, as well as eight more columns: stepinDate (T+1), valueDate (T+3 business days), startDate (accrual begin date), endDate (maturity), backstopDate (T-60 day look back from which 'protection' is effective), firstcouponDate (the date on which the first coupon is paid), pencouponDate (second to last coupon date), and baseDate (the starting date for the IR curve)

References

http://www.cdsmodel.com/cdsmodel/assets/cds-model/docs/c-code%20Key%20Functions-v1.pdf http://www.cdsmodel.com/assets/cds-model/docs/Standard%20CDS%20Examples.pdf

Examples

1
2
3
x <- data.frame(date = c(as.Date("2014-05-06"), as.Date("2014-05-07")),
                tenor = rep(5, 2), currency = c("JPY", "USD"))
add.dates(x)

Yuanchu/creditr documentation built on May 10, 2019, 1:11 a.m.