diff options
Diffstat (limited to 'R/script_calibrate_tranches.R')
| -rw-r--r-- | R/script_calibrate_tranches.R | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/R/script_calibrate_tranches.R b/R/script_calibrate_tranches.R index fdb0fa65..8aa8e196 100644 --- a/R/script_calibrate_tranches.R +++ b/R/script_calibrate_tranches.R @@ -11,12 +11,11 @@ if(.Platform$OS.type == "unix"){ root.dir <- "//WDSENTINEL/share/CorpCDOs"
}
-source(file.path(root.dir, "code", "R", "cds_utils.R"))
-source(file.path(root.dir, "code", "R", "cds_functions_generic.R"))
-source(file.path(root.dir, "code", "R", "yieldcurve.R"))
-source(file.path(root.dir, "code", "R", "optimization.R"))
-source(file.path(root.dir, "code", "R", "calibration.R"))
-source(file.path(root.dir, "code", "R", "mlpdb.R"))
+code.dir <- Sys.getenv("CODE_DIR")
+source(file.path(code.dir, "code", "R", "yieldcurve.R"))
+source(file.path(code.dir, "code", "R", "optimization.R"))
+source(file.path(code.dir, "code", "R", "calibration.R"), chdir=TRUE)
+source(file.path(code.dir, "code", "R", "mlpdb.R"))
##figure out the tradedate
if(length(args) >= 1){
|
