Skip to content

Fix ActualActual ISMA with a long first and short last coupon - #2946

Open
jackiectl2 wants to merge 1 commit into
lballabio:masterfrom
jackiectl2:fix-isma-long-first-short-last
Open

jackiectl2 wants to merge 1 commit into
lballabio:masterfrom
jackiectl2:fix-isma-long-first-short-last

Conversation

@jackiectl2

Copy link
Copy Markdown

Summary

When a schedule has a long first coupon and a short last coupon, inserting a notional date at the front shifts the index of the last date. Replace the final date using back() so the last notional coupon updates the actual final entry.

Fixes #2936.

Testing

  • A new schedule regression failed on the original source (0.49863013698630138 versus 0.5, and 0.33424657534246577 versus 1/3).
  • After the fix, quantlib-test-suite --run_test=QuantLibTests/DayCounterTests --log_level=error passed all 21 cases.
  • The full QuantLib test suite was not run.

Update the final notional date at its current vector position after a
long first coupon inserts an extra date at the beginning.

Signed-off-by: Tianlang (Jackie) Chen <305351710+jackiectl2@users.noreply.github.com>
@boring-cyborg

boring-cyborg Bot commented Oct 24, 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.

@CLAassistant

CLAassistant commented Oct 26, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@lballabio

Copy link
Copy Markdown
Owner

Thanks, @jackiectl2. May you please check the CLAassistant comment above?

Repository owner deleted a comment from CLAassistant Oct 28, 2026
Repository owner deleted a comment from CLAassistant Oct 28, 2026
Repository owner deleted a comment from CLAassistant Oct 28, 2026
@jackiectl2

Copy link
Copy Markdown
Author

Hi, I think I have signed the CLA just 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.

[Bug] ActualActual::ISMA overwrites penultimate coupon date when schedule has both long first coupon and irregular final period

3 participants