Skip to content

Add date-generation rule to SwapRateHelper - #2699

Open
snigdhachoppac wants to merge 1 commit into
lballabio:masterfrom
snigdhachoppac:feat/swap-rate-helper-date-generation-rule
Open

snigdhachoppac wants to merge 1 commit into
lballabio:masterfrom
snigdhachoppac:feat/swap-rate-helper-date-generation-rule

Conversation

@snigdhachoppac

Copy link
Copy Markdown

This adds an optional DateGeneration::Rule parameter to SwapRateHelper, addressing the remaining part of #1393.

The new parameter:

  • is available on all three SwapRateHelper constructors
  • defaults to DateGeneration::Backward, preserving existing behavior
  • is passed to MakeVanillaSwap::withRule
  • applies to both the fixed and floating schedules

Regression coverage verifies the default backward rule and an explicitly supplied forward rule for both the tenor-based and explicit-date constructors.

Fixes #1393

Tests

  • Focused SwapRateHelper date-generation regression test
  • PiecewiseYieldCurveTests: 34/34 passed
  • Full optimized test suite: 1367/1367 test cases and 12413/12413 assertions passed

@CLAassistant

CLAassistant commented Jul 29, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@boring-cyborg

boring-cyborg Bot commented Jul 29, 2026

Copy link
Copy Markdown

Thanks for opening this pull request! It might take a while before we look at it, so don't worry if there seems to be no feedback. We'll get to it.


BOOST_AUTO_TEST_CASE(testSwapRateHelperDateGenerationRule) {
BOOST_TEST_MESSAGE("Testing SwapRateHelper date-generation rule...");

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.

It would be nice to use the IMM rule, as asked in the issue, and check the resulting swap dates as well as the rule.

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.

@snigdhachoppac any chance you can work on this?

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.

Using IMM-rolls swaps to build curves

3 participants