From 35978d4336bc5a0701b236c7a6cb961488cd9123 Mon Sep 17 00:00:00 2001 From: Stoozy Date: Tue, 24 Oct 2023 13:14:06 -0400 Subject: [PATCH] Changed paymentLag type to Integer --- ql/cashflows/cashflowvectors.hpp | 2 +- ql/instruments/bonds/amortizingfixedratebond.cpp | 2 +- ql/instruments/bonds/amortizingfixedratebond.hpp | 2 +- ql/instruments/bonds/amortizingfloatingratebond.cpp | 2 +- ql/instruments/bonds/amortizingfloatingratebond.hpp | 2 +- ql/instruments/fixedvsfloatingswap.cpp | 2 +- ql/instruments/fixedvsfloatingswap.hpp | 2 +- ql/instruments/overnightindexedswap.cpp | 8 ++++---- ql/instruments/overnightindexedswap.hpp | 8 ++++---- ql/termstructures/yield/oisratehelper.cpp | 4 ++-- ql/termstructures/yield/oisratehelper.hpp | 6 +++--- test-suite/overnightindexedswap.cpp | 4 ++-- 12 files changed, 22 insertions(+), 22 deletions(-) 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/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/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;