Skip to content

Guard against zero leg BPS in CPI and YoY inflation swap fair-rate and fair-spread calculations - #2692

Merged
lballabio merged 3 commits into
lballabio:masterfrom
PureSaber:fix/cpi-yoy-zero-leg-bps
Aug 10, 2026
Merged

Guard against zero leg BPS in CPI and YoY inflation swap fair-rate and fair-spread calculations#2692
lballabio merged 3 commits into
lballabio:masterfrom
PureSaber:fix/cpi-yoy-zero-leg-bps

Conversation

@PureSaber

Copy link
Copy Markdown
Contributor

Summary

Test plan

  • CI inflation swap tests

Made with Cursor

@CLAassistant

CLAassistant commented Jul 28, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

PureSaber and others added 2 commits August 6, 2026 23:11
Co-authored-by: Cursor <cursoragent@cursor.com>
Follow the BOOST_CHECK_EXCEPTION pattern from lballabio#2678/lballabio#2690: testZeroBpsFairRateAndSpread and testExpiredSwapFairRateAndSpread for CPISwap, and matching YoY inflation swap tests in inflation.cpp.

Co-authored-by: Cursor <cursoragent@cursor.com>
@PureSaber

Copy link
Copy Markdown
Contributor Author

@lballabio Following your suggestion on #2690 — pushed the corresponding tests:

  • CPISwap: testZeroBpsFairRateAndSpread and testExpiredSwapFairRateAndSpread in inflationcpiswap.cpp
  • YearOnYearInflationSwap: testZeroBpsYoYInflationSwapFairRateAndSpread and testExpiredYoYInflationSwapFairRateAndSpread in inflation.cpp

Same BOOST_CHECK_EXCEPTION / ExpectedErrorMessage pattern as #2678 and #2690. Rebased onto current master.

@PureSaber
PureSaber force-pushed the fix/cpi-yoy-zero-leg-bps branch from 3509df3 to 78b7a5b Compare August 6, 2026 15:11
Use single-date CPISwap setup without float fixings; link YoY inflation term structure in YoY swap tests.

Co-authored-by: Cursor <cursoragent@cursor.com>
@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 75.168% (+0.03%) from 75.142% — PureSaber:fix/cpi-yoy-zero-leg-bps into lballabio:master

@lballabio
lballabio merged commit a289c64 into lballabio:master Aug 10, 2026
45 checks passed
@lballabio lballabio changed the title Guard zero leg BPS in CPI and YoY inflation swap fair values Guard against zero leg BPS in CPI and YoY inflation swap fair-rate and fair-spread calculations Aug 10, 2026
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.

4 participants