Skip to content

Add GenericRateHelper extending RelativeDateRateHelper#2565

Open
ArsenP0doba wants to merge 1 commit into
lballabio:masterfrom
RobertoSoft:add_generic_rate_helper
Open

Add GenericRateHelper extending RelativeDateRateHelper#2565
ArsenP0doba wants to merge 1 commit into
lballabio:masterfrom
RobertoSoft:add_generic_rate_helper

Conversation

@ArsenP0doba

Copy link
Copy Markdown
Contributor

No description provided.

@ArsenP0doba

Copy link
Copy Markdown
Contributor Author

Hi, are there any updates or notes on this PR?

@lballabio

Copy link
Copy Markdown
Owner

Not yet but I will have notes. I'll get to these PRs when I find some time.

compounding_, frequency_, extrapolate_);
}

void GenericRateHelper::initializeDates() {}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since you don't do anything when evaluationDate changes, you don't need to inherit from RelativeDateRateHelper.

@eltoder

eltoder commented May 12, 2026

Copy link
Copy Markdown
Contributor

@ArsenP0doba please explain what this is and how this is intended to be used. It may be good to find a more descriptive name than calling it "generic".

class GenericRateHelper : public RelativeDateRateHelper {
public:
GenericRateHelper(const Handle<Quote>& rate,
const Date& settlementDate,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

settlementDate is not used. (just setting earliestDate_ doesn't have any effect)

Real impliedQuote() const override;

protected:
DayCounter dayCounter_;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason to make dayCounter_ protected but all other fields and initializeDates private?

@lballabio

Copy link
Copy Markdown
Owner

I, too, would like to understand the use case. If it's "a curve built by specifying a set of zero-rates that can change", it's probably a better fit for an extension of InterpolatedZeroCurve rather than a new rate helper; it's not really what we think of as a bootstrap, since those rates are not market quotes. If it's "a curve whose zero rates I can bump" one can already use PiecewiseZeroSpreadedTermStructure.

@RobertoSoft

Copy link
Copy Markdown

@lballabio @eltoder
Thank you for the reviews.

By way of context, these changes were originally made in our internal QuantLib copy, which was based on QuantLib 1.4. The main reason for introducing concrete implementations was Java/SWIG usage: our understanding was that, in order to expose and use these behaviours cleanly from Java, we needed these implementations rather than relying only on more generic C++ constructs.

Since a long time has passed, we will review the individual comments carefully and check whether newer QuantLib functionality already covers some of the use cases. We will comment point by point later, clarifying where Java/SWIG exposure is still the reason behind the proposed design.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants