All projects

Reserving · Actuarial

loss-modelling

Claims development triangles, chain ladder projections and Mack reserve uncertainty in plain, readable Python, validated against published benchmarks.

  • Active
  • MIT licence
  • Python
  • pandas
  • Chain Ladder
  • Mack
  • Open Source

Why it exists

Reserving is central to every insurer’s balance sheet, yet the methods are often locked in spreadsheets or large libraries that are hard to read. loss-modelling keeps each method as a short, referenced function, so actuaries, students and data engineers can see exactly how a reserve is calculated, and trust it because the tests reproduce published results.

What it does today

  • A Triangle built from incremental arrays or straight from claim movements (for example the output of a SQL query)
  • Chain ladder with volume weighted development factors
  • Mack (1993) standard errors for each origin year and the total reserve
  • The Taylor and Ashe (1983) benchmark triangle, with tests that match Mack’s published figures exactly
from loss_modelling import mack, taylor_ashe

result = mack(taylor_ashe())
print(f"{result.total_reserve:,.0f} +/- {result.total_std_error:,.0f}")
# 18,680,856 +/- 2,447,095

Where it is going

  • Bornhuetter-Ferguson and Cape Cod
  • Tail factors and factor exclusions
  • Bootstrap ODP for full reserve distributions
  • Helpers for computing development periods from dates

The full list is in the roadmap.

Get involved

Good first contributions include alternative averaging methods, more public benchmark triangles and paid versus incurred views. Read the contributing guide to get started.

Background: Data modelling for insurance analytics, which shows how to build these triangles from claim movements.