﻿ Euler Math Toolbox - Reference

# Mortality and Insurance

Functions to compute life insurances using a table of mortality. The tables are containted in the files pm.dat and pf.dat.

For more information try "help mortality", see the example notebook, or see the snippets in the user menu.

```function map ptodiewithin (agenow:integer, age:integer, gender=male)
```
```  Probablity to between the two ages

agenow : current age
age : later age (inclusive)
gender : male (0) or female (1)
```
```function map ptodiein (agenow:integer, age:integer, gender=male)
```
```  Probablity to die in a specific age

agenow : current age
age : age of death
gender : male (0) or female (1)
```
```function map lifeexpect (age:integer, gender=male)
```
```  Expected life span

age : current age
gender : male (0) or female (1)
```
```function map pension (agenow:integer, agestart:integer, ..
interest:number, gender=male)
```
```  Value of an eternal pension

We assume the pension stops at age 100.

agenow : the current age
agestart : the age, the pension starts
interest : the interest rate (as a fraction, e.g. 5%)
gender : male (0) or female (1)

Returns the value of 1 monetary unit
```
```function pensionv (age:integer, v:real vector, ..
interest:number, gender=male, pay=0)
```
```  Value of payments v,...,v[n]

The functions assumes, that the payments start after one year, but
stop as soon as the person dies. There are at most length(v)
payments.

age : current age
v : vector of payments
interest : the interest rate (as a fraction, e.g. 5%)
gender : male (0) or female (1)
pay : last payment will always be payed
```
```function lifeinsurance (agenow:integer, ageend:integer, ..
interest:number, gender=male, pay=1)
```
```  Risk of a life insurance

This computes the value of a life insurance with payment 1,
starting at an age, and payable at death or an end age (pay=1).
If pay=0, then the end amount will not be payed, and the
amount will only be payed, if the person dies BEFORE the
ending age.

agenow : starting age of the insurance
ageend : ending age of the insurance
interest : the interest rate (as a fraction, e.g. 5%)
gender : male (0) or female (1)
pay : amount will be payed at end (1) or not (0)
```
```function payments (agenow:integer, ageend:integer, ..
interest:number, gender=male)
```
```  Value of payments till end age or death

agenow : start age of payments
ageend : last payment at that age
interest : the interest rate (as a fraction, e.g. 5%)
gender : male (0) or female (1)
```

Documentation Homepage