Expand description
Age-to-age development factors and CDF construction.
This module is the Section 2 bridge:
cumulative triangle -> selected age-to-age LDFs -> CDFs -> maturity %Three layers, all in this file:
- L0 columnar kernels — operate on flat row-major slices and
caller-provided output buffers (e.g.
volume_weighted_ldfs,cdfs_from_ldfs). Used by the WASM hot path and the columnar Mack / Brosius engines. - L1 view convenience — take a
TriangleViewand return ownedVec<f64>(e.g.volume_weighted,simple_average,cdf_from_ldf). Used by tests, the unchecked WASM path, and the internal raw projection helpers. - L2 service / engine — validated entry points returning a typed
DevelopmentFactorsresult (seeDevelopmentFactorEngine).
Input is a row-major cumulative triangle; unobserved cells are NaN.
Each LDF vector has length n − 1; the trailing tail factor (dev n − 1
→ ultimate) is supplied by the caller.
Structs§
- Development
Factor Engine - Section 2 development-factor service.
- Development
Factors - Selected age-to-age factors and cumulative development factors.
- Link
Ratio Diagnostic - Numerator/denominator trail for one selected link ratio.
Enums§
- LdfSelection
Method - Selected development factor family.
Functions§
- cdf_
from_ ldf - Convert age-to-age LDFs into cumulative development factors (CDFs).
- cdfs_
from_ ldfs - CDFs from selected LDFs using the convention:
- ex_
hi_ lo - Ex-hi / ex-lo (trimmed mean) of individual age-to-age ratios:
f_j = mean of the individual ratios after dropping the single max and single min. When fewer than 3 ratios are available for a link, falls back tosimple_averageon that link. - geometric_
average - Geometric average of positive observed individual link ratios at each
development period. Emits
1.0if no positive links exist. - is_
observed_ right_ triangle - Return whether cell
(i, j)is observed under right-triangle geometry. - latest_
maturity_ percentages - Latest maturity percentage by origin under right-triangle geometry.
- median
- Median of individual age-to-age ratios for each development link.
- pct_
reported - Percent-reported vector from CDFs:
pct[j] = 1 / cdf[j]. Length matchescdf. EmitsNaNwherecdf[j]is non-positive. - simple_
average - Simple (straight) average of individual age-to-age ratios:
f_j = mean_i( C_{i, j+1} / C_{i, j} ). Each origin contributes equal weight regardless of loss size. Returns a vector of lengthn − 1. - simple_
average_ last_ n - Simple-average LDF restricted to the last
last_norigin years. - volume_
weighted - Volume-weighted all-year LDF:
f_j = Σ_i C_{i, j+1} / Σ_i C_{i, j}summing over origins where both cells are observed (i ≤ n − j − 2). - volume_
weighted_ last_ n - Volume-weighted average restricted to the last
last_norigin years. - volume_
weighted_ ldf - Volume-weighted age-to-age LDF for one development age.
- volume_
weighted_ ldf_ observed_ counts - Volume-weighted age-to-age LDF for arbitrary observed row widths.
- volume_
weighted_ ldfs - Volume-weighted LDFs for all development links (row-major cache-friendly accumulation).
- volume_
weighted_ ldfs_ observed_ counts - Volume-weighted LDFs for arbitrary observed row widths.
- volume_
weighted_ link_ diagnostic - Diagnostic numerator/denominator trail for one volume-weighted LDF.
- volume_
weighted_ link_ diagnostic_ observed_ counts - Diagnostic numerator/denominator trail for arbitrary observed row widths.
- weighted_
volume_ ldfs - Volume-weighted LDFs with an explicit row-major cell weight/exclusion mask
of length
n_origins * n_devs. Settingweights[i * n_devs + j] = 0.0excludes originifrom development linkj -> j + 1.