aboutsummaryrefslogtreecommitdiffstats
path: root/R/intex_deal_functions.R
diff options
context:
space:
mode:
Diffstat (limited to 'R/intex_deal_functions.R')
-rw-r--r--R/intex_deal_functions.R2
1 files changed, 1 insertions, 1 deletions
diff --git a/R/intex_deal_functions.R b/R/intex_deal_functions.R
index 91a4960a..d4ba8408 100644
--- a/R/intex_deal_functions.R
+++ b/R/intex_deal_functions.R
@@ -198,7 +198,7 @@ buildSC <- function(line.item, reinvdate, dealmaturity, global.params, startdate
line.item$price <- 100
SC@startdate <- startdate + global.params$defaultedlag
- if(SC@startdate<reinvdate && global.params$reinvflag){
+ if(!is.na(reinvdate) && SC@startdate<reinvdate && global.params$reinvflag){
line.item$maturity <- min(dealmaturity, SC@startdate + global.params$rollingmaturity)
line.item$nextpaydate <- SC@startdate
## automatic reinvest