corpbonds              package:termstrc              R Documentation

_C_o_r_p_o_r_a_t_e _B_o_n_d_s

_D_e_s_c_r_i_p_t_i_o_n:

     Corporate bonds

_U_s_a_g_e:

     data(corpbonds)

_D_e_t_a_i_l_s:

     The data set eurobonds consists of bonds of the rating classes AAA
     ,AA+, AA, AA-, A+, A, A-, BBB+, BBB, BBB-

_N_o_t_e:

     If you use your own dataset, 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 datasets the list element '$ACCRUED' includes the accrued
     interests.

_S_e_e _A_l_s_o:

     'eurobonds'

_E_x_a_m_p_l_e_s:

     data(corpbonds)
     str(corpbonds) 

     # You 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")

