actymath
Actuarial formulae and commutation functions for life insurance products (with a fast Pandas backend)
Read this first
This started out as a package to build up the various actuarial formulae using the Pandas backend for speed.
The way it works is to create a 'grid' of actuarial calculation vectors in a pandas DataFrame that you can use for a single policy or a single cohort.
When you ask for a particular actuarial formula or calculation to be created, it will spawn the columns needed to generate it.
Everything is using Pandas in the backend, so you can use any normal Pandas machinery you like.
This is very much 'in development'.
Usage
Installation
Install using pip
pip install actymath
Getting started
This getting started notebook illustrates how to use the package with a simple example.
Actuarial formula
The formula definitions are called columns in this package as they spawn columns in a pandas DataFrame.
These formulae can be explored in the actymath/columns directory.
Mortality tables
Currently only a few old standard mortality tables are implemented, but there is support for 1D and 2D mortality tables here.
New 1D and 2D mortality tables can be loaded in from CSV or pandas DataFrames.
Contributing
Feel free to contribute or suggest improvements.
-
Add suggested improvements as a GitHub issue on this project
-
Pull requests also welcomed, particularly for any fixes, new tables or useful actuarial formulae
Developer setup
Clone this repository using
git clone git@github.com:ttamg/actymath.git
Dependencies use poetry so make sure you have poetry already installed on you development machine.
With poetry, you create a new virtual environment for yourself and activate it using
poetry shell
To install all the dependencies in your new virtual environment, use
poetry install
Running tests
We use pytest for all testing. Run the test pack using
pytest
Metadata
Release files for actymath 0.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| actymath-0.1.4.tar.gz | 14.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| actymath-0.1.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 33.4 kB
Release files / actymath-0.1.4.tar.gz
| Download URL | actymath-0.1.4.tar.gz |
|---|---|
| Size | 14.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b43a98799e458b1da4be15ee3f0222d7f560ac504db4e350c6fa41c3c3707ae2
|
|
BLAKE2b-256 checksum How to use checksums |
584238d1485dbbeddadb0c0a686b81f84d015ec790561f0c5e8201f09e3d3252
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.3 CPython/3.13.2 Darwin/24.5.0
|
Release files / actymath-0.1.4-py3-none-any.whl
| Download URL | actymath-0.1.4-py3-none-any.whl |
|---|---|
| Size | 18.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
28381d3c9f1f39081d75458eb92cad215ce506e5d73d254f54ebab4cade03aa7
|
|
BLAKE2b-256 checksum How to use checksums |
211a176da088e86ea3fbbcea25904c28bca07159841f3a90850ad6cb5b6ef4b3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.3 CPython/3.13.2 Darwin/24.5.0
|