lifelib: Actuarial models in Python


lifelib is a collection of actuarial projection models. lifelib models are built as modelx models, ready to be used out of the box with sample formulas and input files, and they are fully customizable by users.

Latest Updates

How lifelib works

You can create an actuarial projection model as modelx Model object by:

  • Creating a project folder from a lifelib project template,
  • Build a modelx Model from source modules and input data in the project, by running build function.

Once the model is built, they are available as a modelx Model object in Python console. The model is composed of Space. Spaces contain Cells and other spaces. Cells are much like cells in spreadsheets, which in turn, can store formulas and associated values.

With a lifelib model, you can:

  • Get calculated values by simply accessing model elements,
  • Change the model by changing input and writing formulas in Python,
  • View the tree of model elements in graphical user interface,
  • Output results to Pandas objects,
  • Save the model, load it back again, and do much more.

Start from Quick Start page.

Feature highlights

  • Formulas and their calculated values paired as Cells, just like spreadsheet cells
  • Relevant cells grouped together as a Space, just like a spreadsheet
  • Spaces in other spaces (subspaces), forming trees of spaces
  • Object-oriented Model composed of spaces
  • Space inheritance
  • Parametrized dynamic subspaces created automatically
  • Saving to / loading from files
  • Conversion to Pandas objects
  • Reading data from Excel files
  • Cells graph to track cells interdependency

Why lifelib?

  • Better model integrity and extensibility
  • For readable formula expressions
  • For eliminating spreadsheet errors
  • For better version control/model governance

What for?

  • Pricing / Profit testing
  • Model validation / testing
  • Prototyping for production models
  • As corporate models
  • For simulations
  • As replacement for any spreadsheet models

Got questions?

If you have troubles to shoot, questions to be answered, post them on stackoverflow and add lifelib tag to the posts. If you find bugs or want to request new features, submit issues on lifelib development site on github.