Skip to content

Commit

Permalink
Reorder parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
lballabio committed Sep 20, 2023
1 parent f8da734 commit b742601
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 14 deletions.
2 changes: 1 addition & 1 deletion ql/instruments/bonds/amortizingcmsratebond.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ namespace QuantLib {
const Date& issueDate = Date(),
const std::vector<Real>& redemptions = { 100.0 });
};

}

#endif
2 changes: 1 addition & 1 deletion ql/instruments/bonds/amortizingfixedratebond.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ namespace QuantLib {
addRedemptionsToCashflows();
}


AmortizingFixedRateBond::AmortizingFixedRateBond(
Natural settlementDays,
const std::vector<Real>& notionals,
Expand Down
6 changes: 2 additions & 4 deletions ql/instruments/bonds/amortizingfixedratebond.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ namespace QuantLib {
//! amortizing fixed-rate bond
class AmortizingFixedRateBond : public Bond {
public:
AmortizingFixedRateBond(Natural settlementDays,
AmortizingFixedRateBond(Natural settlementDays,
const std::vector<Real>& notionals,
const Schedule& schedule,
const std::vector<Rate>& coupons,
Expand All @@ -46,8 +46,7 @@ namespace QuantLib {
BusinessDayConvention exCouponConvention = Unadjusted,
bool exCouponEndOfMonth = false,
const std::vector<Real>& redemptions = { 100.0 },
Natural PaymentLag = 0);

Natural paymentLag = 0);

/*! \deprecated Use the other constructor after calling sinkingSchedule
and sinkingNotionals to generate the required parameters.
Expand Down Expand Up @@ -82,7 +81,6 @@ namespace QuantLib {
BusinessDayConvention exCouponConvention = Unadjusted,
bool exCouponEndOfMonth = false);


Frequency frequency() const { return frequency_; }
const DayCounter& dayCounter() const { return dayCounter_; }
protected:
Expand Down
8 changes: 4 additions & 4 deletions ql/instruments/bonds/amortizingfloatingratebond.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,14 @@

namespace QuantLib {


AmortizingFloatingRateBond::AmortizingFloatingRateBond(
AmortizingFloatingRateBond::AmortizingFloatingRateBond(
Natural settlementDays,
const std::vector<Real>& notionals,
const Schedule& schedule,
const ext::shared_ptr<IborIndex>& index,
const DayCounter& paymentDayCounter,
BusinessDayConvention paymentConvention,
Natural fixingDays, Natural paymentLag,
Natural fixingDays,
const std::vector<Real>& gearings,
const std::vector<Spread>& spreads,
const std::vector<Rate>& caps,
Expand All @@ -44,7 +43,8 @@ namespace QuantLib {
const Calendar& exCouponCalendar,
const BusinessDayConvention exCouponConvention,
bool exCouponEndOfMonth,
const std::vector<Real>& redemptions)
const std::vector<Real>& redemptions,
Natural paymentLag)
: Bond(settlementDays, schedule.calendar(), issueDate) {

maturityDate_ = schedule.endDate();
Expand Down
7 changes: 3 additions & 4 deletions ql/instruments/bonds/amortizingfloatingratebond.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,13 @@ namespace QuantLib {
//! amortizing floating-rate bond (possibly capped and/or floored)
class AmortizingFloatingRateBond : public Bond {
public:

AmortizingFloatingRateBond(Natural settlementDays,
const std::vector<Real>& notional,
const Schedule& schedule,
const ext::shared_ptr<IborIndex>& index,
const DayCounter& accrualDayCounter,
BusinessDayConvention paymentConvention = Following,
Natural fixingDays = Null<Natural>(),
Natural paymentLag = Null<Natural>(),
const std::vector<Real>& gearings = { 1.0 },
const std::vector<Spread>& spreads = { 0.0 },
const std::vector<Rate>& caps = {},
Expand All @@ -53,8 +51,9 @@ namespace QuantLib {
const Calendar& exCouponCalendar = Calendar(),
BusinessDayConvention exCouponConvention = Unadjusted,
bool exCouponEndOfMonth = false,
const std::vector<Real>& redemptions = { 100.0 });
};
const std::vector<Real>& redemptions = { 100.0 },
Natural paymentLag = 0);
};

}

Expand Down

0 comments on commit b742601

Please sign in to comment.