diff options
Diffstat (limited to 'R/calibrate_tranches_BC.R')
| -rw-r--r-- | R/calibrate_tranches_BC.R | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/R/calibrate_tranches_BC.R b/R/calibrate_tranches_BC.R index 6b8414bb..e3c30cf8 100644 --- a/R/calibrate_tranches_BC.R +++ b/R/calibrate_tranches_BC.R @@ -75,6 +75,10 @@ for(i in seq_along(runs$name)){ ## calibrate the single names curves
index <- set.singlenamesdata(index, tradedate)
index <- set.tranchedata(index, tradedate)
+ if(is.null(index)){
+ loginfo(paste("skipping", index.name, tenor))
+ next
+ }
temp <- BCindex.pv(index)
index$EL <- -temp$pl
index$duration <- temp$cl-cdsAccrued(tradedate, 1)
|
