Skip to main content

Elizur is a finance library for actuaries, finance professionals, and students.

Project description


License: GPL v3 Build Status PyPI version Coverage Status Code style: black

Elizur is an open source finance library for actuaries, finance professionals, and students. The library currently helps with calculating present values, future values, expected present values, life contingencies, and other common procedures performed by professionals and students. The library is free of charge, open source, well tested, documented, and depends only on the Python 3 standard library at runtime. The Elizur project is named after Elizur Wright.

If you like Elizur, support the project by clicking the :star: above!



pip install elizur


Read the library documentation here


Given an interest rate calculate a discount factor

>>> import as ann
>>> ann.discount_factor(0.07)

Given a term and interest rate calculate the present value of an annuity

>>> import as ann
>>> ann.annuity_pv(n=10, i=0.07)

Given a term and interest rate calculate the present value of an annuity increasing by one each period

>>> import as ann
>>> ann.increasing_annuity_pv(n=10, i=0.07)

Given a mortality table calculate life contingencies and probabilities

>>> from import LifeTable, EXAMPLE_TABLE
>>> life_table = LifeTable(EXAMPLE_TABLE)
>>> life_table.qx(0)
>>> life_table.qx(77)
>>> life_table.tqxn(3, 2, 77)
>>> life_table.Ax(0, 0.07)
>>> life_table.IAxn(0, 0.07, 30)
>>>, 0.07)
>>> life_table.axn_due(0, 0.07, 30)

Given a set of cash flows, probabilities, and interest rates calculate the expected present value

>>> from import expected_present_value
>>> expected_present_value(
>>>    cash_flows=(10, 11, 12),
>>>    probabilities=(0.99, 0.98, 0.97),
>>>    interest_rates=(0.05, 0.06, 0.07)
>>> )

Import a mortality table in a specific SOA CSV format and perform life contingency calculations. Download a mortality table in csv format from the SOA here. This example uses the first table, 1941 CSO Basic Table ANB.

>>> from import read_soa_csv_mort_table  
>>> from import LifeTable
>>> mort_table = read_soa_csv_table("1941_cso_basic_table_anb.csv")
>>> life_table = LifeTable(mort_table["values"])
>>> life_table.qx(77)
>>> life_table.Ax(0, 0.07)

There are many other possibilities. Check out the reference section of the docs for a full list of functionality.


If you have questions, suggestions, or just want to talk about using Python join us on Slack here.


Do you want to help this project without contributing code? Take our survey here.

Otherwise checkout the contributing guide here if you like to contribute code or raise issues.

New to Python?

Project details

Download files

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

Files for elizur, version 0.1.2
Filename, size File type Python version Upload date Hashes
Filename, size elizur-0.1.2-py3-none-any.whl (20.9 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size elizur-0.1.2.tar.gz (8.3 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page