Skip to content

Commit a9a3216

Browse files
committed
QPR-13659 cleanup
1 parent 3f9982f commit a9a3216

2 files changed

Lines changed: 4 additions & 8 deletions

File tree

OREData/ored/utilities/inflationstartdate.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,11 @@ using QuantLib::Period;
2525
using QuantLib::Days;
2626

2727
std::pair<QuantLib::Date, QuantLib::Period> getStartAndLag(const QuantLib::Date& asof,
28-
const InflationSwapConvention& conv, const int startDelay,
29-
const Calendar& cal,
30-
const BusinessDayConvention startDelayConvention) {
28+
const InflationSwapConvention& conv) {
3129

3230
Date adjustedAsOf = asof;
33-
if (startDelay != 0) {
34-
adjustedAsOf = cal.advance(asof, startDelay * Days, startDelayConvention);
31+
if (conv.startDelay() != 0) {
32+
adjustedAsOf = conv.fixCalendar().advance(asof, conv.startDelay() * Days, conv.startDelayConvention());
3533
}
3634

3735
using IPR = InflationSwapConvention::PublicationRoll;

OREData/ored/utilities/inflationstartdate.hpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,7 @@ namespace data {
3434
// example, this is more complicated and we need to account for this here if the inflation swap conventions provide
3535
// us with a publication schedule and tell us to roll on that schedule.
3636
std::pair<QuantLib::Date, QuantLib::Period>
37-
getStartAndLag(const QuantLib::Date& asof, const InflationSwapConvention& conv, const int startDelay = 0,
38-
const Calendar& cal = Calendar(),
39-
const BusinessDayConvention startDelayConvention = BusinessDayConvention::Unadjusted);
37+
getStartAndLag(const QuantLib::Date& asof, const InflationSwapConvention& conv);
4038

4139
QuantLib::Date getInflationSwapStart(const QuantLib::Date& asof, const InflationSwapConvention& conv);
4240

0 commit comments

Comments
 (0)