Skip to content
Prev 174357 / 398506 Next

How to use termstrc functions?

Besides needing a grouped structure and not calling that function with  
a group name, your sub-structure does not seem complete when compared  
with the AAA group within the example dataset;

 > str(allbonds)  # your structure
List of 1
  $ mybonds:List of 7
   ..$ ISIN        : chr [1:2] "IN0020080019" "IN0020020163"
   ..$ MATURITYDATE:Class 'Date'  num [1:2] 14244 14974
   ..$ STARTDATE   :Class 'Date'  num [1:2] 11323 11688
   ..$ COUPONRATE  : num [1:2] 8.24 7.95
   ..$ PRICE       : num [1:2] 50 100
   ..$ ACCRUED     : num [1:2] 5 2
   ..$ TODAY       :Class 'Date'  num [1:2] 14323 14323

 > str(corpbonds$AAA)
List of 10
  $ ISIN        : chr [1:20] "XS0078921441" "XS0079017637"  
"XS0090078907" "XS0119246626" ...
  $ MATURITYDATE:Class 'Date'  num [1:20] 14476 15212 16680 15631  
14203 ...
  $ STARTDATE   :Class 'Date'  num [1:20] 10093 10099 10471 11248  
11281 ...
  $ COUPONRATE  : num [1:20] 0.0563 0.0575 0.0512 0.0587 0.0575 ...
  $ RATING      : Factor w/ 10 levels "A","A-","A+",..: 7 7 7 7 7 7 7  
7 7 7 ...
  $ NAME        : Factor w/ 249 levels "4.88 BP CAPITAL MARKETS PLC 31- 
MAR-09",..: 109 109 109 109 109 109 229 153 109 149 ...
  $ PRICE       : num [1:20] 108 113 112 115 108 ...
  $ ACCRUED     : num [1:20] 1.328 1.262 1.039 0.451 5.671 ...
  $ CASHFLOWS   :List of 3
   ..$ ISIN: chr [1:126] "XS0078921441" "XS0078921441" "XS0078921441"  
"XS0078921441" ...
   ..$ CF  : num [1:126] 5.61 5.61 5.62 105.62 5.78 ...
   ..$ DATE:Class 'Date'  num [1:126] 13381 13745 14111 14476 13388 ...
  $ TODAY       :Class 'Date'  num 13102
On Mar 20, 2009, at 12:05 PM, David Winsemius wrote:

            
David Winsemius, MD
Heritage Laboratories
West Hartford, CT