Skip to content

Commit

Permalink
Expose isExpired and type methods of CapFloor
Browse files Browse the repository at this point in the history
  • Loading branch information
slusek committed May 2, 2019
1 parent dd5bbad commit 633eb3d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ Python/QuantLib/quantlib_wrap.cpp
Python/.cache/
Python/QuantLib_Python.egg-info
Python/dist
.pytest_cache/v/cache/nodeids
R/src/QuantLib.cpp
R/makeRData.Rout
R/src/symbols.rds
Expand Down Expand Up @@ -93,3 +94,5 @@ R/QuantLib.RData
.vscode/launch.json
.vscode/settings.json
.vscode/tags
.vscode/tasks.json

4 changes: 4 additions & 0 deletions SWIG/capfloor.i
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,17 @@ class CapFloor : public Instrument {
Volatility maxVol = 4.0,
VolatilityType type = ShiftedLognormal,
Real displacement = 0.0) const;
enum Type { Cap, Floor, Collar };
const Leg& floatingLeg() const;

const std::vector<Rate>& capRates();
const std::vector<Rate>& floorRates();
Date startDate() const;
Date maturityDate() const;

bool isExpired() const;
Type type() const;

Rate atmRate(const YieldTermStructure& discountCurve) const;
};

Expand Down

0 comments on commit 633eb3d

Please sign in to comment.