Skip to main content

a library housing basic mathematical and statistical formulae used in insurance.

Project description

phew

a library housing basic mathematical and statistical formulae used in insurance.

Purpose

The primary objective of this package is to simulate pricing of trip delay insurance coverage for salaried formal sector workers in Malawi who take buses when traveling long distances. This package lays mathematical framework for calculation of losses associated with the delays and contains functions for calculation of different financial and economical variables.

Features

  • Annuity
  • Cost of living adjustment (COLA)
  • Expenses
  • Loss given delay
  • Premium
  • Time value
  • Interest rates

Installation

Use the package manager pip to install phew.

pip install phew

Usage (examples)

Annuity

present value of an annuity certain can be calculated by the code below

>> from phew import Annuity
>> annuity = Annuity(interest_rate = 0.1,number_of_terms = 4,amount = 500)
>> annuity.certain_present_value()
>> 1584.9327231746472

Interest rates

effective annual rate of interest can be calculated by the code below

>> from phew import Interest_rates
>> rate = Interest_rates.compute.effective_interest_rate(nominal_interest_rate = 0.12,number_of_compounding_periods = 12)
>> rate
>> 0.12682503013196977

COLA

Growth of a fund given inflation values can be estimated by the following code

>> from phew import Cola
>> cola = Cola(initial_fund = 1000,data = [0.12,0.2,0.21],method = 'inflation')
>> cola.fund_growth()
>> array([1120.  , 1344.  , 1626.24])

Premium

Gross rate can be calculated by the following code

>> from phew import Premium
>> gross_rate = Premium.gross_rate(pure_premium = 2000,expense_ratio = 0.23)
>> gross_rate
>> 2597.402597402597

About project

The author is not encouraging use of this package in production. For more info, please, email the author.

Author

License

MIT

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

phew-1.2.0.tar.gz (9.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

phew-1.2.0-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

Details for the file phew-1.2.0.tar.gz.

File metadata

  • Download URL: phew-1.2.0.tar.gz
  • Upload date:
  • Size: 9.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.9.13 Windows/10

File hashes

Hashes for phew-1.2.0.tar.gz
Algorithm Hash digest
SHA256 92aa3b2d6d429e08376c9c349fb0735113400dbb23fc74e486e5726f3b72157c
MD5 b56bf138187186e754f176c428a8bd69
BLAKE2b-256 5dd56b334e1062738fe6f7537102dd9cc5be294b8f6d50871cceb33bac94961e

See more details on using hashes here.

File details

Details for the file phew-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: phew-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 8.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.9.13 Windows/10

File hashes

Hashes for phew-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4b916f112fbe9fa88f981a452603f1ad2b27d3abe6bbd19cbd7475817648915b
MD5 7f2bb2dd724bc690bc57c6429ffe5904
BLAKE2b-256 3fc584e9fd46c14c4d65ee6add3a38653aba7c90a70fd01c320e94f96d7efd6e

See more details on using hashes here.

Supported by

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