Actuarial models in Python
Project description
Life actuarial models in Python
What is lifelib?
lifelib is a collection of open-source life actuarial models written in Python. lifelib includes a variety of models, with sample scripts and Jupyter notebooks that demonstrate how to use the models.
Visit https://lifelib.io for more information!
What for?
lifelib models are highly versatile and transparent. You can customize lifelib models and utilize them in various practical areas, such as:
Model validation / testing
Pricing / profit testing
Research / educational projects
Valuation / cashflow projections
Asset-liability modeling
Risk and capital modeling
Actuarial modernization to replace spreadsheet models
Why lifelib?
By effectively utilizing the models in lifelib, you can expect the following benefits from both model development and governance perspectives:
A more efficient, transparent, and faster model development experience
Model integration with the Python ecosystem (Pandas, Numpy, SciPy, etc.)
Elimination of spreadsheet errors
Improved version control and model governance
Automated model testing
Some of the models in lifelib are built using modelx, an open-source Python package for building object-oriented models in Python. By using lifelib, you can enjoy the following advantages:
Models run fast!
Formulas are easy to read
Easy to trace formula dependency and errors
Formulas are instantly evaluated
Pandas and Numpy can be utilized
Object-oriented
Input from Excel and CSV files
Documents can be integrated
Formulas are saved in text files
License
Copyright (c) 2018-2026 lifelib Developers
lifelib is free software; you can redistribute it and/or modify it under the terms of MIT License.
Contributions, productive comments, requests and feedback from the community are always welcome. Information on lifelib development is found at Github https://github.com/lifelib-dev/lifelib
Requirements
The lifelib package requires Python 3.6 or newer, and the following third-party packages.
modelx
networkx 2.0+
Numpy
Pandas
OpenPyXL
lifelib consists of multiple libraries. Each library may have additional requirements in addition to the above.
Development
For developers contributing to lifelib, a Makefile is provided to simplify environment setup and common development tasks.
Quick start:
make init # Set up development environment (use Git Bash or WSL if you use a Windows machine) source venv_lifelib/bin/activate # Activate virtual environment make test # Run tests
Common commands:
make help # Show all available commands make install-dev # Install with dev dependencies make test # Run tests make test-cov # Run tests with coverage report make format # Auto-format code (black, isort) make lint # Check code quality (flake8) make clean # Clean generated files
For detailed information, see devnotes/MAKEFILE.md and devnotes/TESTING.md.
Contributors
2023
@alexeybaran
@fumitoh
@MatthewCaseres
2018-2022
@alexeybaran
@fumitoh
@GregorFabjan
@lewisfogden
@qnity
History
lifelib was first released on January 2nd, 2018.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lifelib-0.12.0.tar.gz.
File metadata
- Download URL: lifelib-0.12.0.tar.gz
- Upload date:
- Size: 18.4 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3693684be12f0bd65d8360d41b416b7aae6a2963d96845e4d134718938ac1650
|
|
| MD5 |
78df7cfecc637c593cd1917e5d77a662
|
|
| BLAKE2b-256 |
57c8f06369d2bc97c16f2962fd5058ef80c4f067fb28551183cf63d861d0b907
|
File details
Details for the file lifelib-0.12.0-py3-none-any.whl.
File metadata
- Download URL: lifelib-0.12.0-py3-none-any.whl
- Upload date:
- Size: 18.7 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6d2421add733dcbf15289296a92ba6e05f995d0ba36bc93abdcd0425fea00b62
|
|
| MD5 |
5940936be197830168ee2515dcb60e2c
|
|
| BLAKE2b-256 |
334b0cc90b5e1a49445dc6b71f8ca291509562b2cd61631b1ed1c0fdd77b681e
|