aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--R/cds_utils.R2
1 files changed, 1 insertions, 1 deletions
diff --git a/R/cds_utils.R b/R/cds_utils.R
index 9087f340..235e4f88 100644
--- a/R/cds_utils.R
+++ b/R/cds_utils.R
@@ -114,7 +114,7 @@ couponSchedule <- function(nextpaydate=NULL, maturity, frequency, coupontype, cu
B = DiscountCurve(L2m$params, L2m$tsQuotes, yearFrac(L2m$params$tradeDate, dates)),
A = DiscountCurve(L12m$params, L12m$tsQuotes, yearFrac(L12m$params$tradeDate, dates)))
- if(coupontype=="FLOAT" && !is.na(margin)){
+ if(toupper(coupontype)=="FLOAT" && !is.na(margin)){
## if is.na(margin) probably letter of credit
## we floor the coupon at the current gross rate
coupons <- pmax(currentcoupon, DC$forwards + margin)