24#ifndef quantext_indexed_coupon_hpp
25#define quantext_indexed_coupon_hpp
27#include <ql/cashflows/coupon.hpp>
28#include <ql/index.hpp>
29#include <ql/time/schedule.hpp>
41 IndexedCoupon(
const QuantLib::ext::shared_ptr<Coupon>& c,
const Real qty,
const QuantLib::ext::shared_ptr<Index>&
index,
53 Real
amount()
const override;
55 Real
rate()
const override;
62 QuantLib::ext::shared_ptr<Coupon>
underlying()
const;
64 QuantLib::ext::shared_ptr<Index>
index()
const;
72 void accept(AcyclicVisitor&)
override;
76 QuantLib::ext::shared_ptr<Coupon>
c_;
78 QuantLib::ext::shared_ptr<Index>
index_;
90 IndexWrappedCashFlow(
const QuantLib::ext::shared_ptr<CashFlow>& c,
const Real qty,
const QuantLib::ext::shared_ptr<Index>&
index,
102 Date
date()
const override;
103 Real
amount()
const override;
108 QuantLib::ext::shared_ptr<CashFlow>
underlying()
const;
110 QuantLib::ext::shared_ptr<Index>
index()
const;
118 void accept(AcyclicVisitor&)
override;
122 QuantLib::ext::shared_ptr<CashFlow>
c_;
134QuantLib::ext::shared_ptr<Coupon>
unpackIndexedCoupon(
const QuantLib::ext::shared_ptr<Coupon>& c);
143std::vector<std::tuple<Date, QuantLib::ext::shared_ptr<Index>, Real>>
152 IndexedCouponLeg(
const Leg& underlyingLeg,
const Real qty,
const QuantLib::ext::shared_ptr<Index>& index);
161 operator Leg()
const;
166 const QuantLib::ext::shared_ptr<Index>
index_;
Real initialFixing() const
QuantLib::ext::shared_ptr< Index > index() const
QuantLib::ext::shared_ptr< Index > index_
Real amount() const override
void accept(AcyclicVisitor &) override
QuantLib::ext::shared_ptr< CashFlow > c_
QuantLib::ext::shared_ptr< CashFlow > underlying() const
Date date() const override
const Date & fixingDate() const
Real initialFixing() const
QuantLib::ext::shared_ptr< Index > index() const
QuantLib::ext::shared_ptr< Index > index_
Real amount() const override
void accept(AcyclicVisitor &) override
Real nominal() const override
DayCounter dayCounter() const override
QuantLib::ext::shared_ptr< Coupon > underlying() const
QuantLib::ext::shared_ptr< Coupon > c_
const Date & fixingDate() const
Real accruedAmount(const Date &d) const override
Real rate() const override
IndexedCouponLeg & withInitialNotionalFixing(const Real initialNotionalFixing)
BusinessDayConvention fixingConvention_
Schedule valuationSchedule_
Real initialNotionalFixing_
IndexedCouponLeg & withFixingCalendar(const Calendar &fixingCalendar)
IndexedCouponLeg & inArrearsFixing(const bool inArrearsFixing=true)
IndexedCouponLeg & withInitialFixing(const Real initialFixing)
IndexedCouponLeg & withFixingDays(const Size fixingDays)
IndexedCouponLeg & withValuationSchedule(const Schedule &valuationSchedule)
IndexedCouponLeg & withFixingConvention(const BusinessDayConvention &fixingConvention)
const QuantLib::ext::shared_ptr< Index > index_
std::vector< std::tuple< Date, QuantLib::ext::shared_ptr< Index >, Real > > getIndexedCouponOrCashFlowFixingDetails(const QuantLib::ext::shared_ptr< CashFlow > &c)
QuantLib::ext::shared_ptr< Coupon > unpackIndexedCoupon(const QuantLib::ext::shared_ptr< Coupon > &c)
QuantLib::ext::shared_ptr< CashFlow > unpackIndexWrappedCashFlow(const QuantLib::ext::shared_ptr< CashFlow > &c)
Real getIndexedCouponOrCashFlowMultiplier(const QuantLib::ext::shared_ptr< CashFlow > &c)
QuantLib::ext::shared_ptr< CashFlow > unpackIndexedCouponOrCashFlow(const QuantLib::ext::shared_ptr< CashFlow > &c)