23#include <ql/cashflows/fixedratecoupon.hpp>
24#include <ql/cashflows/overnightindexedcoupon.hpp>
25#include <ql/instruments/overnightindexedswap.hpp>
35 const ext::shared_ptr<OvernightIndex>& overnightIndex,
40 bool telescopicValueDates,
56 const std::vector<Real>& nominals,
60 const ext::shared_ptr<OvernightIndex>& overnightIndex,
65 bool telescopicValueDates,
88 const ext::shared_ptr<OvernightIndex>& overnightIndex,
93 bool telescopicValueDates,
107 telescopicValueDates,
111 std::vector<Real> fixedNominals,
115 const std::vector<Real>& overnightNominals,
117 const ext::shared_ptr<OvernightIndex>& overnightIndex,
122 bool telescopicValueDates,
125 overnightNominals, overnightSchedule, overnightIndex,
126 spread,
DayCounter(), ext::nullopt, paymentLag, paymentCalendar),
127 overnightIndex_(overnightIndex), averagingMethod_(averagingMethod) {
144 Size n = floatingCoupons.size();
151 for (
Size i=0; i<n; ++i) {
152 auto coupon = ext::dynamic_pointer_cast<OvernightIndexedCoupon>(floatingCoupons[i]);
bool empty() const
Returns whether or not the calendar is initialized.
Arguments for simple swap calculation
std::vector< Date > floatingResetDates
std::vector< Real > floatingNominals
std::vector< Spread > floatingSpreads
std::vector< Date > floatingFixingDates
std::vector< Real > floatingCoupons
std::vector< Time > floatingAccrualTimes
std::vector< Date > floatingPayDates
const Leg & floatingLeg() const
template class providing a null value for a given type.
Overnight indexed swap: fix vs compounded overnight rate.
ext::shared_ptr< OvernightIndex > overnightIndex_
void setupFloatingArguments(arguments *args) const override
const std::vector< Real > & overnightNominals() const
RateAveraging::Type averagingMethod_
const Schedule & overnightSchedule() const
OvernightIndexedSwap(Type type, Real nominal, const Schedule &schedule, Rate fixedRate, DayCounter fixedDC, const ext::shared_ptr< OvernightIndex > &overnightIndex, Spread spread=0.0, Natural paymentLag=0, BusinessDayConvention paymentAdjustment=Following, const Calendar &paymentCalendar=Calendar(), bool telescopicValueDates=false, RateAveraging::Type averagingMethod=RateAveraging::Compound)
helper class building a sequence of overnight coupons
OvernightLeg & withPaymentCalendar(const Calendar &)
OvernightLeg & withTelescopicValueDates(bool telescopicValueDates)
OvernightLeg & withPaymentAdjustment(BusinessDayConvention)
OvernightLeg & withNotionals(Real notional)
OvernightLeg & withAveragingMethod(RateAveraging::Type averagingMethod)
OvernightLeg & withSpreads(Spread spread)
OvernightLeg & withPaymentLag(Natural lag)
const Calendar & calendar() const
BusinessDayConvention
Business Day conventions.
unsigned QL_INTEGER Natural
positive integer
Real Spread
spreads on interest rates
std::size_t Size
size of a container
std::vector< ext::shared_ptr< CashFlow > > Leg
Sequence of cash-flows.