lifelib: Actuarial models in Python


What is lifelib?

lifelib is a collection of open-source life actuarial models written in Python. You can run the models right out of the box, customize them in any way you want, or create your own models from scratch.

Latest Updates

… See more updates

Feature highlights

  • Readable formulas
  • Multidimensional data structure
  • Instant evaluation
  • Dependency tracking (Under development)
  • Reusable code
  • Object oriented models
  • Interface with Excel/Pandas
  • Version control
  • Documentation integration

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.

Why lifelib?

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

What for?

  • For research/educational projects
  • As communication tools to convey model specifications
  • Model validation / testing
  • Prototyping for production models
  • Pricing / Profit testing
  • 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. Or, connect with Fumito Hamamura on Linkedin and send a message to him (May take about a week to respond).