diff options
Diffstat (limited to 'R/load_cf.R')
| -rw-r--r-- | R/load_cf.R | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/R/load_cf.R b/R/load_cf.R index e37fdef0..715e2168 100644 --- a/R/load_cf.R +++ b/R/load_cf.R @@ -8,22 +8,17 @@ library(logging) basicConfig() args <- commandArgs(trailingOnly=TRUE) -root.dir <- if(.Platform$OS.type == "unix"){ - "/home/share/CorpCDOs" -}else{ - "//WDSENTINEL/share/CorpCDOs" -} - +stopifnot((root.dir <- Sys.getenv("BASE_DIR")) != "") tradedate <- if(length(args) >= 1) as.Date(args[1]) else Sys.Date() -source(file.path(root.dir, "code", "R", "yieldcurve.R")) -source(file.path(root.dir, "code", "R", "cds_utils.R")) -source(file.path(root.dir, "code", "R", "intex_deal_functions.R"), chdir=TRUE) -source(file.path(root.dir, "code", "R", "optimization.R")) -source(file.path(root.dir, "code", "R", "interpweights.R")) -source(file.path(root.dir, "code", "R", "serenitasdb.R")) -source(file.path(root.dir, "code", "R", "creditIndex.R")) -source(file.path(root.dir, "code", "R", "tranche_functions.R")) +source("yieldcurve.R") +source("cds_utils.R") +source("intex_deal_functions.R") +source("optimization.R") +source("interpweights.R") +source("serenitasdb.R") +source("creditIndex.R") +source("tranche_functions.R") index <- creditIndex("hy27") index <- set.index.desc(index, tradedate) |
