diff options
Diffstat (limited to 'R/build_scenarios.R')
| -rw-r--r-- | R/build_scenarios.R | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/R/build_scenarios.R b/R/build_scenarios.R index 1e26f62d..4e29cb33 100644 --- a/R/build_scenarios.R +++ b/R/build_scenarios.R @@ -55,7 +55,7 @@ params <- yaml.load_file(file.path(root.dir, "code", "etc", "params.yml")) for(j in seq_along(dealnames)){
load(file.path(root.dir, "Scenarios", paste("Portfolios", tradedate, sep="_"),
paste(dealnames[j], "RData", sep=".")))
- if(is.na(deal.data$"Reinv End Date")){
+ if(is.na(deal.data$reinv_end_date)){
reinvflags[j] <- FALSE
}
dp <- A$DP
@@ -129,7 +129,7 @@ for(j in seq_along(dealnames)){ recoverymonthly <- pmin(recoverymonthly,1)
recoverymonthly[!is.finite(recoverymonthly)] <- 100
- if(!is.na(deal.data$"Reinv End Date") && deal.data$"Reinv End Date" <= tradedate){
+ if(!is.na(deal.data$reinv_end_date) && deal.data$reinv_end_date <= tradedate){
## we cap rolling maturity at the current weighted average maturity of the portfolio
rollingmaturity <- (crossprod(sapply(deal.portfolio$SC, creditcurve.maturity),
deal.portfolio$notional)/sum(deal.portfolio$notional)
|
