OvernightOvernightBasisSwapRateHelper - #2700
Conversation
Update with latest master
Update with latest master
lballabio
left a comment
There was a problem hiding this comment.
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.
| RateAveraging::Type otherAveragingMethod = RateAveraging::Compound, | ||
| bool telescopicValueDates = false); |
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
The payment lag can also be added to the ibor-ibor helper.
| QL_REQUIRE(baseIndex, "null base overnight index"); | ||
| QL_REQUIRE(otherIndex, "null other overnight index"); |
There was a problem hiding this comment.
These checks on non-null pointers can also be added to the other helpers in this file.
| QL_REQUIRE(baseIndex_ != nullptr, | ||
| "the base index did not clone into an overnight index"); |
There was a problem hiding this comment.
Redundant. We already checked that baseIndex is a non-null overnight index. Same with the other checks after clone().
| QL_REQUIRE(lastBaseCoupon, "expected an overnight coupon on the base leg"); | ||
| QL_REQUIRE(lastOtherCoupon, "expected an overnight coupon on the other leg"); |
There was a problem hiding this comment.
Probably unneeded, we built the legs ourselves.
| Date lastBaseFixingEndDate = baseIndex_->maturityDate( | ||
| baseIndex_->valueDate(lastBaseCoupon->fixingDate())); |
There was a problem hiding this comment.
Should we also do this for the overnight index in the overnight-ibor helper?
Update with latest master
|
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. |
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.