fractional

Fractional age assumptions- Computes survival and mortality functions between integer ages.

MIT License. Copyright (c) 2022-2023 Terence Lim

class actuarialmath.fractional.Fractional(udd: bool = True, **kwargs)[source]

Bases: Lifetime

Compute survival functions at fractional ages and durations

Parameters:

udd – select UDD (True, default) or CFM (False) between integer ages

l_r(x: int, s: int = 0, r: float = 0.0) float[source]

Number of lives at fractional age: l_[x]+s+r

Parameters:
  • x – age of selection

  • s – years after selection

  • r – fractional year after selection

p_r(x: int, s: int = 0, r: float = 0.0, t: float = 1.0) float[source]

Probability of survival from and through fractional age: t_p_[x]+s+r

Parameters:
  • x – age of selection

  • s – years after selection

  • r – fractional year after selection

  • t – fractional number of years survived

Examples:

>>> life = Fractional(udd=False).set_survival(l=lambda x,t: 50-x-t)
>>> print(life.p_r(47, r=0.), life.p_r(47, r=0.5), life.p_r(47, r=1.))
q_r(x: int, s: int = 0, r: float = 0.0, t: float = 1.0, u: float = 0.0) float[source]

Deferred mortality rate within fractional ages: u|t_q_[x]+s+r

Parameters:
  • x – age of selection

  • s – years after selection

  • r – fractional year after selection

  • u – fractional number of years survived, then

  • t – death within next fractional years t

Examples

>>> life = Fractional(udd=False).set_survival(l=lambda x,t: 50-x-t)
>>> print(life.q_r(x, r=0.5))
mu_r(x: int, s: int = 0, r: float = 0.0) float[source]

Force of mortality at fractional age: mu_[x]+s+r

Parameters:
  • x – age of selection

  • s – years after selection

  • r – fractional year after selection

f_r(x: int, s: int = 0, r: float = 0.0, t: float = 0.0) float[source]

Lifetime density function at fractional age: f_[x]+s+r (t)

Parameters:
  • x – age of selection

  • s – years after selection

  • r – fractional year after selection

  • t – death at fractional year t

E_r(x: int, s: int = 0, r: float = 0.0, t: float = 1.0) float[source]

Pure endowment at fractional age: t_E_[x]+s+r

Parameters:
  • x – age of selection

  • s – years after selection

  • r – fractional year after selection

  • t – limited at fractional year t

e_r(x: int, s: int = 0, t: float = -999) float[source]

Temporary expected future lifetime at fractional age: e_[x]+s:t

Parameters:
  • x – age of selection

  • s – years after selection

  • t – fractional year limit of expected future lifetime

static e_approximate(e_complete: float = None, e_curtate: float = None, variance: bool = False) float[source]

Convert between curtate and complete expectations assuming UDD shortcut

Parameters:
  • e_complete – complete expected lifetime

  • e_curtate – or curtate expected lifetime

  • variance – to approximate mean (False) or variance (True)

Returns:

approximate complete or curtate expectation assuming UDD

Examples

>>> print(Fractional.e_approximate(e_complete=15))
>>> print(Fractional.e_approximate(e_curtate=15))