policyvalues
Policy Values - Computes present value of future losses and reserves
MIT License. Copyright 2022-2023 Terence Lim
- class actuarialmath.policyvalues.PolicyValues(**kwargs)[source]
Bases:
Premiums
Compute net and gross future losses and policy values
- net_future_loss(A: float, A1: float, b: int = 1) float [source]
Shortcut for net policy value with WL or Endowment Insurance factors
- Parameters:
A – insurance factor at age (x)
A1 – insurance factor at t years after x
b – benefit amount
- net_variance_loss(A1: float, A2: float, A: float = 0, b: int = 1) float [source]
Variance of net loss with WL or Endowment Insurance factors
- Parameters:
A – insurance factor at age (x)
A1 – first moment of insurance factor at t years after x
A2 – insurance factor at double force of interest t years after x
b – benefit amount
- net_policy_variance(x, s: int = 0, t: int = 0, b: int = 1, n: int = -999, endowment: int = 0, discrete: bool = True) float [source]
Variance of net future loss for WL or Endowment Insurance only
- Parameters:
x – age of selection
s – years after selection
n – term of life insurance
t – years after issue to compute policy variance
b – benefit amount
endowment – endowment amount
discrete – annuity due (True) or continuous (False)
- net_policy_value(x: int, s: int = 0, t: int = 0, b: int = 1, n: int = -999, endowment: int = 0, discrete: bool = True) float [source]
Net policy value assuming net premiums from equivalence principle: E[L_t]
- Parameters:
x – age initially insured
s – years after selection
n – term of life insurance
t – years after issue to compute policy variance
b – benefit amount
endowment – endowment amount
discrete – discrete/annuity due (True) or continuous (False)
- gross_future_loss(A: float | None = None, a: float | None = None, contract: Contract | None = None) float [source]
Shortcut for gross policy value with WL or Endowment Insurance factors
- Parameters:
A – insurance factor at age (x)
a – annuity factor at age (x)
contract – policy contract terms and expenses
- gross_variance_loss(A1: float, A2: float = 0, contract: Contract | None = None) float [source]
Variance of gross loss with WL or endowment insurance factors
- Parameters:
A1 – insurance factor
A2 – insurance factor at double the force of interest
policy – policy terms and expenses
- gross_policy_variance(x: int, s: int = 0, t: int = 0, n: int = -999, contract: Contract | None = None) float [source]
Variance of gross policy value for WL and Endowment Insurance only
- Parameters:
x – age initially insured
s – years after selection
n – term of life insurance
t – years after issue to compute policy variance
contract – policy contract terms and expenses
- gross_policy_value(x: int, s: int = 0, t: int = 0, n: int = -999, contract: Contract | None = None) float [source]
Gross policy values for insurance: t_V = E[L_t]
- Parameters:
x – age initially insured
s – years after selection
t – number of years of premiums paid
n – term of insurance
contract – policy contract terms
- L_from_t(t: float, contract: Contract | None = None) float [source]
PV of Loss L(t) at time of death t = T_x
- Parameters:
t – year of death
contract – policy contract
- L_from_prob(x: int, prob: float, contract: Contract | None = None) float [source]
Percentile of PV future loss r.v. L given probability
- Parameters:
x – age
prob – probability threshold
contract – policy contract
- L_to_t(L: float, contract: Contract | None = None) float [source]
Time of death T_x s.t. PV future loss is no more than L
- Parameters:
L – PV of future loss
contract – policy contract terms and expenses
- L_to_prob(x: int, L: float, contract: ~actuarialmath.policyvalues.Contract = <actuarialmath.policyvalues.Contract object>) float [source]
Probability such that PV of future loss r.v. is no more than L”
- Parameters:
x – age selected
L – PV of future loss
contract – policy contract terms and expenses
- L_plot(x: int, s: int = 0, stop: int = 0, T: float | None = None, contract: Contract | None = None, ax: Any = None, dual: bool = False, title: str | None = None, color: str = 'r', alpha: float = 0.3) float | None [source]
Plot PV of future loss r.v. L vs time of death T_x
- Parameters:
x – age selected
s – years after selection
stop – time to end plot
contract – policy contract terms and expenses
T – point in time to indicate probability and loss values
ax – figure object to plot in
title – title of plot
dual – whether to plot survival function on secondary axis
color – color to plot curve
alpha – transparency of plot area
- class actuarialmath.policyvalues.Contract(premium: float = 1, initial_policy: float = 0, initial_premium: float = 0, renewal_policy: float = 0, renewal_premium: float = 0, settlement_policy: float = 0, benefit: float = 1, endowment: float = 0, T: int = -999, discrete: bool = True)[source]
Bases:
Actuarial
Set and retrieve policy contract terms
- Parameters:
premium – level premium amount
benefit – insurance death benefit amount
settlement_policy – settlement expense per policy
endowment – endowment benefit amount
initial_policy – first year total expense per policy
initial_premium – first year total premium per $ of gross premium
renewal_policy – renewal expense per policy
renewal_premium – renewal premium per $ of gross premium
discrete – annuity due (True) or continuous (False)
T – term of insurance
discrete – annuity due (True) or continuous (False)
- set_contract(**terms) Any [source]
Update any existing policy contract terms
- Parameters:
**kwargs – one or more contract policy terms, and its value to update
Dict of terms required for calculating gross premiums
Examples
>>> life = PolicyValues().set_interest(i=0.04) >>> contract = Contract(premium=2.338, benefit=100, initial_premium=.1, >>> renewal_premium=0.05) >>> contract.premium = life.gross_premium(a=12, A=life.insurance_twin(a), >>> **contract.premium_terms)
- renewals(t: int = 0) Contract [source]
Returns contract object with initial terms set to renewal terms
- Parameters:
t – number of years after initial
- property renewal_profit: float
Renewal dollar profit (premium less renewal expenses)
- property initial_cost: float
Total initial cost (net of renewal component of expenses and premiums)
- property claims_cost: float
Total claims cost (death benefit + settlement expense)