corpbonds {termstrc} | R Documentation |
Corporate bonds
data(corpbonds)
The data set eurobonds consists of bonds of the rating classes AAA ,AA+, AA, AA-, A+, A, A-, BBB+, BBB, BBB-
If you use your own data set, make sure that the structure is identical to the provided data sets.
Use the function str()
to explore the data set.
Every element of the list except $RATING, $NAME
is required for the estimation. The elements
$COUPONRATE, $PRICE
are not necessarily required. The calculation of the accrued interest
is not implemented and has therefore be provided by the user. For the provided data sets the list element
$ACCRUED
includes the accrued interest.
data(corpbonds) str(corpbonds) # The following code may use this to generate an empty data set, # which can be filled with bond data: ISIN <- vector() MATURITYDATE <- vector() STARTDATE <- vector() COUPONRATE <- vector() PRICE <- vector() ACCRUED <- vector() CFISIN <- vector() CF <- vector() DATE <- vector() CASHFLOWS <- list(CFISIN,CF,DATE) names(CASHFLOWS) <- c("ISIN","CF","DATE") TODAY <- vector() mycountry1 <- list(ISIN,MATURITYDATE,STARTDATE, COUPONRATE,PRICE,ACCRUED,CASHFLOWS,TODAY) mycountry2 <- list(ISIN,MATURITYDATE,STARTDATE, COUPONRATE,PRICE,ACCRUED,CASHFLOWS,TODAY) names(mycountry1) <- c("ISIN","MATURITYDATE","STARTDATE","COUPONRATE", "PRICE","ACCRUED","CASHFLOWS","TODAY") names(mycountry2) <- c("ISIN","MATURITYDATE","STARTDATE","COUPONRATE", "PRICE","ACCRUED","CASHFLOWS","TODAY") mybonds <- list(mycountry1,mycountry2) names(mybonds) <- c("mycountry1","mycountry2")