36 ext::shared_ptr<IborIndex> index,
39 ext::optional<BusinessDayConvention> paymentConvention,
40 ext::optional<bool> useIndexedCoupons)
42 {nominal}, std::move(floatSchedule), std::move(index), spread, std::move(floatingDayCount),
45 legs_[1] = IborLeg(floatingSchedule(), iborIndex())
46 .withNotionals(this->floatingNominals())
47 .withPaymentDayCounter(this->floatingDayCount())
48 .withPaymentAdjustment(this->paymentConvention())
49 .withSpreads(this->spread())
50 .withIndexedCoupons(useIndexedCoupons);
51 for (
const auto& c : legs_[1])
57 Size n = floatingCoupons.size();
64 for (
Size i=0; i<
n; ++i) {
65 auto coupon = ext::dynamic_pointer_cast<IborCoupon>(floatingCoupons[i]);
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.
void setupFloatingArguments(arguments *args) const override
VanillaSwap(Type type, Real nominal, Schedule fixedSchedule, Rate fixedRate, DayCounter fixedDayCount, Schedule floatSchedule, ext::shared_ptr< IborIndex > iborIndex, Spread spread, DayCounter floatingDayCount, ext::optional< BusinessDayConvention > paymentConvention=ext::nullopt, ext::optional< bool > useIndexedCoupons=ext::nullopt)
Real Spread
spreads on interest rates
std::size_t Size
size of a container
Coupon paying a Libor-type index.
base class for Inter-Bank-Offered-Rate indexes
std::vector< ext::shared_ptr< CashFlow > > Leg
Sequence of cash-flows.
Simple fixed-rate vs Libor swap.
Interest-rate term structure.