diff options
Diffstat (limited to 'R/build_scenarios.R')
| -rw-r--r-- | R/build_scenarios.R | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/R/build_scenarios.R b/R/build_scenarios.R index c484adde..21f2a401 100644 --- a/R/build_scenarios.R +++ b/R/build_scenarios.R @@ -10,17 +10,12 @@ if(hostname=="debian"){ args <- commandArgs(trailingOnly=TRUE) -if(Sys.getenv("DATA_DIR")=="") { - root.dir <- "/home/serenitas/CorpCDOs" -} else { - root.dir <- file.path(Sys.getenv("DATA_DIR"), "..") -} - -code.dir <- if(Sys.getenv("CODE_DIR")=="") file.path(root.dir, "code") else Sys.getenv("CODE_DIR") -source(file.path(code.dir, "R", "intex_deal_functions.R"), chdir=TRUE) -source(file.path(code.dir, "R", "yieldcurve.R")) -source(file.path(code.dir, "R", "serenitasdb.R"), chdir=TRUE) -source(file.path(code.dir, "R", "tranche_functions.R")) +stopifnot((root.dir <- Sys.getenv("BASE_DIR")) != "") +stopifnot((code.dir <- Sys.getenv("CODE_DIR")) != "") +source("intex_deal_functions.R") +source("yieldcurve.R") +source("serenitasdb.R") +source("tranche_functions.R") if(interactive()) { tradedate <- as.Date("2016-02-25") |
