Skip to content

Commit

Permalink
Changed paymentLag type to Integer
Browse files Browse the repository at this point in the history
  • Loading branch information
Stoozy committed Oct 24, 2023
1 parent 0a745fa commit 35978d4
Show file tree
Hide file tree
Showing 12 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion ql/cashflows/cashflowvectors.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ namespace QuantLib {
const std::vector<Rate>& floors,
bool isInArrears,
bool isZero,
Natural paymentLag = 0,
Integer paymentLag = 0,
Calendar paymentCalendar = Calendar(),
Period exCouponPeriod = Period(),
Calendar exCouponCalendar = Calendar(),
Expand Down
2 changes: 1 addition & 1 deletion ql/instruments/bonds/amortizingfixedratebond.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ namespace QuantLib {
const BusinessDayConvention exCouponConvention,
bool exCouponEndOfMonth,
const std::vector<Real>& redemptions,
Natural paymentLag)
Integer paymentLag)
: Bond(settlementDays, schedule.calendar(), issueDate),
frequency_(schedule.tenor().frequency()),
dayCounter_(accrualDayCounter) {
Expand Down
2 changes: 1 addition & 1 deletion ql/instruments/bonds/amortizingfixedratebond.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ namespace QuantLib {
BusinessDayConvention exCouponConvention = Unadjusted,
bool exCouponEndOfMonth = false,
const std::vector<Real>& redemptions = { 100.0 },
Natural paymentLag = 0);
Integer paymentLag = 0);

Frequency frequency() const { return frequency_; }
const DayCounter& dayCounter() const { return dayCounter_; }
Expand Down
2 changes: 1 addition & 1 deletion ql/instruments/bonds/amortizingfloatingratebond.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ namespace QuantLib {
const BusinessDayConvention exCouponConvention,
bool exCouponEndOfMonth,
const std::vector<Real>& redemptions,
Natural paymentLag)
Integer paymentLag)
: Bond(settlementDays, schedule.calendar(), issueDate) {

maturityDate_ = schedule.endDate();
Expand Down
2 changes: 1 addition & 1 deletion ql/instruments/bonds/amortizingfloatingratebond.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ namespace QuantLib {
BusinessDayConvention exCouponConvention = Unadjusted,
bool exCouponEndOfMonth = false,
const std::vector<Real>& redemptions = { 100.0 },
Natural paymentLag = 0);
Integer paymentLag = 0);
};

}
Expand Down
2 changes: 1 addition & 1 deletion ql/instruments/fixedvsfloatingswap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ namespace QuantLib {
Spread spread,
DayCounter floatingDayCount,
ext::optional<BusinessDayConvention> 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)),
Expand Down
2 changes: 1 addition & 1 deletion ql/instruments/fixedvsfloatingswap.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ namespace QuantLib {
Spread spread,
DayCounter floatingDayCount,
ext::optional<BusinessDayConvention> paymentConvention = ext::nullopt,
Natural paymentLag = 0,
Integer paymentLag = 0,
const Calendar& paymentCalendar = Calendar());
//! \name Inspectors
//@{
Expand Down
8 changes: 4 additions & 4 deletions ql/instruments/overnightindexedswap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ namespace QuantLib {
DayCounter fixedDC,
const ext::shared_ptr<OvernightIndex>& overnightIndex,
Spread spread,
Natural paymentLag,
Integer paymentLag,
BusinessDayConvention paymentAdjustment,
const Calendar& paymentCalendar,
bool telescopicValueDates,
Expand All @@ -59,7 +59,7 @@ namespace QuantLib {
DayCounter fixedDC,
const ext::shared_ptr<OvernightIndex>& overnightIndex,
Spread spread,
Natural paymentLag,
Integer paymentLag,
BusinessDayConvention paymentAdjustment,
const Calendar& paymentCalendar,
bool telescopicValueDates,
Expand Down Expand Up @@ -87,7 +87,7 @@ namespace QuantLib {
const Schedule& overnightSchedule,
const ext::shared_ptr<OvernightIndex>& overnightIndex,
Spread spread,
Natural paymentLag,
Integer paymentLag,
BusinessDayConvention paymentAdjustment,
const Calendar& paymentCalendar,
bool telescopicValueDates,
Expand Down Expand Up @@ -116,7 +116,7 @@ namespace QuantLib {
const Schedule& overnightSchedule,
const ext::shared_ptr<OvernightIndex>& overnightIndex,
Spread spread,
Natural paymentLag,
Integer paymentLag,
BusinessDayConvention paymentAdjustment,
const Calendar& paymentCalendar,
bool telescopicValueDates,
Expand Down
8 changes: 4 additions & 4 deletions ql/instruments/overnightindexedswap.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ namespace QuantLib {
DayCounter fixedDC,
const ext::shared_ptr<OvernightIndex>& overnightIndex,
Spread spread = 0.0,
Natural paymentLag = 0,
Integer paymentLag = 0,
BusinessDayConvention paymentAdjustment = Following,
const Calendar& paymentCalendar = Calendar(),
bool telescopicValueDates = false,
Expand All @@ -61,7 +61,7 @@ namespace QuantLib {
DayCounter fixedDC,
const ext::shared_ptr<OvernightIndex>& overnightIndex,
Spread spread = 0.0,
Natural paymentLag = 0,
Integer paymentLag = 0,
BusinessDayConvention paymentAdjustment = Following,
const Calendar& paymentCalendar = Calendar(),
bool telescopicValueDates = false,
Expand All @@ -75,7 +75,7 @@ namespace QuantLib {
const Schedule& overnightSchedule,
const ext::shared_ptr<OvernightIndex>& overnightIndex,
Spread spread = 0.0,
Natural paymentLag = 0,
Integer paymentLag = 0,
BusinessDayConvention paymentAdjustment = Following,
const Calendar& paymentCalendar = Calendar(),
bool telescopicValueDates = false,
Expand All @@ -90,7 +90,7 @@ namespace QuantLib {
const Schedule& overnightSchedule,
const ext::shared_ptr<OvernightIndex>& overnightIndex,
Spread spread = 0.0,
Natural paymentLag = 0,
Integer paymentLag = 0,
BusinessDayConvention paymentAdjustment = Following,
const Calendar& paymentCalendar = Calendar(),
bool telescopicValueDates = false,
Expand Down
4 changes: 2 additions & 2 deletions ql/termstructures/yield/oisratehelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ namespace QuantLib {
const ext::shared_ptr<OvernightIndex>& overnightIndex,
Handle<YieldTermStructure> discount,
bool telescopicValueDates,
Natural paymentLag,
Integer paymentLag,
BusinessDayConvention paymentConvention,
Frequency paymentFrequency,
Calendar paymentCalendar,
Expand Down Expand Up @@ -156,7 +156,7 @@ namespace QuantLib {
Handle<YieldTermStructure> discount,
bool telescopicValueDates,
RateAveraging::Type averagingMethod,
Natural paymentLag,
Integer paymentLag,
BusinessDayConvention paymentConvention,
Frequency paymentFrequency,
const Calendar& paymentCalendar,
Expand Down
6 changes: 3 additions & 3 deletions ql/termstructures/yield/oisratehelper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ namespace QuantLib {
// exogenous discounting curve
Handle<YieldTermStructure> discountingCurve = {},
bool telescopicValueDates = false,
Natural paymentLag = 0,
Integer paymentLag = 0,
BusinessDayConvention paymentConvention = Following,
Frequency paymentFrequency = Annual,
Calendar paymentCalendar = Calendar(),
Expand Down Expand Up @@ -80,7 +80,7 @@ namespace QuantLib {
bool telescopicValueDates_;
RelinkableHandle<YieldTermStructure> discountRelinkableHandle_;

Natural paymentLag_;
Integer paymentLag_;
BusinessDayConvention paymentConvention_;
Frequency paymentFrequency_;
Calendar paymentCalendar_;
Expand All @@ -101,7 +101,7 @@ namespace QuantLib {
Handle<YieldTermStructure> 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(),
Expand Down
4 changes: 2 additions & 2 deletions test-suite/overnightindexedswap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ namespace overnight_indexed_swap_test {
Spread spread,
bool telescopicValueDates,
Date effectiveDate = Null<Date>(),
Natural paymentLag = 0,
Integer paymentLag = 0,
RateAveraging::Type averagingMethod = RateAveraging::Compound) {
return MakeOIS(length, eoniaIndex, fixedRate, 0 * Days)
.withEffectiveDate(effectiveDate == Null<Date>() ? settlement : effectiveDate)
Expand Down Expand Up @@ -303,7 +303,7 @@ namespace overnight_indexed_swap_test {

CommonVars vars;

Natural paymentLag = 2;
Integer paymentLag = 2;

std::vector<ext::shared_ptr<RateHelper> > eoniaHelpers;

Expand Down

0 comments on commit 35978d4

Please sign in to comment.