Skip to content

feat(crates): port interpolated year-on-year swap helper branch - #862

Merged
benbenbang merged 2 commits into
mainfrom
fable/847
Aug 12, 2026
Merged

feat(crates): port interpolated year-on-year swap helper branch#862
benbenbang merged 2 commits into
mainfrom
fable/847

Conversation

@benbenbang

Copy link
Copy Markdown
Owner

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

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
benbenbang enabled auto-merge (squash) August 12, 2026 10:40
@github-actions github-actions Bot added the enhancement New feature or request label Aug 12, 2026
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.
@benbenbang
benbenbang merged commit 74a07d7 into main Aug 12, 2026
3 checks passed
@benbenbang
benbenbang deleted the fable/847 branch August 12, 2026 11:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Inflation][YoY] Interpolated (CPI::Linear) YearOnYearInflationSwapHelper branch

1 participant