Skip to main content

Module ldf

Module ldf 

Source
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:

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§

DevelopmentFactorEngine
Section 2 development-factor service.
DevelopmentFactors
Selected age-to-age factors and cumulative development factors.
LinkRatioDiagnostic
Numerator/denominator trail for one selected link ratio.

Enums§

LdfSelectionMethod
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 to simple_average on that link.
geometric_average
Geometric average of positive observed individual link ratios at each development period. Emits 1.0 if 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 matches cdf. Emits NaN where cdf[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 length n − 1.
simple_average_last_n
Simple-average LDF restricted to the last last_n origin 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_n origin 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. Setting weights[i * n_devs + j] = 0.0 excludes origin i from development link j -> j + 1.