aboutsummaryrefslogtreecommitdiffstats
path: root/R
diff options
context:
space:
mode:
Diffstat (limited to 'R')
-rw-r--r--R/calibrate_tranches_BC.R2
1 files changed, 1 insertions, 1 deletions
diff --git a/R/calibrate_tranches_BC.R b/R/calibrate_tranches_BC.R
index 9cda638e..ac0d5fa7 100644
--- a/R/calibrate_tranches_BC.R
+++ b/R/calibrate_tranches_BC.R
@@ -44,7 +44,7 @@ for(i in seq_along(runs$name)){
tenor <- runs$tenor[i]
filename <- file.path(root.dir,"Tranche_data","Runs",
paste(index.name,tenor,"csv",sep="."))
- if(args$update){##ghetto way of getting the last row of the file
+ if(args$update && file.exists(filename)){##ghetto way of getting the last row of the file
runfile <- read.csv(filename)
begin.date <- as.Date(runfile[nrow(runfile),1])+1
}else{