Skip to content

Commit

Permalink
Add rule kwarg to OISRateHelper constructor - default to Backward (#684)
Browse files Browse the repository at this point in the history
  • Loading branch information
lballabio authored Nov 4, 2024
2 parents 04d0086 + f262fb7 commit 592372f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions SWIG/ratehelpers.i
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,8 @@ class OISRateHelper : public RateHelper {
Natural lookbackDays = Null<Natural>(),
Natural lockoutDays = 0,
bool applyObservationShift = false,
const ext::shared_ptr<FloatingRateCouponPricer>& pricer = {});
const ext::shared_ptr<FloatingRateCouponPricer>& pricer = {},
DateGeneration::Rule rule = DateGeneration::Backward);
%extend {
static ext::shared_ptr<OISRateHelper> forDates(
const Date& startDate,
Expand All @@ -385,13 +386,14 @@ class OISRateHelper : public RateHelper {
Natural lookbackDays = Null<Natural>(),
Natural lockoutDays = 0,
bool applyObservationShift = false,
ext::shared_ptr<FloatingRateCouponPricer> pricer = {}) {
ext::shared_ptr<FloatingRateCouponPricer> pricer = {},
DateGeneration::Rule rule = DateGeneration::Backward) {
return ext::make_shared<OISRateHelper>(
startDate, endDate, rate, index, discountingCurve,
telescopicValueDates, paymentLag, paymentConvention, paymentFrequency,
paymentCalendar, overnightSpread, pillar, customPillarDate, averagingMethod,
endOfMonth, fixedPaymentFrequency, fixedCalendar, lookbackDays, lockoutDays,
applyObservationShift, pricer);
applyObservationShift, pricer, rule);
}
}
ext::shared_ptr<OvernightIndexedSwap> swap();
Expand Down

0 comments on commit 592372f

Please sign in to comment.