Skip to content

Add support for payment lag in cash flow calculations. This is needed…#320

Open
novitk wants to merge 2 commits into
amaggiulli:developfrom
novitk:kn-paylag
Open

Add support for payment lag in cash flow calculations. This is needed…#320
novitk wants to merge 2 commits into
amaggiulli:developfrom
novitk:kn-paylag

Conversation

@novitk
Copy link
Copy Markdown
Contributor

@novitk novitk commented Jun 1, 2026

… for OIS(SOFR, ESTR, etc).

Ensured backward compatibility by defaulting paymentLag to 0.

QLNet

Thank you for contributing! Take a moment to review our contributing guidelines
to make the process easy and effective for everyone involved.

You must open an issue before embarking on any significant pull request, especially those that
add a new code or change existing tests, otherwise you risk spending a lot of time working
on something that might not end up being merged into the project.

IMPORTANT: By submitting a patch via a Pull Request, you agree to allow the project
owners to license your work under the terms of the BSD3 License.

PR Type

What kind of change does this PR introduce?

[ ] Bugfix
[x] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Tests
[ ] Other

Description

… for OIS(SOFR, ESTR, etc).

Ensured backward compatibility by defaulting `paymentLag` to `0`.
Copilot AI review requested due to automatic review settings June 1, 2026 20:02
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds support for a payment lag on overnight indexed swaps by threading a paymentLag parameter through the fixed and overnight legs and the cashflow vector builder.

Changes:

  • Adds paymentLag parameter (default 0) to OvernightIndexedSwap constructor and applies it to both legs.
  • Adds withPaymentLag builder method on FixedRateLeg and OvernightLeg, with a helper calcPayDate on FixedRateLeg.
  • Threads paymentLag through CashFlowVectors.OvernightLeg to adjust payment dates.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
src/QLNet/Instruments/OvernightIndexedSwap.cs Adds optional paymentLag constructor parameter and forwards it to both legs.
src/QLNet/Cashflows/OvernightIndexedCoupon.cs Adds withPaymentLag builder method on OvernightLeg and passes lag through to the cashflow builder.
src/QLNet/Cashflows/FixedRateCoupon.cs Adds withPaymentLag and calcPayDate helper to apply lag in FixedRateLeg.value().
src/QLNet/Cashflows/Cashflowvectors.cs Adds optional paymentLag parameter that shifts the computed payment date.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/QLNet/Instruments/OvernightIndexedSwap.cs
Added an optional `paymentLag` parameter to the `OvernightIndexedSwap` constructor with a default value of `0`. Updated `FixedRateLeg` and `OvernightLeg` initializations to use the `.withPaymentLag(paymentLag)` method.
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.

2 participants