aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--R/calibrate_tranches_BC.R6
1 files changed, 3 insertions, 3 deletions
diff --git a/R/calibrate_tranches_BC.R b/R/calibrate_tranches_BC.R
index a622e9ea..a2db8f56 100644
--- a/R/calibrate_tranches_BC.R
+++ b/R/calibrate_tranches_BC.R
@@ -34,7 +34,7 @@ if(!interactive()){
## until = Sys.Date()-1,
## update = TRUE)
args <- list(update=TRUE, until = Sys.Date()-1)
- config <- list(runs=list(c("hy25", "5yr")))
+ config <- list(runs=list(c("hy21", "3yr")))
options(error=recover)
}
@@ -99,8 +99,8 @@ for(run in config$runs){
## calibrate the single names curves
index <- set.singlenamesdata(index, tradedate)
index <- tryCatch(set.tranchedata(index, tradedate),
- error=function(e) logerror(conditionMessage(e)))
- if(inherits(index, "error")) {
+ error = function(e) logerror(e$message))
+ if(is.null(index)) {
loginfo(paste("skipping", index.name, tenor))
next
}