woolhouse

Woolhouse - 1/mthly insurance and annuities with Woolhouse’s approximation

MIT License. Copyright 2022-2023 Terence Lim

class actuarialmath.woolhouse.Woolhouse(m: int, life: Annuity, three_term: bool = False, approximate_mu: Callable[[int, int], float] | bool = True)[source]

Bases: Mthly

1/m’thly shortcuts with Woolhouse approximation

Parameters:
  • m – number of payments per year

  • life – original fractional survival and mortality functions

  • three_term – whether to include (True) or ignore (False) third term

  • approximate_mu – exact (False), approximate (True) or function for third term

mu_x(x: int, s: int = 0) float[source]

Computes mu_x or calls approximate_mu for third term

Parameters:
  • x – age of selection

  • s – years after selection

whole_life_insurance(x: int, s: int = 0, b: int = 1, mu: float | None = 0.0) float[source]

1/m’thly Woolhouse whole life insurance: A_x

Parameters:
  • x – age of selection

  • s – years after selection

  • b – amount of benefit

  • mu – value of mu at age x+s

term_insurance(x: int, s: int = 0, t: int = -999, b: int = 1, mu: float | None = 0.0, mu1: float | None = None) float[source]

1/m’thly Woolhouse term insurance: A_x:t

Parameters:
  • x – year of selection

  • s – years after selection

  • t – term of insurance in years

  • b – amount of benefit

  • mu – value of mu at age x+s

  • mu1 – value of mu at age x+s+t

endowment_insurance(x: int, s: int = 0, t: int = -999, b: int = 1, endowment: int = -1, mu: float | None = None) float[source]

1/m’thly Woolhouse term insurance: A_x:t

Parameters:
  • x – year of selection

  • s – years after selection

  • t – term of insurance in years

  • b – amount of benefit

  • endowment – amount of endowment

  • mu – value of mu at age x+s+t

deferred_insurance(x: int, s: int = 0, u: int = 0, t: int = -999, b: int = 1, mu: float | None = None, mu1: float | None = None) float[source]

1/m’thly Woolhouse deferred insurance as discounted term or WL

Parameters:
  • x – year of selection

  • s – years after selection

  • u – number of years deferred

  • t – term of insurance in years

  • b – amount of benefit

  • mu – value of mu at age x+s+u

  • mu1 – value of mu at age x+s+u+t

whole_life_annuity(x: int, s: int = 0, b: int = 1, mu: float | None = None) float[source]

1/m’thly Woolhouse whole life annuity: a_x

Parameters:
  • x – year of selection

  • s – years after selection

  • b – amount of benefit

  • mu – value of mu at age x+s

Examples

>>> life = Recursion().set_interest(i=0.05).set_a(3.4611, x=0)
>>> Woolhouse(m=4, life=life).whole_life_annuity(x=0)
temporary_annuity(x: int, s: int = 0, t: int = -999, b: int = 1, mu: float | None = None, mu1: float | None = None) float[source]

1/m’thly Woolhouse temporary life annuity: a_x

Parameters:
  • x – year of selection

  • s – years after selection

  • t – term of annuity in years

  • b – amount of benefit

  • mu – value of mu at age x+s

  • mu1 – value of mu at age x+s+t

deferred_annuity(x: int, s: int = 0, t: int = -999, u: int = 0, b: int = 1, mu: float | None = None, mu1: float | None = None) float[source]

1/m’thly Woolhouse deferred life annuity: a_x

Parameters:
  • x – year of selection

  • s – years after selection

  • u – years of deferral

  • t – term of annuity in years

  • mu – value of mu at age x+s+u

  • mu1 – value of mu at age x+s+u+t