29#ifndef quantlib_ibor_coupon_hpp
30#define quantlib_ibor_coupon_hpp
45 const Date& startDate,
48 const ext::shared_ptr<IborIndex>&
index,
65 void setPricer(
const ext::shared_ptr<FloatingRateCouponPricer>&)
override;
126 #ifndef QL_USE_INDEXED_COUPON
138 IborLeg& withNotionals(
const std::vector<Real>& notionals);
144 IborLeg& withFixingDays(
const std::vector<Natural>& fixingDays);
146 IborLeg& withGearings(
const std::vector<Real>& gearings);
148 IborLeg& withSpreads(
const std::vector<Spread>& spreads);
150 IborLeg& withCaps(
const std::vector<Rate>& caps);
152 IborLeg& withFloors(
const std::vector<Rate>& floors);
153 IborLeg& inArrears(
bool flag =
true);
154 IborLeg& withZeroPayments(
bool flag =
true);
158 bool endOfMonth =
false);
159 IborLeg& withIndexedCoupons(ext::optional<bool>
b =
true);
160 IborLeg& withAtParCoupons(
bool b =
true);
161 operator Leg()
const;
175 bool inArrears_ =
false, zeroPayments_ =
false;
179 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.
Date fixingDate() const override
fixing date
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.
ext::function< Real(Real)> b
Coupon paying a variable index-based rate.
BusinessDayConvention
Business Day conventions.
Real Time
continuous quantity with 1-year units
unsigned QL_INTEGER Natural
positive integer
QL_INTEGER Integer
integer number
Real Spread
spreads on interest rates
base class for Inter-Bank-Offered-Rate indexes
std::vector< ext::shared_ptr< CashFlow > > Leg
Sequence of cash-flows.
Maps optional to either the boost or std implementation.
basic support for the singleton pattern