aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--R/build_portfolios.R3
-rw-r--r--R/build_scenarios.R7
2 files changed, 6 insertions, 4 deletions
diff --git a/R/build_portfolios.R b/R/build_portfolios.R
index f1299a7f..b4eb9997 100644
--- a/R/build_portfolios.R
+++ b/R/build_portfolios.R
@@ -29,7 +29,8 @@ calibration.date <- addBusDay(workdate, -1)
exportYC(calibration.date)
index <- creditIndex("hy29")
index <- set.index.desc(index, calibration.date)
-global.params <- yaml.load_file(file.path(code.dir, "etc", "params.yml"))
+global.params <- yaml.load_file(file.path(code.dir, "etc", "params.yml"),
+ handlers = list(expr = function(x) eval(parse(text = x))))
cusipdata <- cusip.data(workdate)
cashspread.discount <- 0
diff --git a/R/build_scenarios.R b/R/build_scenarios.R
index 7eb12a4d..05b02ba3 100644
--- a/R/build_scenarios.R
+++ b/R/build_scenarios.R
@@ -18,8 +18,8 @@ source("serenitasdb.R")
source("tranche_functions.R")
if(interactive()) {
- tradedate <- as.Date("2017-07-07")
- dealnames <- c("longf131")
+ tradedate <- as.Date("2018-04-05")
+ dealnames <- c("ares28")
reinvflags <- c(TRUE)
}else{
tradedate <- as.Date(args[1])
@@ -42,7 +42,8 @@ Ngrid <- 201
support <- seq(0, 1, length = Ngrid)
n.scenarios <- 100
recov.adj <- 1
-params <- yaml.load_file(file.path(code.dir, "etc", "params.yml"))
+params <- yaml.load_file(file.path(code.dir, "etc", "params.yml"),
+ handlers = list(expr = function(x) eval(parse(text = x))))
for(j in seq_along(dealnames)){
load(file.path(root.dir, "Scenarios", paste("Portfolios", tradedate, sep="_"),