Skip to content

OvernightOvernightBasisSwapRateHelper - #2700

Open
kp9991-git wants to merge 6 commits into
lballabio:masterfrom
kp9991-git:OvernightOvernightBasisSwapRateHelper
Open

OvernightOvernightBasisSwapRateHelper #2700
kp9991-git wants to merge 6 commits into
lballabio:masterfrom
kp9991-git:OvernightOvernightBasisSwapRateHelper

Conversation

@kp9991-git

Copy link
Copy Markdown
Contributor

Adding an OvernightOvernightBasisSwapRateHelper for bootstrapping a curve with overnight-overnight basis swaps (e.g. FF vs SOFR).
Note: I also changed setTermStructure for the existing OvernightIborBasisSwapRateHelper (the same file) to relink the discount curve there, as SwapRateHelper and other QuantLib helpers do. Without this the discount curve is chosen in the constructor, so if it is only linked afterwards, it is ignored and the helper keeps self-discounting.

@coveralls

coveralls commented Jul 31, 2026

Copy link
Copy Markdown

Coverage Status

coverage: 75.308% (+0.02%) from 75.287% — kp9991-git:OvernightOvernightBasisSwapRateHelper into lballabio:master

@lballabio lballabio left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

There are a number of small differences between the three helpers that we could try to remove. I'm listing below the ones I saw. There might be others.

Comment on lines +167 to +168
RateAveraging::Type otherAveragingMethod = RateAveraging::Compound,
bool telescopicValueDates = false);

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

These can also be added to the overnight-ibor helper.

const ext::shared_ptr<OvernightIndex>& otherIndex,
Handle<YieldTermStructure> discountHandle = Handle<YieldTermStructure>(),
bool bootstrapBaseCurve = false,
Integer paymentLag = 0,

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

The payment lag can also be added to the ibor-ibor helper.

Comment on lines +250 to +251
QL_REQUIRE(baseIndex, "null base overnight index");
QL_REQUIRE(otherIndex, "null other overnight index");

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

These checks on non-null pointers can also be added to the other helpers in this file.

Comment on lines +260 to +261
QL_REQUIRE(baseIndex_ != nullptr,
"the base index did not clone into an overnight index");

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Redundant. We already checked that baseIndex is a non-null overnight index. Same with the other checks after clone().

Comment on lines +311 to +312
QL_REQUIRE(lastBaseCoupon, "expected an overnight coupon on the base leg");
QL_REQUIRE(lastOtherCoupon, "expected an overnight coupon on the other leg");

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Probably unneeded, we built the legs ourselves.

Comment on lines +315 to +316
Date lastBaseFixingEndDate = baseIndex_->maturityDate(
baseIndex_->valueDate(lastBaseCoupon->fixingDate()));

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Should we also do this for the overnight index in the overnight-ibor helper?

@kp9991-git

Copy link
Copy Markdown
Contributor Author

Thanks for the review. I made the xccy helpers more consistent and also changed the default date generation direction and also NoFrequency means zero-coupon now.

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.

3 participants