29#ifndef quantlib_ibor_coupon_hpp
30#define quantlib_ibor_coupon_hpp
32#include <ql/cashflows/floatingratecoupon.hpp>
33#include <ql/indexes/iborindex.hpp>
34#include <ql/patterns/singleton.hpp>
35#include <ql/time/schedule.hpp>
36#include <ql/optional.hpp>
45 const Date& startDate,
48 const ext::shared_ptr<IborIndex>&
index,
64 void setPricer(
const ext::shared_ptr<FloatingRateCouponPricer>&)
override;
125 #ifndef QL_USE_INDEXED_COUPON
137 IborLeg& withNotionals(
const std::vector<Real>& notionals);
143 IborLeg& withFixingDays(
const std::vector<Natural>& fixingDays);
145 IborLeg& withGearings(
const std::vector<Real>& gearings);
147 IborLeg& withSpreads(
const std::vector<Spread>& spreads);
149 IborLeg& withCaps(
const std::vector<Rate>& caps);
151 IborLeg& withFloors(
const std::vector<Rate>& floors);
152 IborLeg& inArrears(
bool flag =
true);
153 IborLeg& withZeroPayments(
bool flag =
true);
157 bool endOfMonth =
false);
158 IborLeg& withIndexedCoupons(ext::optional<bool> b =
true);
159 IborLeg& withAtParCoupons(
bool b =
true);
160 operator Leg()
const;
174 bool inArrears_ =
false, zeroPayments_ =
false;
178 bool exCouponEndOfMonth_ =
false;
degenerate base class for the Acyclic Visitor pattern
Date exCouponDate() const override
returns the date that the cash flow trades exCoupon
virtual Real nominal() const
base floating-rate coupon class
Natural fixingDays() const
fixing days
Real gearing() const
index gearing, i.e. multiplicative coefficient for the index
DayCounter dayCounter() const override
day counter for accrual calculation
const ext::shared_ptr< InterestRateIndex > & index() const
floating index
Spread spread() const
spread paid over the fixing of the underlying index
bool isInArrears() const
whether or not the coupon fixes in arrears
Per-session settings for IborCoupon class.
bool usingAtParCoupons() const
void createIndexedCoupons()
When called, IborCoupons are created as par coupons instead of indexed coupons.
void createAtParCoupons()
When called, IborCoupons are created as indexed coupons instead of par coupons.
Coupon paying a Libor-type index
void initializeCachedData() const
Time spanningTimeIndexMaturity() const
Period underlying the index fixing, as a year fraction.
Rate indexFixing() const override
fixing of the underlying index
Time spanningTimeIndexMaturity_
ext::shared_ptr< IborIndex > iborIndex_
void accept(AcyclicVisitor &) override
const Date & fixingValueDate() const
Start of the deposit period underlying the index fixing.
const ext::shared_ptr< IborIndex > & iborIndex() const
void setPricer(const ext::shared_ptr< FloatingRateCouponPricer > &) override
bool cachedDataIsInitialized_
const Date & fixingEndDate() const
End of the deposit period underlying the coupon fixing.
const Date & fixingMaturityDate() const
End of the deposit period underlying the index fixing.
Time spanningTime() const
Period underlying the coupon fixing, as a year fraction.
base pricer for capped/floored Ibor coupons
helper class building a sequence of capped/floored ibor-rate coupons
std::vector< Rate > caps_
Calendar paymentCalendar_
ext::optional< bool > useIndexedCoupons_
std::vector< Real > notionals_
std::vector< Spread > spreads_
std::vector< Natural > fixingDays_
Calendar exCouponCalendar_
std::vector< Real > gearings_
DayCounter paymentDayCounter_
ext::shared_ptr< IborIndex > index_
Basic support for the singleton pattern.
BusinessDayConvention
Business Day conventions.
Real Time
continuous quantity with 1-year units
unsigned QL_INTEGER Natural
positive integer
Real Spread
spreads on interest rates
std::vector< ext::shared_ptr< CashFlow > > Leg
Sequence of cash-flows.