phew


Namephew JSON
Version 1.1.0 PyPI version JSON
download
home_page
Summarya library housing basic mathematical and statistical formulae used in insurance.
upload_time2024-03-03 18:11:20
maintainer
docs_urlNone
authorPrecious Nliwasa
requires_python>=3.9,<4.0
licenseMIT
keywords social insurance finance travel trip delay social travel insurance trip delay coverage
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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](https://pip.pypa.io/en/stable/) to install phew.

```bash
pip install phew
```

### Usage (examples)

#### Annuity

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

```python
>> 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

```python
>> 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

```python
>> 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

```python
>> 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. 

### Author
+ Name : Precious Nliwasa
+ Email : preciousnliwasa8@gmail.com

### License

[MIT](https://choosealicense.com/licenses/mit/)

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "phew",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.9,<4.0",
    "maintainer_email": "",
    "keywords": "social,insurance,finance,travel,trip,delay,social travel insurance,trip delay coverage",
    "author": "Precious Nliwasa",
    "author_email": "preciousnliwasa8@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/bb/5d/f70c654b98857014c17e572131a48598ffd09c15a023789a0552487a6f4b/phew-1.1.0.tar.gz",
    "platform": null,
    "description": "# phew\n\na library housing basic mathematical and statistical formulae used in insurance.\n\n### Purpose\n\nThe primary objective of this package is to simulate pricing of trip delay insurance \ncoverage for salaried formal sector workers in Malawi who take buses when traveling \nlong distances. This package lays mathematical framework for calculation of losses \nassociated with the delays and contains functions for calculation of different financial \nand economical variables.\n\n### Features\n\n+ Annuity\n+ Cost of living adjustment (COLA)\n+ Expenses\n+ Loss given delay\n+ Premium\n+ Time value\n+ Interest rates\n\n### Installation\n\nUse the package manager [pip](https://pip.pypa.io/en/stable/) to install phew.\n\n```bash\npip install phew\n```\n\n### Usage (examples)\n\n#### Annuity\n\npresent value of an annuity certain can be calculated by the code below\n\n```python\n>> from phew import Annuity\n>> annuity = Annuity(interest_rate = 0.1,number_of_terms = 4,amount = 500)\n>> annuity.certain_present_value()\n>> 1584.9327231746472\n```\n\n#### Interest rates\n\neffective annual rate of interest can be calculated by the code below\n\n```python\n>> from phew import Interest_rates\n>> rate = Interest_rates.compute.effective_interest_rate(nominal_interest_rate = 0.12,number_of_compounding_periods = 12)\n>> rate\n>> 0.12682503013196977\n```\n\n#### COLA\nGrowth of a fund given inflation values can be estimated by the following code\n\n```python\n>> from phew import Cola\n>> cola = Cola(initial_fund = 1000,data = [0.12,0.2,0.21],method = 'inflation')\n>> cola.fund_growth()\n>> array([1120.  , 1344.  , 1626.24])\n```\n\n#### Premium \n\nGross rate can be calculated by the following code\n\n```python\n>> from phew import Premium\n>> gross_rate = Premium.gross_rate(pure_premium = 2000,expense_ratio = 0.23)\n>> gross_rate\n>> 2597.402597402597\n```\n\n\n### About project\n\nThe author is not encouraging use of this package in production. \n\n### Author\n+ Name : Precious Nliwasa\n+ Email : preciousnliwasa8@gmail.com\n\n### License\n\n[MIT](https://choosealicense.com/licenses/mit/)\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "a library housing basic mathematical and statistical formulae used in insurance.",
    "version": "1.1.0",
    "project_urls": null,
    "split_keywords": [
        "social",
        "insurance",
        "finance",
        "travel",
        "trip",
        "delay",
        "social travel insurance",
        "trip delay coverage"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c2ccd6602b7055ad08d7e5503961cca75d0e6f70865e542a9e80a9934ca70d28",
                "md5": "91dc398f45a803fd1e0ceaa4168ddab9",
                "sha256": "c6b9a3bba85ca0552a015850931025d39d35ee3c642b2dc183968f127c9b46e2"
            },
            "downloads": -1,
            "filename": "phew-1.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "91dc398f45a803fd1e0ceaa4168ddab9",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9,<4.0",
            "size": 8619,
            "upload_time": "2024-03-03T18:11:18",
            "upload_time_iso_8601": "2024-03-03T18:11:18.449375Z",
            "url": "https://files.pythonhosted.org/packages/c2/cc/d6602b7055ad08d7e5503961cca75d0e6f70865e542a9e80a9934ca70d28/phew-1.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "bb5df70c654b98857014c17e572131a48598ffd09c15a023789a0552487a6f4b",
                "md5": "a2410f247faac964eee8adfd37eb47d2",
                "sha256": "9047a40f8b4bbe41e508a46241048549130129cecb7961e362b703676502dddb"
            },
            "downloads": -1,
            "filename": "phew-1.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "a2410f247faac964eee8adfd37eb47d2",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9,<4.0",
            "size": 9279,
            "upload_time": "2024-03-03T18:11:20",
            "upload_time_iso_8601": "2024-03-03T18:11:20.389783Z",
            "url": "https://files.pythonhosted.org/packages/bb/5d/f70c654b98857014c17e572131a48598ffd09c15a023789a0552487a6f4b/phew-1.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-03 18:11:20",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "phew"
}
        
Elapsed time: 0.19680s