Skip to main content

Module ragged

Module ragged 

Source
Expand description

Factor selection for rectangular cumulative triangles.

Inputs are row-major losses in consistent units; counts identify each row observed prefix at the caller’s valuation date. No calendar assumptions are introduced here. Unselectable links produce NaN; callers validate results.

Functions§

ex_hi_lo_observed_counts
Counts-aware ex-hi/lo (drop largest and smallest ratio per link; fall back to simple average when fewer than 3 pairs).
simple_average_observed_counts
Counts-aware simple average. last_n=Some(k) restricts to the k most recent eligible origins per link (origins are ordered with oldest first).
volume_weighted_last_n_observed_counts
Counts-aware volume-weighted, restricted to the last_n most recent eligible origins (largest index = most recent in the right-triangle convention).