Skip to main content

Life actuarial models in Python

https://img.shields.io/pypi/pyversions/lifelib https://img.shields.io/pypi/v/lifelib https://img.shields.io/pypi/l/lifelib

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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lifelib-0.16.0.tar.gz (22.2 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lifelib-0.16.0-py3-none-any.whl (22.9 MB view details)

Uploaded Python 3

File details

Details for the file lifelib-0.16.0.tar.gz.

File metadata

  • Download URL: lifelib-0.16.0.tar.gz
  • Upload date:
  • Size: 22.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for lifelib-0.16.0.tar.gz
Algorithm Hash digest
SHA256 fd0a7f7796ebc6f972a4321c2b770b2708c7d418d223939cda3ce7fe1a6fe43b
MD5 e42c43a6c298b01613a9e40dc1c0f82c
BLAKE2b-256 038c8f0884a3be088b5ffc85c183ef60340c53ab2bbe5bfd444a62e0a2226b2d

See more details on using hashes here.

File details

Details for the file lifelib-0.16.0-py3-none-any.whl.

File metadata

  • Download URL: lifelib-0.16.0-py3-none-any.whl
  • Upload date:
  • Size: 22.9 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for lifelib-0.16.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ab06cc72a557ec8d73e014dd9137efaac906bb7fa410e3f5cc398fdf3e0c251c
MD5 a4537a8fa4917ca5e2431c6fbfbaedc1
BLAKE2b-256 8b8c60613bd4955ae1ff19ba35123d7d0eee874ff1d7033c2f688e0d16ba37b8

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.16.0 This release

2 files

0.15.0

2 files

0.14.0

2 files

0.13.0

2 files

0.12.0

2 files

0.11.0

2 files

0.10.1

2 files

0.10.0

2 files

0.9.5

2 files

0.9.4

2 files

0.9.3

2 files

0.9.2

2 files

0.9.1

2 files

0.9.0

2 files

0.8.1

2 files

0.8.0

2 files

0.7.0

2 files

0.6.0

2 files

0.5.0

2 files

0.4.1

2 files

0.4.0

2 files

0.3.3

2 files

0.3.2

2 files

0.3.1

2 files

0.3.0

2 files

0.2.0

2 files

0.1.1

2 files

0.1.0

2 files

0.0.19

2 files

0.0.18

2 files

0.0.17

2 files

0.0.16

2 files

0.0.15

2 files

0.0.14

2 files

0.0.13

2 files

0.0.12

2 files

0.0.11

2 files

0.0.10

2 files

0.0.9

2 files

0.0.8

2 files

0.0.7

2 files

0.0.6

2 files

0.0.5

2 files

0.0.4

2 files

0.0.3

2 files

0.0.2

2 files

0.0.1

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page