35 const ext::shared_ptr<OvernightIndex>& overnightIndex,
40 bool telescopicValueDates,
44 bool applyObservationShift)
59 applyObservationShift) {}
62 const std::vector<Real>& nominals,
66 const ext::shared_ptr<OvernightIndex>& overnightIndex,
71 bool telescopicValueDates,
75 bool applyObservationShift)
92 applyObservationShift) {}
100 const ext::shared_ptr<OvernightIndex>& overnightIndex,
105 bool telescopicValueDates,
109 bool applyObservationShift)
112 std::move(fixedSchedule),
116 std::move(overnightSchedule),
122 telescopicValueDates,
126 applyObservationShift) {}
129 std::vector<Real> fixedNominals,
133 const std::vector<Real>& overnightNominals,
135 const ext::shared_ptr<OvernightIndex>& overnightIndex,
140 bool telescopicValueDates,
144 bool applyObservationShift)
146 overnightNominals,
std::move(overnightSchedule), overnightIndex,
147 spread,
DayCounter(), ext::nullopt, paymentLag, paymentCalendar),
148 overnightIndex_(overnightIndex), averagingMethod_(averagingMethod),
149 lookbackDays_(lookbackDays), lockoutDays_(lockoutDays),
150 applyObservationShift_(applyObservationShift) {
165 for (
const auto& c :
legs_[1])
171 Size n = floatingCoupons.size();
178 for (
Size i=0; i<
n; ++i) {
179 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
const Schedule & floatingSchedule() const
template class providing a null value for a given type.
std::pair< iterator, bool > registerWith(const ext::shared_ptr< Observable > &)
Overnight indexed swap: fix vs compounded overnight rate.
ext::shared_ptr< OvernightIndex > overnightIndex_
void setupFloatingArguments(arguments *args) const override
bool applyObservationShift_
const std::vector< Real > & overnightNominals() const
RateAveraging::Type averagingMethod_
OvernightIndexedSwap(Type type, Real nominal, const Schedule &schedule, Rate fixedRate, DayCounter fixedDC, const ext::shared_ptr< OvernightIndex > &overnightIndex, Spread spread=0.0, Integer paymentLag=0, BusinessDayConvention paymentAdjustment=Following, const Calendar &paymentCalendar=Calendar(), bool telescopicValueDates=false, RateAveraging::Type averagingMethod=RateAveraging::Compound, Natural lookbackDays=Null< Natural >(), Natural lockoutDays=0, bool applyObservationShift=false)
helper class building a sequence of overnight coupons
OvernightLeg & withObservationShift(bool applyObservationShift=true)
OvernightLeg & withPaymentCalendar(const Calendar &)
OvernightLeg & withTelescopicValueDates(bool telescopicValueDates)
OvernightLeg & withPaymentAdjustment(BusinessDayConvention)
OvernightLeg & withNotionals(Real notional)
OvernightLeg & withAveragingMethod(RateAveraging::Type averagingMethod)
OvernightLeg & withLockoutDays(Natural lockoutDays)
OvernightLeg & withSpreads(Spread spread)
OvernightLeg & withPaymentLag(Integer lag)
OvernightLeg & withLookbackDays(Natural lookbackDays)
Coupon paying a fixed annual rate.
BusinessDayConvention
Business Day conventions.
unsigned QL_INTEGER Natural
positive integer
QL_INTEGER Integer
integer number
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.
coupon paying the compounded daily overnight rate
Overnight index swap paying compounded overnight vs. fixed.