Actuarial Math and commutation functions for life insurance product - with a Pandas backend
Project description
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.
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
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file actymath-0.1.1.tar.gz
.
File metadata
- Download URL: actymath-0.1.1.tar.gz
- Upload date:
- Size: 15.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.5 CPython/3.8.2 Darwin/20.4.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 333e6d6323a7c7f8af5e834b3cf8b9a4ba1581dcfa32848bd09be94997c31053 |
|
MD5 | cd2c3368027496c6b0bf0b0935f51cf1 |
|
BLAKE2b-256 | 37ad422c3c681e47959a0ad36834ba8120d94c859dc12b42d084e0f0966c8ade |
File details
Details for the file actymath-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: actymath-0.1.1-py3-none-any.whl
- Upload date:
- Size: 18.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.5 CPython/3.8.2 Darwin/20.4.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c1b42ed14beaedfa8db8af1f6cfb4f1b4536454e1fc77f9eebf2c323bef0dff5 |
|
MD5 | 2362ba42851f33de5bbd3d3520e4b329 |
|
BLAKE2b-256 | 29f8901218f81998d94d5463dcf90a777fe6704eb4644ed774067181023dc599 |