diff --git a/ql/cashflows/cashflowvectors.hpp b/ql/cashflows/cashflowvectors.hpp index 5e1c2df36e2..39bec60a357 100644 --- a/ql/cashflows/cashflowvectors.hpp +++ b/ql/cashflows/cashflowvectors.hpp @@ -70,7 +70,7 @@ namespace QuantLib { const std::vector& floors, bool isInArrears, bool isZero, - Natural paymentLag = 0, + Integer paymentLag = 0, Calendar paymentCalendar = Calendar(), Period exCouponPeriod = Period(), Calendar exCouponCalendar = Calendar(), diff --git a/ql/cashflows/fixedratecoupon.cpp b/ql/cashflows/fixedratecoupon.cpp index 0010f09c4e7..3cc5eca3510 100644 --- a/ql/cashflows/fixedratecoupon.cpp +++ b/ql/cashflows/fixedratecoupon.cpp @@ -156,7 +156,7 @@ namespace QuantLib { return *this; } - FixedRateLeg& FixedRateLeg::withPaymentLag(Natural lag) { + FixedRateLeg& FixedRateLeg::withPaymentLag(Integer lag) { paymentLag_ = lag; return *this; } diff --git a/ql/cashflows/fixedratecoupon.hpp b/ql/cashflows/fixedratecoupon.hpp index 17540e7b834..11c8c042eb4 100644 --- a/ql/cashflows/fixedratecoupon.hpp +++ b/ql/cashflows/fixedratecoupon.hpp @@ -106,7 +106,7 @@ namespace QuantLib { FixedRateLeg& withFirstPeriodDayCounter(const DayCounter&); FixedRateLeg& withLastPeriodDayCounter(const DayCounter&); FixedRateLeg& withPaymentCalendar(const Calendar&); - FixedRateLeg& withPaymentLag(Natural lag); + FixedRateLeg& withPaymentLag(Integer lag); FixedRateLeg& withExCouponPeriod(const Period&, const Calendar&, BusinessDayConvention, @@ -119,7 +119,7 @@ namespace QuantLib { DayCounter firstPeriodDC_ , lastPeriodDC_; Calendar paymentCalendar_; BusinessDayConvention paymentAdjustment_ = Following; - Natural paymentLag_ = 0; + Integer paymentLag_ = 0; Period exCouponPeriod_; Calendar exCouponCalendar_; BusinessDayConvention exCouponAdjustment_ = Following; diff --git a/ql/cashflows/iborcoupon.cpp b/ql/cashflows/iborcoupon.cpp index bab3d3f5298..47558c5fcf1 100644 --- a/ql/cashflows/iborcoupon.cpp +++ b/ql/cashflows/iborcoupon.cpp @@ -175,7 +175,7 @@ namespace QuantLib { return *this; } - IborLeg& IborLeg::withPaymentLag(Natural lag) { + IborLeg& IborLeg::withPaymentLag(Integer lag) { paymentLag_ = lag; return *this; } diff --git a/ql/cashflows/iborcoupon.hpp b/ql/cashflows/iborcoupon.hpp index 1f85f195dd9..7bbbe1f7f89 100644 --- a/ql/cashflows/iborcoupon.hpp +++ b/ql/cashflows/iborcoupon.hpp @@ -137,7 +137,7 @@ namespace QuantLib { IborLeg& withNotionals(const std::vector& notionals); IborLeg& withPaymentDayCounter(const DayCounter&); IborLeg& withPaymentAdjustment(BusinessDayConvention); - IborLeg& withPaymentLag(Natural lag); + IborLeg& withPaymentLag(Integer lag); IborLeg& withPaymentCalendar(const Calendar&); IborLeg& withFixingDays(Natural fixingDays); IborLeg& withFixingDays(const std::vector& fixingDays); @@ -165,7 +165,7 @@ namespace QuantLib { std::vector notionals_; DayCounter paymentDayCounter_; BusinessDayConvention paymentAdjustment_ = Following; - Natural paymentLag_ = 0; + Integer paymentLag_ = 0; Calendar paymentCalendar_; std::vector fixingDays_; std::vector gearings_; diff --git a/ql/cashflows/overnightindexedcoupon.cpp b/ql/cashflows/overnightindexedcoupon.cpp index f7cd70609fa..877ce8422b3 100644 --- a/ql/cashflows/overnightindexedcoupon.cpp +++ b/ql/cashflows/overnightindexedcoupon.cpp @@ -300,7 +300,7 @@ namespace QuantLib { return *this; } - OvernightLeg& OvernightLeg::withPaymentLag(Natural lag) { + OvernightLeg& OvernightLeg::withPaymentLag(Integer lag) { paymentLag_ = lag; return *this; } diff --git a/ql/cashflows/overnightindexedcoupon.hpp b/ql/cashflows/overnightindexedcoupon.hpp index 4447fe784a9..c13113996f6 100644 --- a/ql/cashflows/overnightindexedcoupon.hpp +++ b/ql/cashflows/overnightindexedcoupon.hpp @@ -101,7 +101,7 @@ namespace QuantLib { OvernightLeg& withPaymentDayCounter(const DayCounter&); OvernightLeg& withPaymentAdjustment(BusinessDayConvention); OvernightLeg& withPaymentCalendar(const Calendar&); - OvernightLeg& withPaymentLag(Natural lag); + OvernightLeg& withPaymentLag(Integer lag); OvernightLeg& withGearings(Real gearing); OvernightLeg& withGearings(const std::vector& gearings); OvernightLeg& withSpreads(Spread spread); @@ -116,7 +116,7 @@ namespace QuantLib { DayCounter paymentDayCounter_; Calendar paymentCalendar_; BusinessDayConvention paymentAdjustment_ = Following; - Natural paymentLag_ = 0; + Integer paymentLag_ = 0; std::vector gearings_; std::vector spreads_; bool telescopicValueDates_ = false; diff --git a/ql/cashflows/subperiodcoupon.cpp b/ql/cashflows/subperiodcoupon.cpp index 62b4346a82c..e7971ecc15c 100644 --- a/ql/cashflows/subperiodcoupon.cpp +++ b/ql/cashflows/subperiodcoupon.cpp @@ -185,7 +185,7 @@ namespace QuantLib { return *this; } - SubPeriodsLeg& SubPeriodsLeg::withPaymentLag(Natural lag) { + SubPeriodsLeg& SubPeriodsLeg::withPaymentLag(Integer lag) { paymentLag_ = lag; return *this; } diff --git a/ql/cashflows/subperiodcoupon.hpp b/ql/cashflows/subperiodcoupon.hpp index 8f340d53192..f2c531ab34f 100644 --- a/ql/cashflows/subperiodcoupon.hpp +++ b/ql/cashflows/subperiodcoupon.hpp @@ -126,7 +126,7 @@ namespace QuantLib { SubPeriodsLeg& withPaymentDayCounter(const DayCounter&); SubPeriodsLeg& withPaymentAdjustment(BusinessDayConvention); SubPeriodsLeg& withPaymentCalendar(const Calendar&); - SubPeriodsLeg& withPaymentLag(Natural lag); + SubPeriodsLeg& withPaymentLag(Integer lag); SubPeriodsLeg& withFixingDays(Natural fixingDays); SubPeriodsLeg& withFixingDays(const std::vector& fixingDays); SubPeriodsLeg& withGearings(Real gearing); @@ -149,7 +149,7 @@ namespace QuantLib { DayCounter paymentDayCounter_; Calendar paymentCalendar_; BusinessDayConvention paymentAdjustment_ = Following; - Natural paymentLag_ = 0; + Integer paymentLag_ = 0; std::vector fixingDays_; std::vector gearings_; std::vector couponSpreads_; diff --git a/ql/instruments/bonds/amortizingfixedratebond.cpp b/ql/instruments/bonds/amortizingfixedratebond.cpp index e42d36e5dce..7db51718b8e 100644 --- a/ql/instruments/bonds/amortizingfixedratebond.cpp +++ b/ql/instruments/bonds/amortizingfixedratebond.cpp @@ -37,7 +37,7 @@ namespace QuantLib { const BusinessDayConvention exCouponConvention, bool exCouponEndOfMonth, const std::vector& redemptions, - Natural paymentLag) + Integer paymentLag) : Bond(settlementDays, schedule.calendar(), issueDate), frequency_(schedule.tenor().frequency()), dayCounter_(accrualDayCounter) { diff --git a/ql/instruments/bonds/amortizingfixedratebond.hpp b/ql/instruments/bonds/amortizingfixedratebond.hpp index 8f1782205e0..73e216ee022 100644 --- a/ql/instruments/bonds/amortizingfixedratebond.hpp +++ b/ql/instruments/bonds/amortizingfixedratebond.hpp @@ -46,7 +46,7 @@ namespace QuantLib { BusinessDayConvention exCouponConvention = Unadjusted, bool exCouponEndOfMonth = false, const std::vector& redemptions = { 100.0 }, - Natural paymentLag = 0); + Integer paymentLag = 0); Frequency frequency() const { return frequency_; } const DayCounter& dayCounter() const { return dayCounter_; } diff --git a/ql/instruments/bonds/amortizingfloatingratebond.cpp b/ql/instruments/bonds/amortizingfloatingratebond.cpp index be2b9078c10..d79aa9fa5fc 100644 --- a/ql/instruments/bonds/amortizingfloatingratebond.cpp +++ b/ql/instruments/bonds/amortizingfloatingratebond.cpp @@ -44,7 +44,7 @@ namespace QuantLib { const BusinessDayConvention exCouponConvention, bool exCouponEndOfMonth, const std::vector& redemptions, - Natural paymentLag) + Integer paymentLag) : Bond(settlementDays, schedule.calendar(), issueDate) { maturityDate_ = schedule.endDate(); diff --git a/ql/instruments/bonds/amortizingfloatingratebond.hpp b/ql/instruments/bonds/amortizingfloatingratebond.hpp index 3db44a14ee6..ec0de9f4644 100644 --- a/ql/instruments/bonds/amortizingfloatingratebond.hpp +++ b/ql/instruments/bonds/amortizingfloatingratebond.hpp @@ -52,7 +52,7 @@ namespace QuantLib { BusinessDayConvention exCouponConvention = Unadjusted, bool exCouponEndOfMonth = false, const std::vector& redemptions = { 100.0 }, - Natural paymentLag = 0); + Integer paymentLag = 0); }; } diff --git a/ql/instruments/fixedvsfloatingswap.cpp b/ql/instruments/fixedvsfloatingswap.cpp index 719eacba5de..9bb943f29f2 100644 --- a/ql/instruments/fixedvsfloatingswap.cpp +++ b/ql/instruments/fixedvsfloatingswap.cpp @@ -41,7 +41,7 @@ namespace QuantLib { Spread spread, DayCounter floatingDayCount, ext::optional paymentConvention, - Natural paymentLag, + Integer paymentLag, const Calendar& paymentCalendar) : Swap(2), type_(type), fixedNominals_(std::move(fixedNominals)), fixedSchedule_(std::move(fixedSchedule)), fixedRate_(fixedRate), fixedDayCount_(std::move(fixedDayCount)), diff --git a/ql/instruments/fixedvsfloatingswap.hpp b/ql/instruments/fixedvsfloatingswap.hpp index 71187063c17..6c7cb043a34 100644 --- a/ql/instruments/fixedvsfloatingswap.hpp +++ b/ql/instruments/fixedvsfloatingswap.hpp @@ -64,7 +64,7 @@ namespace QuantLib { Spread spread, DayCounter floatingDayCount, ext::optional paymentConvention = ext::nullopt, - Natural paymentLag = 0, + Integer paymentLag = 0, const Calendar& paymentCalendar = Calendar()); //! \name Inspectors //@{ diff --git a/ql/instruments/makeois.cpp b/ql/instruments/makeois.cpp index 9b6f5b396d8..4e896ac3b92 100644 --- a/ql/instruments/makeois.cpp +++ b/ql/instruments/makeois.cpp @@ -176,7 +176,7 @@ namespace QuantLib { return *this; } - MakeOIS& MakeOIS::withPaymentLag(Natural lag) { + MakeOIS& MakeOIS::withPaymentLag(Integer lag) { paymentLag_ = lag; return *this; } diff --git a/ql/instruments/makeois.hpp b/ql/instruments/makeois.hpp index 252a9ba5b50..117d598d483 100644 --- a/ql/instruments/makeois.hpp +++ b/ql/instruments/makeois.hpp @@ -57,7 +57,7 @@ namespace QuantLib { MakeOIS& withPaymentFrequency(Frequency f); MakeOIS& withPaymentAdjustment(BusinessDayConvention convention); - MakeOIS& withPaymentLag(Natural lag); + MakeOIS& withPaymentLag(Integer lag); MakeOIS& withPaymentCalendar(const Calendar& cal); MakeOIS& withEndOfMonth(bool flag = true); @@ -88,7 +88,7 @@ namespace QuantLib { Frequency paymentFrequency_ = Annual; Calendar paymentCalendar_; BusinessDayConvention paymentAdjustment_ = Following; - Natural paymentLag_ = 0; + Integer paymentLag_ = 0; DateGeneration::Rule rule_ = DateGeneration::Backward; bool endOfMonth_ = false, isDefaultEOM_ = true; diff --git a/ql/instruments/overnightindexedswap.cpp b/ql/instruments/overnightindexedswap.cpp index 70df2db8e88..cec53b50fae 100644 --- a/ql/instruments/overnightindexedswap.cpp +++ b/ql/instruments/overnightindexedswap.cpp @@ -34,7 +34,7 @@ namespace QuantLib { DayCounter fixedDC, const ext::shared_ptr& overnightIndex, Spread spread, - Natural paymentLag, + Integer paymentLag, BusinessDayConvention paymentAdjustment, const Calendar& paymentCalendar, bool telescopicValueDates, @@ -59,7 +59,7 @@ namespace QuantLib { DayCounter fixedDC, const ext::shared_ptr& overnightIndex, Spread spread, - Natural paymentLag, + Integer paymentLag, BusinessDayConvention paymentAdjustment, const Calendar& paymentCalendar, bool telescopicValueDates, @@ -87,7 +87,7 @@ namespace QuantLib { const Schedule& overnightSchedule, const ext::shared_ptr& overnightIndex, Spread spread, - Natural paymentLag, + Integer paymentLag, BusinessDayConvention paymentAdjustment, const Calendar& paymentCalendar, bool telescopicValueDates, @@ -116,7 +116,7 @@ namespace QuantLib { const Schedule& overnightSchedule, const ext::shared_ptr& overnightIndex, Spread spread, - Natural paymentLag, + Integer paymentLag, BusinessDayConvention paymentAdjustment, const Calendar& paymentCalendar, bool telescopicValueDates, diff --git a/ql/instruments/overnightindexedswap.hpp b/ql/instruments/overnightindexedswap.hpp index 5af535b62ae..d44fa2324e8 100644 --- a/ql/instruments/overnightindexedswap.hpp +++ b/ql/instruments/overnightindexedswap.hpp @@ -48,7 +48,7 @@ namespace QuantLib { DayCounter fixedDC, const ext::shared_ptr& overnightIndex, Spread spread = 0.0, - Natural paymentLag = 0, + Integer paymentLag = 0, BusinessDayConvention paymentAdjustment = Following, const Calendar& paymentCalendar = Calendar(), bool telescopicValueDates = false, @@ -61,7 +61,7 @@ namespace QuantLib { DayCounter fixedDC, const ext::shared_ptr& overnightIndex, Spread spread = 0.0, - Natural paymentLag = 0, + Integer paymentLag = 0, BusinessDayConvention paymentAdjustment = Following, const Calendar& paymentCalendar = Calendar(), bool telescopicValueDates = false, @@ -75,7 +75,7 @@ namespace QuantLib { const Schedule& overnightSchedule, const ext::shared_ptr& overnightIndex, Spread spread = 0.0, - Natural paymentLag = 0, + Integer paymentLag = 0, BusinessDayConvention paymentAdjustment = Following, const Calendar& paymentCalendar = Calendar(), bool telescopicValueDates = false, @@ -90,7 +90,7 @@ namespace QuantLib { const Schedule& overnightSchedule, const ext::shared_ptr& overnightIndex, Spread spread = 0.0, - Natural paymentLag = 0, + Integer paymentLag = 0, BusinessDayConvention paymentAdjustment = Following, const Calendar& paymentCalendar = Calendar(), bool telescopicValueDates = false, diff --git a/ql/termstructures/yield/oisratehelper.cpp b/ql/termstructures/yield/oisratehelper.cpp index 1664b299de9..ab9707ae212 100644 --- a/ql/termstructures/yield/oisratehelper.cpp +++ b/ql/termstructures/yield/oisratehelper.cpp @@ -33,7 +33,7 @@ namespace QuantLib { const ext::shared_ptr& overnightIndex, Handle discount, bool telescopicValueDates, - Natural paymentLag, + Integer paymentLag, BusinessDayConvention paymentConvention, Frequency paymentFrequency, Calendar paymentCalendar, @@ -156,7 +156,7 @@ namespace QuantLib { Handle discount, bool telescopicValueDates, RateAveraging::Type averagingMethod, - Natural paymentLag, + Integer paymentLag, BusinessDayConvention paymentConvention, Frequency paymentFrequency, const Calendar& paymentCalendar, diff --git a/ql/termstructures/yield/oisratehelper.hpp b/ql/termstructures/yield/oisratehelper.hpp index bef5c5c2113..f65ada8bd5b 100644 --- a/ql/termstructures/yield/oisratehelper.hpp +++ b/ql/termstructures/yield/oisratehelper.hpp @@ -41,7 +41,7 @@ namespace QuantLib { // exogenous discounting curve Handle discountingCurve = {}, bool telescopicValueDates = false, - Natural paymentLag = 0, + Integer paymentLag = 0, BusinessDayConvention paymentConvention = Following, Frequency paymentFrequency = Annual, Calendar paymentCalendar = Calendar(), @@ -80,7 +80,7 @@ namespace QuantLib { bool telescopicValueDates_; RelinkableHandle discountRelinkableHandle_; - Natural paymentLag_; + Integer paymentLag_; BusinessDayConvention paymentConvention_; Frequency paymentFrequency_; Calendar paymentCalendar_; @@ -101,7 +101,7 @@ namespace QuantLib { Handle discountingCurve = {}, bool telescopicValueDates = false, RateAveraging::Type averagingMethod = RateAveraging::Compound, - Natural paymentLag = 0, + Integer paymentLag = 0, BusinessDayConvention paymentConvention = Following, Frequency paymentFrequency = Annual, const Calendar& paymentCalendar = Calendar(), diff --git a/test-suite/overnightindexedswap.cpp b/test-suite/overnightindexedswap.cpp index 2bb43456922..83d8de9f8fd 100644 --- a/test-suite/overnightindexedswap.cpp +++ b/test-suite/overnightindexedswap.cpp @@ -136,7 +136,7 @@ namespace overnight_indexed_swap_test { Spread spread, bool telescopicValueDates, Date effectiveDate = Null(), - Natural paymentLag = 0, + Integer paymentLag = 0, RateAveraging::Type averagingMethod = RateAveraging::Compound) { return MakeOIS(length, eoniaIndex, fixedRate, 0 * Days) .withEffectiveDate(effectiveDate == Null() ? settlement : effectiveDate) @@ -303,7 +303,7 @@ namespace overnight_indexed_swap_test { CommonVars vars; - Natural paymentLag = 2; + Integer paymentLag = 2; std::vector > eoniaHelpers;