diff options
Diffstat (limited to 'R')
| -rw-r--r-- | R/calibrate_tranches_BC.R | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/R/calibrate_tranches_BC.R b/R/calibrate_tranches_BC.R index e5ca61e3..b090a679 100644 --- a/R/calibrate_tranches_BC.R +++ b/R/calibrate_tranches_BC.R @@ -14,7 +14,7 @@ if(!interactive()){ help="Runs the list of indices provided in CONFIG_FILE"), make_option(c("-i", "--index"), help="Index name we want to run"), make_option("--tenor", default="5yr", help="Tenor we want to run [default %default]"), - make_option("--until", default=Sys.Date()-1, type="character", + make_option("--until", default=Sys.Date()-1, type="integer", help="last date to run [default %default]")) args <- parse_args(OptionParser(option_list=option_list)) ## default values @@ -35,6 +35,7 @@ if(!interactive()){ options(error=recover) } +class(args$until) <- "Date" options(stringsAsFactors = FALSE) source(file.path(code.dir, "R", "yieldcurve.R")) source(file.path(code.dir, "R", "optimization.R")) |
