Skip to content

Commit e9654fe

Browse files
committed
Add paymentLag
Add paymentLag to Zero Coupon
1 parent 985be6e commit e9654fe

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

OREData/ored/portfolio/legdata.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1057,6 +1057,8 @@ Leg makeZCFixedLeg(const LegData& data, const QuantLib::Date& openEndDateReplace
10571057
paymentCalendar = parseCalendar(data.paymentCalendar());
10581058

10591059
BusinessDayConvention payConvention = parseBusinessDayConvention(data.paymentConvention());
1060+
PaymentLag paymentLag = parsePaymentLag(data.paymentLag());
1061+
Natural paymentLagDays = boost::apply_visitor(PaymentLagInteger(), paymentLag);
10601062

10611063
DayCounter dc = parseDayCounter(data.dayCounter());
10621064

@@ -1087,7 +1089,7 @@ Leg makeZCFixedLeg(const LegData& data, const QuantLib::Date& openEndDateReplace
10871089
double currentNotional = i < notionals.size() ? notionals[i] : notionals.back();
10881090
double currentRate = i < rates.size() ? rates[i] : rates.back();
10891091
cpnDates.push_back(dates[i + 1]);
1090-
Date paymentDate = paymentCalendar.adjust(dates[i + 1], payConvention);
1092+
Date paymentDate = paymentCalendar.advance(dates[i + 1], paymentLagDays, Days, payConvention);
10911093
leg.push_back(boost::make_shared<ZeroFixedCoupon>(paymentDate, currentNotional, currentRate, dc, cpnDates, comp,
10921094
zcFixedLegData->subtractNotional()));
10931095
}

0 commit comments

Comments
 (0)