reserves
Reserves - Computes recursive, interim or modified reserves
MIT License. Copyright 2022-2023 Terence Lim
- class actuarialmath.reserves.Reserves(**kwargs)[source]
Bases:
PolicyValues
Compute recursive, interim or modified reserves
- set_reserves(T: int = 0, endowment: int | float = 0, V: Dict[int, float] | None = None) Reserves [source]
Set values of the reserves table and the endowment benefit amount
- Parameters:
T – max term of policy
V – reserve values, keyed by time t
endowment – endowment benefit amount
Examples
>>> life = Reserves().set_reserves(T=3)
- fill_reserves(x: int, s: int = 0, reserve_benefit: bool = False, contract: Contract | None = None) Reserves [source]
Iteratively fill in missing values in reserves table
- Parameters:
x – age selected
s – starting from s years after selection
reserve_benefit – whether benefit includes value of reserves
contract – policy contract terms and expenses
- V_plot(ax: Any = None, color: str = 'r', title: str = '')[source]
Plot values from reserves tables
- Parameters:
title – title to display
color – color to plot curve
Examples
>>> life.V_plot(title=f"Reserves for term insurance")
- t_V_backward(x: int, s: int = 0, t: int = 0, premium: float = 0, benefit: ~typing.Callable = <function Reserves.<lambda>>, per_premium: float = 0, per_policy: float = 0, reserve_benefit: bool = False) float | None [source]
Backward recursion (with optional reserve benefit)
- Parameters:
x – age selected
s – starting s years after selection
t – year of reserve to solve
benefit – benefit amount at t+1
premium – amount of premium paid just after t
per_premium – expense per $ premium
per_policy – expense per policy
reserve_benefit – whether reserve value at t+1 included in benefit
- t_V_forward(x: int, s: int = 0, t: int = 0, premium: float = 0, benefit: ~typing.Callable = <function Reserves.<lambda>>, per_premium: float = 0, per_policy: float = 0, reserve_benefit: bool = False) float | None [source]
Forward recursion (with optional reserve benefit)
- Parameters:
x – age selected
s – starting s years after selection
t – year of reserve to solve
benefit – benefit amount at t
premium – amount of premium paid just after t-1
per_premium – expense per $ premium
per_policy – expense per policy
reserve_benefit – whether reserve value at t included in benefit
- t_V(x: int, s: int = 0, t: int = 0, premium: float = 0, benefit: ~typing.Callable = <function Reserves.<lambda>>, reserve_benefit: bool = False, per_premium: float = 0, per_policy: float = 0) float | None [source]
Solve year-t reserves by forward or backward recursion
- Parameters:
x – age selected
s – starting s years after selection
t – year of reserve to solve
benefit – benefit amount
premium – amount of premium
per_premium – expense per $ premium
per_policy – expense per policy
reserve_benefit – whether reserve value included in benefit
Examples
>>> G, x = 368.05, 0 >>> def fun(P): # solve net premium from expense reserve equation >>> return life.t_V(x=x, t=2, premium=G-P, benefit=lambda t: 0, >>> per_policy=5+.08*G) >>> P = life.solve(fun, target=-23.64, grid=[.29, .31]) / 1000
- r_V_backward(x: int, s: int = 0, r: float = 0, benefit: int = 1) float | None [source]
Backward recursion for interim reserves
- Parameters:
x – age of selection
s – years after selection
r – solve for interim reserve at fractional year x+s+r
benefit – benefit amount in year x+s+1
- r_V_forward(x: int, s: int = 0, r: float = 0, premium: float = 0, benefit: int = 1) float | None [source]
Forward recursion for interim reserves
- Parameters:
x – age of selection
s – years after selection
r – solve for interim reserve at fractional year x+s+r
benefit – benefit amount in year x+s+1
premium – premium amount just after year x+s
Initial or renewal Full Preliminary Term premiums
- Parameters:
x – age of selection
s – years after selection
n – term of insurance
b – benefit amount in year x+s+1
first – calculate year 1 (True) or year 2+ (False) FPT premium
- FPT_policy_value(x: int, s: int = 0, t: int = 0, b: int = 1, n: int = -999, endowment: int = 0, discrete: bool = True) float [source]
Compute Full Preliminary Term policy value at time t
- Parameters:
x – age of selection
s – years after selection
n – term of insurance
t – year of policy value to calculate
b – benefit amount in year x+s+1
endowment – endowment amount
discrete – fully discrete (True) or continuous (False) insurance