Skip to content

Fix CVA swap leg-order comment - #2734

Open
cuiyeshuai wants to merge 1 commit into
lballabio:masterfrom
cuiyeshuai:codex/fix-cva-swap-leg-comment
Open

Fix CVA swap leg-order comment#2734
cuiyeshuai wants to merge 1 commit into
lballabio:masterfrom
cuiyeshuai:codex/fix-cva-swap-leg-comment

Conversation

@cuiyeshuai

Copy link
Copy Markdown

Summary

Correct the leg-order comment in CounterpartyAdjSwapEngine::calculate() to state that leg 0 of a vanilla swap is the fixed leg.

Why

FixedVsFloatingSwap stores the fixed leg at index 0 and the floating leg at index 1. The existing comment stated the opposite, even though the nearby casts correctly treat arguments_.legs[0] as a FixedRateCoupon and arguments_.legs[1] as a FloatingRateCoupon.

Impact

Documentation-only correction; there is no runtime behavior change.

Validation

  • Verified the FixedVsFloatingSwap leg accessors and constructor ordering.
  • Confirmed the branch is one commit ahead of master and changes only this comment.
  • Ran git diff --check locally.

@CLAassistant

CLAassistant commented Aug 16, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@boring-cyborg

boring-cyborg Bot commented Aug 16, 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.

@cuiyeshuai
cuiyeshuai marked this pull request as ready for review August 16, 2026 13:53
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