Learn R Programming

DetLifeInsurance

DetLifeInsurance is an R package designed to provide tools for:

  • Deterministic valuation of actuarial reserves and life insurance and annuities premiums (both constant and variable amounts supported).
  • Applying fractional age assumptions to life tables, and generating new ones based on mortality laws.
  • Calculation of equivalent interest-discount rates as well as future and present value of annuities.
  • Calculation of loan amortization schedule.

In addition, 47 commonly used mortality tables are included as data.

Installation

To install from CRAN, use:

install.packages("DetLifeInsurance")

To install from GitHub, use:

#library(devtools)
devtools::install_github("JoaquinAuza/DetLifeInsurance")

Note: package devtools must be installed.

Example #1

In this example, we obtain the annual net premium of a life insurance coverage of $100000 for a term of 5 years, issued to a male of age 30, using an interest rate of 3.5%.

#library(DetLifeInsurance)

LI <- A.(x=30, h=0, n=5, i = 0.035, data=CSO80MANB, cap = 100000) #Actuarial PV of the LI
Prem <- a(x=30, h=0, n=5, k=1, i=0.035, data=CSO80MANB , assumption="UDD")
Net_Premium <- LI/Prem #Net premium to be paid at the begining of each year

#The same result can be achieved by using PremiumFrac()

Net_Premium <-PremiumFrac(px1=LI, x=30,m=5,i=0.035,k=1,data=CSO80MANB)

Example #2

In this example, we obtain the value of the actuarial reserve for a life insurance coverage where the insuree pays monthly premiums during the first year. UDD assumption is used.

#library(DetLifeInsurance)

LI <- A.(x=30, h=0, n=5, i = 0.035, data=CSO80MANB, cap = 100000) 

Net_Premium <- PremiumFrac(px1=LI,x=30,m=1,k=12,i=0.035,data= CSO80MANB,assumption = "UDD")
Net_Premium_monthly <- Net_Premium/12

V_A.(px=Net_Premium_monthly, x=30, h=0, n=5, k = 1, cantprem = 12,
     premperyear = 12, i = 0.035, data=CSO80MANB, assumption = "UDD", 
     cap=100000, t=60)

Status

Work in progress!

  • Basic functionality.
  • Enhanced documentation.
  • Fix references, fix non-exporable functions.
  • Upload to CRAN.
  • New functions: group insurance, loan insurance reserves...
  • what else?

Copy Link

Version

Install

install.packages('DetLifeInsurance')

Monthly Downloads

202

Version

0.1.3

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Joaquin Auza

Last Published

September 12th, 2020

Functions in DetLifeInsurance (0.1.3)

Av.

Varying Life Insurance: Arithmetic Progression
ACont.

Continuous Life Insurance
A.

Life Insurance
ArgentinaINDEC9092comb

ArgentinaINDEC9092 Males and Females Combined
Am.

Life Insurance of a group
AD.

Decreasing Life Insurance
ArgentinaINDEC9092F

ArgentinaINDEC9092 Female
ArgentinaINDEC9092M

ArgentinaINDEC9092 Male
CSO80FALB

CSO80 Female Age Last Birthday
CSO2001MANBnonsmoker

CSO2001 Male Age Nearest Birthday Non-smoker
CSO80FALBsmoker

CSO80 Female Age Last Birthday smoker
CSO58MANB

CSO58 Male Age Nearest Birthday
CSO2001FANBnonsmoker

CSO2001 Female Age Nearest Birthday Non-smoker
CSO2001FALBsmoker

CSO2001 Female Age Last Birthday Smoker
CSO80FALBnonsmoker

CSO80 Female Age Last Birthday non-smoker
CSO2001MALBsmoker

CSO2001 Male Age Last Birthday Smoker
CSO80MANB

CSO80 Male Age Nearest Birthday
Avg.

Varying Life Insurance: Geometric Progression
GAM94M

GAM94 Male
CSO80MANBnonsmoker

CSO80 Male Age Nearest Birthday Non-smoker
GAM94MANB

GAM94 Male Age Nearest Birthday
CSO2001FALBnonsmoker

CSO2001 Female Age Last Birthday Non-smoker
CSO2001MANBsmoker

CSO2001 Male Age Nearest Birthday Smoker
CSO58FALB

CSO58 Female Age Last Birthday
CSO80MALBsmoker

CSO80 Male Age Last Birthday Smoker
Mi06F

Mi06 Female
CSO80FANBsmoker

CSO80 Female Age Nearest Birthday Smoker
CSO80MANBsmoker

CSO80 Male Age Nearest Birthday Smoker
Mi06M

Mi06 Male
CSO80MALBnonsmoker

CSO80 Male Age Last Birthday Non-smoker
E

Pure Endowment
CSO80MALB

CSO80 Male Age Last Birthday
CSO58FANB

CSO58 Female Age Nearest Birthday
CSO58MALB

CSO58 Male Age Last Birthday
a

Life Annuities
Table_Makeham

Makeham's Law of Mortality Table Creator
Table_Moivre

de Moivre's Law of Mortality Table Creator
Rate_converter

Interest & Discount Rate Converter
GAM83F

GAM83 Female
aCont

Continuous Life Annuities
Survival

Survival Probability
V_a

Reserve Valuation for Life Annuities
CSO80FANB

CSO80 Female Age Nearest Birthday
CSO80FANBnonsmoker

CSO80 Female Age Nearest Birthday Non-smoker
V_aD

Reserve Valuation for Decreasing life annuities
MAyP0206activeF

MAyP0206 Active Female
sf

Future Value of an Annuity
GAM71F

GAM71 Female
V_E

Reserve Valuation for Pure Endowments
GAM71M

GAM71 Male
Mi85F

Mi85 Female
GAM83M

GAM83 Male
MAyP0206CAM

MAyP0206 Combined Active and Retired Male
JointSurvival

Joint Survival Probability
Mi85M

Mi85 Male
MAyP0206activeM

MAyP0206 Active Male
V_Av.

Reserve Valuation for Varying Life Insurance: Arithmetic Progression
RV04M

RV04 Male
V_Avg.

Reserve Valuation for Varying Life Insurance: Geometric Progression
aD

Decreasing Life Annuities
MAyP0206CAF

MAyP0206 Combined Active and Retired Female
af

Present Value of An Annuity
Table_Gompertz

Gompertz's Law of Mortality Table Creator
Table_Dormoy

Dormoy's Law of Mortality Table Creator
RV04F

RV04 Female
CSO2001FANBsmoker

CSO2001 Female Age Nearest Birthday Smoker
V_Payment_Protection

Reserve valuation for Payment Protection
V_A.

Reserve for Life Insurance
MAyP0206retiredF

MAyP0206 Retired Female
MAyP0206retiredM

MAyP0206 Retired Male
Loan_amortization

Loan Amortization
V_AD.

Reserve Valuation for Decreasing Life Insurance
Em

Group Pure Endowment
CSO2001MALBnonsmoker

CSO2001 Male Age Last Birthday Non-smoker
Fractional_table

Fractional table of mortality
avg

Varying Life Annuities: Geometric Progression
qfrac

Fractional Probability of Death
GAM94F

GAM94 Female
GAM94FANB

GAM94 Female Age Nearest Birthday
PremiumFrac

Fractional Premium
V_av

Reserve Valuation for Varying Life Annuities: Arithmetic Progression
Payment_Protection

Payment Protection
V_avg

Reserve Valuation for Varying Life Annuities: Geometric Progression
av

Varying Life Annuities: Arithmetic Progression
am

Life Annuities for a group