feat(indexes): add quoted year-on-year inflation index siblings - #866
Merged
Conversation
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
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.
close #836