Skip to content

Commit

Permalink
Expose new constructors and methods for YoYInflationIndex (#572)
Browse files Browse the repository at this point in the history
  • Loading branch information
lballabio committed Jul 3, 2023
2 parents 1d2f4d6 + 40e7e67 commit d255867
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions SWIG/inflation.i
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,24 @@ class ZeroInflationIndex : public InflationIndex {
%shared_ptr(YoYInflationIndex)
class YoYInflationIndex : public InflationIndex {
public:
// Constructor for year-on-year indices defined as a ratio.
YoYInflationIndex(
const ext::shared_ptr<ZeroInflationIndex>& underlyingIndex,
bool interpolated,
Handle<YoYInflationTermStructure> ts = {});

// Constructor for quoted year-on-year indices.
YoYInflationIndex(
const std::string& familyName,
const Region& region,
bool revised,
bool interpolated,
Frequency frequency,
const Period& availabilityLag,
const Currency& currency,
Handle<YoYInflationTermStructure> ts = {});

// Deprecated constructor.
YoYInflationIndex(const std::string& familyName,
const Region& region,
bool revised,
Expand All @@ -197,6 +215,7 @@ class YoYInflationIndex : public InflationIndex {
const Currency& currency,
const Handle<YoYInflationTermStructure>& ts = {});
bool ratio() const;
ext::shared_ptr<ZeroInflationIndex> underlyingIndex() const;
Handle<YoYInflationTermStructure> yoyInflationTermStructure() const;
ext::shared_ptr<YoYInflationIndex> clone(const Handle<YoYInflationTermStructure>& h) const;
};
Expand Down

0 comments on commit d255867

Please sign in to comment.