Skip to main content

parallelogram_onlevel_factor

Function parallelogram_onlevel_factor 

Source
pub fn parallelogram_onlevel_factor(
    rate_changes: &[f64],
    earned_weights: &[f64],
) -> Result<f64, ValidationError>
Expand description

Parallelogram-style on-level factor from sequential rate changes and earned exposure weights across each rate-level regime.

For k sequential rate changes r_1, ..., r_k, there are k + 1 rate-level regimes: L_0 = 1.0, L_1 = 1 + r_1, …, L_k = prod_{j=1}^k (1 + r_j). Pass earned_weights of length k + 1 corresponding to those k + 1 regimes (weights are automatically normalized by their sum so any non-negative exposure/area weights work). Returns L_k / sum_j (w_j L_j).