34 const Period& fixedLegTenor,
37 ext::shared_ptr<IborIndex> iborIndex)
39 familyName, tenor, settlementDays, currency, fixingCalendar, fixedLegDayCounter),
40 tenor_(tenor), iborIndex_(
std::move(iborIndex)), fixedLegTenor_(fixedLegTenor),
41 fixedLegConvention_(fixedLegConvention), exogenousDiscount_(false) {
50 const Period& fixedLegTenor,
53 ext::shared_ptr<IborIndex> iborIndex,
56 familyName, tenor, settlementDays, currency, fixingCalendar, fixedLegDayCounter),
57 tenor_(tenor), iborIndex_(
std::move(iborIndex)), fixedLegTenor_(fixedLegTenor),
58 fixedLegConvention_(fixedLegConvention), exogenousDiscount_(true),
59 discount_(
std::move(discount)) {
76 ext::shared_ptr<VanillaSwap>
111 ext::shared_ptr<SwapIndex>
115 return ext::make_shared<SwapIndex>(
familyName(),
126 return ext::make_shared<SwapIndex>(
familyName(),
137 ext::shared_ptr<SwapIndex>
140 return ext::make_shared<SwapIndex>(
familyName(),
152 ext::shared_ptr<SwapIndex>
156 return ext::make_shared<SwapIndex>(
familyName(),
167 return ext::make_shared<SwapIndex>(
familyName(),
180 const std::string& familyName,
184 const ext::shared_ptr<OvernightIndex>& overnightIndex,
185 bool telescopicValueDates,
191 overnightIndex->fixingCalendar(),
194 overnightIndex->dayCounter(),
196 overnightIndex_(overnightIndex),
197 telescopicValueDates_(telescopicValueDates),
198 averagingMethod_(averagingMethod) {}
201 ext::shared_ptr<OvernightIndexedSwap>
208 Rate fixedRate = 0.0;
Shared handle to an observable.
base class for interest rate indexes
Natural fixingDays() const
const DayCounter & dayCounter() const
Calendar fixingCalendar() const override
returns the calendar defining valid fixing dates
const Currency & currency() const
virtual Date valueDate(const Date &fixingDate) const
Date fixingDate(const Date &valueDate) const
std::string familyName() const
MakeOIS & withFixedLegDayCount(const DayCounter &dc)
MakeOIS & withEffectiveDate(const Date &)
MakeOIS & withAveragingMethod(RateAveraging::Type averagingMethod)
MakeOIS & withTelescopicValueDates(bool telescopicValueDates)
MakeVanillaSwap & withEffectiveDate(const Date &)
MakeVanillaSwap & withFixedLegConvention(BusinessDayConvention bdc)
MakeVanillaSwap & withFixedLegTerminationDateConvention(BusinessDayConvention bdc)
MakeVanillaSwap & withFixedLegCalendar(const Calendar &cal)
MakeVanillaSwap & withDiscountingTermStructure(const Handle< YieldTermStructure > &discountCurve)
MakeVanillaSwap & withFixedLegDayCount(const DayCounter &dc)
MakeVanillaSwap & withFixedLegTenor(const Period &t)
std::pair< iterator, bool > registerWith(const ext::shared_ptr< Observable > &)
ext::shared_ptr< OvernightIndex > overnightIndex_
bool telescopicValueDates_
ext::shared_ptr< OvernightIndexedSwap > lastSwap_
ext::shared_ptr< OvernightIndexedSwap > underlyingSwap(const Date &fixingDate) const
RateAveraging::Type averagingMethod_
OvernightIndexedSwapIndex(const std::string &familyName, const Period &tenor, Natural settlementDays, const Currency ¤cy, const ext::shared_ptr< OvernightIndex > &overnightIndex, bool telescopicValueDates=false, RateAveraging::Type averagingMethod=RateAveraging::Compound)
base class for swap-rate indexes
virtual ext::shared_ptr< SwapIndex > clone(const Handle< YieldTermStructure > &forwarding) const
returns a copy of itself linked to a different forwarding curve
Handle< YieldTermStructure > discount_
ext::shared_ptr< VanillaSwap > underlyingSwap(const Date &fixingDate) const
Handle< YieldTermStructure > forwardingTermStructure() const
BusinessDayConvention fixedLegConvention() const
ext::shared_ptr< VanillaSwap > lastSwap_
ext::shared_ptr< IborIndex > iborIndex_
Date maturityDate(const Date &valueDate) const override
BusinessDayConvention fixedLegConvention_
ext::shared_ptr< IborIndex > iborIndex() const
SwapIndex(const std::string &familyName, const Period &tenor, Natural settlementDays, const Currency ¤cy, const Calendar &fixingCalendar, const Period &fixedLegTenor, BusinessDayConvention fixedLegConvention, const DayCounter &fixedLegDayCounter, ext::shared_ptr< IborIndex > iborIndex)
Period fixedLegTenor() const
Handle< YieldTermStructure > discountingTermStructure() const
Rate forecastFixing(const Date &fixingDate) const override
It can be overridden to implement particular conventions.
#define QL_REQUIRE(condition, message)
throw an error if the given pre-condition is not verified
BusinessDayConvention
Business Day conventions.
unsigned QL_INTEGER Natural
positive integer
base class for Inter-Bank-Offered-Rate indexes
Helper class to instantiate overnight indexed swaps.
Helper class to instantiate standard market swaps.