Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove forwardStart from DatedOISRateHelper #1952

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading