aboutsummaryrefslogtreecommitdiffstats
path: root/R/tranches_RV_BC.R
diff options
context:
space:
mode:
Diffstat (limited to 'R/tranches_RV_BC.R')
-rw-r--r--R/tranches_RV_BC.R4
1 files changed, 2 insertions, 2 deletions
diff --git a/R/tranches_RV_BC.R b/R/tranches_RV_BC.R
index 8b008561..1419b9fe 100644
--- a/R/tranches_RV_BC.R
+++ b/R/tranches_RV_BC.R
@@ -19,7 +19,7 @@ option_list <- list(
help="Tenor of index1 [default %default]"),
make_option(c("-t2", "--tenor2"), default="5yr",
help="Tenor of index2 [default %default]"),
- make_option("--until", default=Sys.Date()-1,
+ make_option("--until", default=Sys.Date()-1, type="character"
help="last day to run [default %default]"))
args <- parse_args(OptionParser(option_list=option_list,
@@ -62,7 +62,7 @@ for(i in seq_along(runs$name1)){
if(begin.date > as.Date(args$until)){
next
}
- alldates <- seq(begin.date, as.Date(args$until), by="1 day")
+ alldates <- seq(begin.date, as.Date(as.character(args$until)), by="1 day")
if(index.name2=="ig19"){
alldates <- alldates[alldates!=as.Date("2013-11-29")] ##people are lazy the day after Thanksgiving
}