Skip to content

Commit

Permalink
Expose FraRateHelper.forDates() (#710)
Browse files Browse the repository at this point in the history
  • Loading branch information
lballabio authored Mar 4, 2025
2 parents c0864fd + a3afcec commit 609ec2c
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions SWIG/ratehelpers.i
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,16 @@ class DepositRateHelper : public RateHelper {
const ext::shared_ptr<IborIndex>& index);
DepositRateHelper(Rate rate,
const ext::shared_ptr<IborIndex>& index);
DepositRateHelper(const Handle<Quote>& rate,
Date fixingDate,
const ext::shared_ptr<IborIndex>& index);
};

%shared_ptr(FraRateHelper)
class FraRateHelper : public RateHelper {
#if !defined(SWIGJAVA) && !defined(SWIGCSHARP)
%feature("kwargs") forDates;
#endif
public:
FraRateHelper(
const Handle<Quote>& rate,
Expand Down Expand Up @@ -162,6 +168,19 @@ class FraRateHelper : public RateHelper {
Pillar::Choice pillar = Pillar::LastRelevantDate,
Date customPillarDate = Date(),
bool useIndexedCoupon = true);
%extend {
static ext::shared_ptr<FraRateHelper> forDates(
const Handle<Quote>& rate,
Date startDate,
Date endDate,
const ext::shared_ptr<IborIndex>& index,
Pillar::Choice pillar = Pillar::LastRelevantDate,
Date customPillarDate = Date(),
bool useIndexedCoupon = true) {
return ext::make_shared<FraRateHelper>(
rate, startDate, endDate, index, pillar, customPillarDate, useIndexedCoupon);
}
}
};

%shared_ptr(FuturesRateHelper)
Expand Down

0 comments on commit 609ec2c

Please sign in to comment.