# lifetable¶

Source module to create LifeTable space from.

This is a source module to create LifeTable space and its sub spaces from.

This module is passed to import_module method to create a space that contains cells that defines life tables and commutation functions, for a selected combination of Sex, IntRate and MortalityTable.

MortalityTable and Sex are used in qx() below to identify the mortality rates to be applied.

Example

Sample script:

from modelx import *
space = new_model().import_module(module=lifetable)
space.Sex = 'M'
space.IntRate = 0.03
space.MortalityTable = lambda sex, x: 0.001 if x < 110 else 1


References

Project Templates

This module is included in the following project templates.

References in Sub

simplelife.lifetable.Sex

‘M’ or ‘F’ to indicate male or female column in the mortality table.

simplelife.lifetable.IntRate

The constant interest rate for discounting.

simplelife.lifetable.MortalityTable

The ultimate mortality table by sex and age.

Cells

 AnnDuenx(x, n[, k, f]) The present value of an annuity-due. AnnDuex(x, k[, f]) The present value of a lifetime annuity due. Ax(x[, f]) The present value of a lifetime assurance on a person at age x payable immediately upon death, optionally with an waiting period of f years. Axn(x, n[, f]) The present value of an assurance on a person at age x payable immediately upon death, optionally with an waiting period of f years. Cx(x) The commutation column $$\overline{C_x}$$. Dx(x) The commutation column $$D_{x} = l_{x}v^{x}$$. Exn(x, n) The value of an endowment on a person at age x payable after n years Mx(x) The commutation column $$M_x$$. Nx(x) The commutation column $$N_x$$. disc() The discount factor $$v = 1/(1 + i)$$. dx(x) The number of persons who die between ages x and x+1 lx(x) The number of persons remaining at age x. qx(x) Probability that a person at age x will die in one year.
simplelife.lifetable.disc()[source]

The discount factor $$v = 1/(1 + i)$$.

simplelife.lifetable.lx(x)[source]

The number of persons remaining at age x.

simplelife.lifetable.dx(x)[source]

The number of persons who die between ages x and x+1

simplelife.lifetable.qx(x)[source]

Probability that a person at age x will die in one year.

simplelife.lifetable.Dx(x)[source]

The commutation column $$D_{x} = l_{x}v^{x}$$.

simplelife.lifetable.Cx(x)[source]

The commutation column $$\overline{C_x}$$.

simplelife.lifetable.Nx(x)[source]

The commutation column $$N_x$$.

simplelife.lifetable.Mx(x)[source]

The commutation column $$M_x$$.

simplelife.lifetable.Ax(x, f=0)[source]

The present value of a lifetime assurance on a person at age x payable immediately upon death, optionally with an waiting period of f years.

$\require{enclose}{}_{f|}\overline{A}_{x}$
simplelife.lifetable.Axn(x, n, f=0)[source]

The present value of an assurance on a person at age x payable immediately upon death, optionally with an waiting period of f years.

$\require{enclose}{}_{f|}\overline{A}^{1}_{x:\enclose{actuarial}{n}}$
simplelife.lifetable.Exn(x, n)[source]

The value of an endowment on a person at age x payable after n years

${}_{n}E_x$
simplelife.lifetable.AnnDuenx(x, n, k=1, f=0)[source]

The present value of an annuity-due.

$\require{enclose}{}_{f|}\ddot{a}_{x:\enclose{actuarial}{n}}^{(k)}$
Parameters: x (int) – age n (int) – length of annuity payments in years k (int, optional) – number of split payments in a year f (int, optional) – waiting period in years
simplelife.lifetable.AnnDuex(x, k, f=0)[source]

The present value of a lifetime annuity due.

Parameters: x (int) – age k (int, optional) – number of split payments in a year f (int, optional) – waiting period in years