chainladder - Property and Casualty Loss Reserving in Python
This package is highly inspired by the popular R ChainLadder package and where equivalent procedures exist, has been heavily tested against the R package.
A goal of this package is to be minimalistic in needing its own API. To that end, we've adopted as much of the pandas API for data manipulation and the scikit-learn API for model construction as possible. The idea here is to allow an actuary already versed in these tools to easily pick up this package. We figure an actuary who uses python has reasonable familiarity with pandas and scikit-learn, so they can spend as little mental energy as possible learning yet another API.
Please visit the Documentation page for examples, how-tos, and source code documentation.
Tutorial notebooks are available for download here.
- Working with Triangles
- Selecting Development Patterns
- Extending Development Patterns with Tails
- Applying Deterministic Methods
Have a question?
Feel free to reach out on Gitter.
Want to contribute?
Check out our contributing guidelines.
To install using pip:
pip install chainladder
Alternatively, install directly from github:
pip install git+https://github.com/casact/chainladder-python/
Note: This package requires Python 3.5 and later, numpy 1.12.0 and later, pandas 0.23.0 and later, scikit-learn 0.18.0 and later.
New in version
chainladder now supports CUDA-based GPU computations by way of CuPY. You can now swap
cupy to switch between CPU and GPU-based computations.
Array backends can be set globally:
import chainladder as cl cl.array_backend('cupy')
Alternatively, they can be set per
Note you must have a CUDA-enabled graphics card and CuPY installed to use the GPU backend.