diff options
Diffstat (limited to 'R/calibrate_tranches_BC.R')
| -rw-r--r-- | R/calibrate_tranches_BC.R | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/R/calibrate_tranches_BC.R b/R/calibrate_tranches_BC.R index 8687a1f9..6e8bf8ab 100644 --- a/R/calibrate_tranches_BC.R +++ b/R/calibrate_tranches_BC.R @@ -98,8 +98,9 @@ for(run in config$runs){ index <- set.index.desc(index, tradedate)
## calibrate the single names curves
index <- set.singlenamesdata(index, tradedate)
- index <- set.tranchedata(index, tradedate)
- if(is.null(index)){
+ index <- tryCatch(set.tranchedata(index, tradedate),
+ error=function(e) logerror(conditionMessage(e)))
+ if(inherits(index, "error")) {
loginfo(paste("skipping", index.name, tenor))
next
}
|
