chainladder
$
npx mdskill add mkurman/zorai/chainladderEstimate insurance reserves using Python actuarial methods.
- Calculates loss reserves from claims triangles and development patterns.
- Integrates with Python libraries for statistical modeling and data loading.
- Selects methods like Chain Ladder or Bornhuetter-Ferguson based on input data.
- Outputs reserve estimates, age-to-age factors, and conditional standard errors.
SKILL.md
.github/skills/chainladderView on GitHub ↗
---
name: chainladder
description: "Property & casualty insurance loss reserving in Python. Chain ladder, Bornhuetter-Ferguson, Cape Cod, bootstrap simulation, and loss development pattern estimation. Actuarial triangle operations."
tags: [insurance, actuarial, loss-reserving, chain-ladder, p-and-c, claims, zorai]
---
## Overview
ChainLadder implements actuarial reserve estimation methods for property & casualty insurance. Use it for loss reserving, claims triangles, and actuarial modeling in Python.
## Installation
```bash
uv pip install chainladder
```
## Basic Triangle and Reserve
```python
import chainladder as cl
# Load sample auto liability triangle
tri = cl.load_dataset("RAA")
print(tri)
# Select development pattern
dev = cl.Development().fit_transform(tri)
# Run chain ladder method
model = cl.ChainLadder().fit(dev)
print(model.reserve_)
print(model.ldf_) # age-to-age factors
```
## Mack Bootstrap
```python
# Estimate reserve variability
mack = cl.MackChainLadder().fit(dev)
print(mack.reserve_)
print(f"CV: {mack.reserve_.std() / mack.reserve_.sum():.2%}")
print(mack.conditional_standard_error_)
```
## Bornhuetter-Ferguson
```python
bf = cl.BornhuetterFerguson().fit(dev)
print(bf.reserve_)
print(bf.expected_loss_) # a priori expected loss
```
## References
- [ChainLadder docs](https://chainladder-python.readthedocs.io/)
- [CAS reserving principles](https://www.casact.org/)More from mkurman/zorai
- account-management>
- agile-scrum>
- albumentationsFast image augmentation library (Albumentations). 70+ transforms for classification, segmentation, object detection, keypoints, and pose estimation. Optimized OpenCV-based pipeline with unified API across all CV tasks. Supports images, masks, bounding boxes, and keypoints simultaneously. Note: classic Albumentations (MIT) is no longer maintained; successor AlbumentationsX uses AGPL-3.0. For torchvision-native augmentations, use torchvision.transforms.v2.
- aml-complianceAnti-Money Laundering (AML) and Know Your Customer (KYC) compliance workflow. Sanctions screening, PEP detection, transaction monitoring, suspicious activity reporting (SAR), and OFAC compliance.
- anki-connectThis skill is for interacting with Anki through AnkiConnect, and should be used whenever a user asks to interact with Anki, including to read or modify decks, notes, cards, models, media, or sync operations.
- approval-checkpoint-long-taskCanonical long-task pack for daemon-managed work with deliberate approval checkpoints, status summaries, rollback notes, and mobile-safe governance-aware updates.
- auditing-goal-artifactsUse when reviewing recent zorai goal run outputs, closure markers, ledgers, or evidence bundles to judge whether completion is credible or to identify remaining uncertainty.
- autogenAutoGen (Microsoft) — multi-agent conversation framework. Agent-to-agent chat, code generation & execution, tool use, group chat, and human-in-the-loop. Build collaborative AI systems with specialized agents.
- backtraderPython backtesting framework for trading strategies. Data feeds, brokers, analyzers, and live trading support. Strategy development with commission models, slippage, and signal-based execution.
- beautiful-mermaidRender Mermaid diagrams as SVG and PNG using the Beautiful Mermaid library. Use when the user asks to render a Mermaid diagram.