Skip to main content

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.

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

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

actymath-0.1.3.tar.gz (15.4 kB view details)

Uploaded Source

Built Distribution

actymath-0.1.3-py3-none-any.whl (18.6 kB view details)

Uploaded Python 3

File details

Details for the file actymath-0.1.3.tar.gz.

File metadata

  • Download URL: actymath-0.1.3.tar.gz
  • Upload date:
  • Size: 15.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.2 CPython/3.11.2 Darwin/22.5.0

File hashes

Hashes for actymath-0.1.3.tar.gz
Algorithm Hash digest
SHA256 f9d3c2d4803c9246ede75ae50c2595221e9aa67ad67af9e0f83b730f656014fe
MD5 71fe5f06954717bbc48c4153d33fbdea
BLAKE2b-256 37c6142cecf9e85628136a2b24b94e9475597bbf6e35f10f451497d99fac281b

See more details on using hashes here.

File details

Details for the file actymath-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: actymath-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 18.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.2 CPython/3.11.2 Darwin/22.5.0

File hashes

Hashes for actymath-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 25e4f0a53c4a6ee9f9477bb709be418f1c8f727201d406b30d1242636da5a092
MD5 493485a71705b3a07f0dcef29c4bab82
BLAKE2b-256 4ec0a4c73fe3dbf84febe40058fef06be16e1803809e7481cea0822bbb9f238c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page