Skip to content

feat(indexes): add quoted year-on-year inflation index siblings - #866

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

feat(indexes): add quoted year-on-year inflation index siblings#866
benbenbang merged 2 commits into
mainfrom
fable/836

Conversation

@benbenbang

@benbenbang benbenbang commented Aug 12, 2026

Copy link
Copy Markdown
Owner
  • feat(indexes): add quoted year-on-year inflation index siblings
  • feat(inflationcapfloor): add last year-on-year inflation coupon accessor

close #836

Add the quoted year-on-year variants alongside the existing zero
inflation indexes, each beside the zero index sharing its C++ header.

**New year-on-year indexes:**
* Added `YyUkRpi` (`YY_RPI`) in `ukrpi.rs`, mirroring the C++ `YYUKRPI`
  constructor over a `YoYInflationIndex`.
* Added `YyEuHicp` (`YY_HICP`) and `YyEuHicpXt` (`YY_HICPXT`) in
  `euhicp.rs`, differing from each other in family name alone.
* Each is a zero-sized namespace whose `new` returns a plain
  `YoYInflationIndex` with an empty curve handle, left for
  `with_term_structure` to link.

**Re-exports:**
* Exported the new indexes flat from `inflation/mod.rs` and
  `indexes/mod.rs`.

**Tests:**
* Added construction tests asserting each index's name, frequency,
  revised, ratio, underlying index, availability lag and currency.

Closes #836
Add `last_yoy_inflation_coupon` on `YoYInflationCapFloor`, porting
`lastYoYInflationCoupon` (`.cpp:109-115`). The port holds coupons
concrete and `new` refuses an empty leg, so the accessor is infallible
where C++ can hand back a null pointer.

A three-coupon fixture test confirms the accessor returns the leg's
tail rather than its front.

Closes #856

close #836
@benbenbang
benbenbang enabled auto-merge (rebase) August 12, 2026 13:06
@github-actions github-actions Bot added the enhancement New feature or request label Aug 12, 2026
@benbenbang
benbenbang merged commit 273164a into main Aug 12, 2026
3 of 6 checks passed
@benbenbang
benbenbang deleted the fable/836 branch August 12, 2026 13:09
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] Named year-on-year indexes: YYUKRPI, YYEUHICP, YYEUHICPXT

1 participant