CreditRisk (version 0.1.0)

cds2: Calculate Credit Default Swap rates

Description

Calculate CDS rates starting from default intensities

Usage

cds2(t, T, tr, r, tint, int, R = 0.005, ...)

Arguments

t

premium timetable.

T

CDS maturities.

tr

interest rates timetable.

r

spot interest rates.

tint

intensity timetable.

int

default intensities timetable.

R

constant premium payment.

...

further arguments on cds.

Value

An object of class data.frame that contains the quantities calculated by cds on T timetable.

Details

The function cds2 is based on cds but allows a more fine controll on maturities and on discretization of r and int. In particular input (t, tr, tint) can be of different length thanks to the function approx.

References

David Lando (2004) Credit Risk Modeling.

Damiano Brigo, Massimo Morini, Andrea Pallavicini (2013) Counterparty Credit Risk, Collateral and Funding. With Pricing Cases for All Asset Classes

Examples

Run this code
# NOT RUN {
cds2( t=seq(0.5, 30, by=0.5), T =c(5,10,30),
tr = c(0.5, 1, 2, 3, 4, 5, 7, 10, 20, 30),
       r=c(-0.275, -0.244, -0.169, -0.082,  0.020,
       0.135,  0.389,  0.765,  1.366,  1.455), tint=c(1,2,5),
       int=c(.01,.005,.003), R=0.005, simplified=TRUE )

# }

Run the code above in your browser using DataCamp Workspace