aboutsummaryrefslogtreecommitdiffstats
path: root/R/load_cf.R
diff options
context:
space:
mode:
Diffstat (limited to 'R/load_cf.R')
-rw-r--r--R/load_cf.R10
1 files changed, 5 insertions, 5 deletions
diff --git a/R/load_cf.R b/R/load_cf.R
index 7f060f1f..bdcf29da 100644
--- a/R/load_cf.R
+++ b/R/load_cf.R
@@ -211,9 +211,9 @@ getdealcf <- function(params, workdate=Sys.Date()){
tranches <- "COLLAT"
}else{
tranches <- c("COLLAT_INITIAL", "COLLAT_REINVEST")
- if(dealname=="octag11"){
- tranches <- c("COLLAT_USD_INITIAL", "COLLAT_USD_REINVEST")
- }
+ ## if(dealname=="octag11"){
+ ## tranches <- c("COLLAT_USD_INITIAL", "COLLAT_USD_REINVEST")
+ ## }
}
for(tranche in tranches){
cfdata[[dealname]][[tranche]] <- callCC(function(k){
@@ -262,6 +262,7 @@ getdealcf <- function(params, workdate=Sys.Date()){
getcusipcf <- function(params, cfdata, dist, workdate=Sys.Date()){
cusipdata <- list()
cusips <- keys(params$cusips)
+ cusips <- cusips[dealnamefromcusip(cusips) %in% names(cfdata)]
dealnames <- dealnamefromcusip(cusips)
n.scenarios <- 100
intexfields <- c("Cashflow", "Principal", "Interest", "Balance",
@@ -351,8 +352,7 @@ if(length(args)>=2){
}
cfdata <- getdealcf(params, workdate)
-cusips <- keys(params$cusips)
-availablecusips <- cusips[dealnamefromcusip(cusips) %in% names(cfdata)]
+
## load dist into the environment
load(file.path(root.dir, "Scenarios", "Calibration", sprintf("marketdata-%s.RData", calibration.date)))
cusipdata <- getcusipcf(params, cfdata, dist, workdate)