Skip to content

Commit

Permalink
Remove forwardStart from DatedOISRateHelper (#1952)
Browse files Browse the repository at this point in the history
  • Loading branch information
lballabio authored May 3, 2024
2 parents e6885c7 + 852500c commit 249dd4c
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 3 deletions.
23 changes: 21 additions & 2 deletions ql/termstructures/yield/oisratehelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,6 @@ namespace QuantLib {
BusinessDayConvention paymentConvention,
Frequency paymentFrequency,
const Calendar& paymentCalendar,
const Period& forwardStart,
Spread overnightSpread,
ext::optional<bool> endOfMonth,
ext::optional<Frequency> fixedPaymentFrequency,
Expand All @@ -188,7 +187,7 @@ namespace QuantLib {

// input discount curve Handle might be empty now but it could
// be assigned a curve later; use a RelinkableHandle here
auto tmp = MakeOIS(Period(), clonedOvernightIndex, 0.0, forwardStart)
auto tmp = MakeOIS(Period(), clonedOvernightIndex, 0.0)
.withDiscountingTermStructure(discountRelinkableHandle_)
.withEffectiveDate(startDate)
.withTerminationDate(endDate)
Expand Down Expand Up @@ -216,6 +215,26 @@ namespace QuantLib {
latestDate_ = std::max(swap_->maturityDate(), lastPaymentDate);
}

DatedOISRateHelper::DatedOISRateHelper(const Date& startDate,
const Date& endDate,
const Handle<Quote>& fixedRate,
const ext::shared_ptr<OvernightIndex>& overnightIndex,
Handle<YieldTermStructure> discount,
bool telescopicValueDates,
RateAveraging::Type averagingMethod,
Integer paymentLag,
BusinessDayConvention paymentConvention,
Frequency paymentFrequency,
const Calendar& paymentCalendar,
const Period&,
Spread overnightSpread,
ext::optional<bool> endOfMonth,
ext::optional<Frequency> fixedPaymentFrequency,
const Calendar& fixedCalendar)
: DatedOISRateHelper(startDate, endDate, fixedRate, overnightIndex, discount, telescopicValueDates,
averagingMethod, paymentLag, paymentConvention, paymentFrequency, paymentCalendar,
overnightSpread, endOfMonth, fixedPaymentFrequency, fixedCalendar) {}

void DatedOISRateHelper::setTermStructure(YieldTermStructure* t) {
// do not set the relinkable handle as an observer -
// force recalculation when needed
Expand Down
24 changes: 23 additions & 1 deletion ql/termstructures/yield/oisratehelper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,33 @@ namespace QuantLib {
BusinessDayConvention paymentConvention = Following,
Frequency paymentFrequency = Annual,
const Calendar& paymentCalendar = Calendar(),
const Period& forwardStart = 0 * Days,
Spread overnightSpread = 0.0,
ext::optional<bool> endOfMonth = ext::nullopt,
ext::optional<Frequency> fixedPaymentFrequency = ext::nullopt,
const Calendar& fixedCalendar = Calendar());

/*! \deprecated Use the overload without forward start.
Deprecated in version 1.35.
*/
QL_DEPRECATED
DatedOISRateHelper(const Date& startDate,
const Date& endDate,
const Handle<Quote>& fixedRate,
const ext::shared_ptr<OvernightIndex>& overnightIndex,
// exogenous discounting curve
Handle<YieldTermStructure> discountingCurve,
bool telescopicValueDates,
RateAveraging::Type averagingMethod,
Integer paymentLag,
BusinessDayConvention paymentConvention,
Frequency paymentFrequency,
const Calendar& paymentCalendar,
const Period& forwardStart,
Spread overnightSpread = 0.0,
ext::optional<bool> endOfMonth = ext::nullopt,
ext::optional<Frequency> fixedPaymentFrequency = ext::nullopt,
const Calendar& fixedCalendar = Calendar());

//! \name RateHelper interface
//@{
Real impliedQuote() const override;
Expand Down

0 comments on commit 249dd4c

Please sign in to comment.