feat(crates): port interpolated year-on-year swap helper branch - #862
Merged
Conversation
The interpolated path of YearOnYearInflationSwapHelper was previously refused rather than ported. It now widens the date window a month past the flat one, picks a pillar from the interpolation weight or the maturity, and enforces a whole index period of observation lag on top of the index's availability lag. The Flat arm now sets its pillar date explicitly where it previously set none, but pillar_date() returns fixing_period.0 either way, so there is no observable change and the_flat_helper_pins_one_date passes unchanged. This mirrors the zero side's documented choice. Closes #847
benbenbang
enabled auto-merge (squash)
August 12, 2026 10:40
The core helper now constructs `CpiInterpolationType.Linear` instead of refusing it (#847), so the tests are reworked to assert the interpolated behaviour rather than the old rejection. **Interpolated helper coverage:** * Replace `test_an_interpolated_helper_is_refused` with a test verifying that the interpolated swap widens its observation window one month past the flat collapse and pins its pillar to the dominant interpolation weight, contrasting `Pillar.LastRelevantDate` and `Pillar.MaturityDate`. * Add `test_an_interpolated_lag_short_of_an_index_period_is_rejected` to confirm the Linear path requires a full index period of observation lag on top of availability lag, while the flat path accepts the same lag. **Test helper:** * Add `_one_helper` to build a single front-quote helper parameterised by interpolation type, pillar, and observation lag for construction-level assertions the bootstrap fixture does not vary.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The interpolated path of YearOnYearInflationSwapHelper was previously
refused rather than ported. It now widens the date window a month past
the flat one, picks a pillar from the interpolation weight or the
maturity, and enforces a whole index period of observation lag on top
of the index's availability lag.
The Flat arm now sets its pillar date explicitly where it previously
set none, but pillar_date() returns fixing_period.0 either way, so
there is no observable change and the_flat_helper_pins_one_date passes
unchanged. This mirrors the zero side's documented choice.
Closes #847