SlideShare a Scribd company logo
1 of 46
Download to read offline
Arthur CHARPENTIER, Life insurance, and actuarial models, with R




                 Actuarial Science with
             2. life insurance & mortality tables

                                   Arthur Charpentier

           joint work with Christophe Dutang & Vincent Goulet
                   and Rob Hyndman’s demography package




                        Meielisalp 2012 Conference, June

                        6th R/Rmetrics Meielisalp Workshop & Summer School
                         on Computational Finance and Financial Engineering



                                                                              1
Arthur CHARPENTIER, Life insurance, and actuarial models, with R




                          Some (standard) references

Pitacco, E., Denuit, M., Haberman, S.
& Olivieri, A. (2008) Modeling Longevity
Dynamics for Pensions and Annuity Business
Oxford University Press




Schoen, R. (2007)
Dynamic Population Models
Springer Verlag




                                                                   2
Arthur CHARPENTIER, Life insurance, and actuarial models, with R




                             A possible motivation ?




                                                                   3
Arthur CHARPENTIER, Life insurance, and actuarial models, with R




                           Lexis diagram, age and time
From Lexis (1880), idea of visualizing lifetime, age x, time t and year of birth y




                                                                                4
Arthur CHARPENTIER, Life insurance, and actuarial models, with R




                           Lexis diagram, age and time
Idea : Life tables Lx should depend on time, Lx,t .
Let Dx,t denote the number of deaths of people aged x, during year t, data frame
DEATH and let Ex,t denote the exposure, of age x, during year t, data frame
EXPOSURE, from http://www.mortality.org/




                                                                            5
Arthur CHARPENTIER, Life insurance, and actuarial models, with R




                             Lexis diagram, age and time
Remark : be carefull of age 110+

>   DEATH$Age=as.numeric(as.character(DEATH$Age))
>   DEATH$Age[is.na(DEATH$Age)]=110
>   EXPOSURE$Age=as.numeric(as.character(EXPOSURE$Age))
>   EXPOSURE$Age[is.na(EXPOSURE$Age)]=110


Consider force of mortality function

                                                        Dx,t
                                              µx,t =
                                                        Ex,t

> MU=DEATH[,3:5]/EXPOSURE[,3:5]
> MUT=matrix(MU[,3],length(AGE),length(ANNEE))
> persp(AGE[1:100],ANNEE,log(MUT[1:100,]),
+ theta=-30,col="light green",shade=TRUE)



                                                                       6
Arthur CHARPENTIER, Life insurance, and actuarial models, with R




                                                                   7
Arthur CHARPENTIER, Life insurance, and actuarial models, with R




                  Tables, per year t and Survival lifetimes
Let us study deaths occurred in year=1900 or 2000, x → log µx,t when t = 1900 or
2000.

> D=DEATH[DEATH$Year==year,]; E=EXPOSURE[EXPOSURE$Year==year,]
> MU = D[,3:5]/E[,3:5]
> plot(0:110,log(MU[,1]),type="l",col="red"); lines(0:110,log(MU[,2]),col="blue")

                                                 x
Evolution of x → Lx,t = exp −                        µh,t dh   when t = 1900 or 2000,
                                             0

>   PH=PF=matrix(NA,111,111)
>   for(x in 0:110){
+   PH[x+1,1:(111-x)]=exp(-cumsum(MU[(x+1):111,2]))
+   PF[x+1,1:(111-x)]=exp(-cumsum(MU[(x+1):111,1]))}
>   x=0; plot(1:111,PH[x+1,],ylim=c(0,1),type="l",col="blue")
>   lines(1:111,PF[x+1,],col="red")



                                                                                        8
Arthur CHARPENTIER, Life insurance, and actuarial models, with R




                                 Tables, per year t and Survival lifetimes
                       0               Mortality rate 1900                                                   Mortality rate 2000




                                                                                              0
                       −2




                                                                                              −2
    Death rate (log)




                                                                           Death rate (log)
                       −4




                                                                                              −4
                       −6




                                                                                              −6
                                                                  Female                                                                Female
                                                                  Male                                                                  Male
                       −8




                                                                                              −8
                       −10




                                                                                              −10




                             0    20    40       60          80     100                             0   20    40       60          80     100

                                              Age                                                                   Age




                                                                                                                                                 9
Arthur CHARPENTIER, Life insurance, and actuarial models, with R




                                                      Tables, per year t and Survival lifetimes
                                            1.0             Survival probability in 1900                                                                 Survival probability in 2000




                                                                                                                                         1.0
                                            0.8




                                                                                                                                         0.8
    Survival probability at age 0 in 1900




                                                                                                 Survival probability at age 0 in 2000
                                            0.6




                                                                                                                                         0.6
                                            0.4




                                                                                                                                         0.4
                                            0.2




                                                                                                                                         0.2
                                                      Female                                                                                       Female
                                                      Male                                                                                         Male
                                            0.0




                                                                                                                                         0.0




                                                  0    20        40       60       80      100                                                 0    20        40       60       80      100

                                                                        Age                                                                                          Age




                                                                                                                                                                                              10
Arthur CHARPENTIER, Life insurance, and actuarial models, with R




                                              Survival lifetimes and rectangularization’
                                    1.0              Male Mortality                                                                 Female Mortality




                                                                                                                     1.0
                                                                        2000                                                                            2000


                                                                        1990                                                                            1990
                                    0.8




                                                                                                                     0.8
                                                                        1980                                                                            1980


                                                                        1970                                                                            1970
    Survival probability at birth




                                                                                     Survival probability at birth
                                    0.6




                                                                                                                     0.6
                                                                        1960                                                                            1960


                                                                        1950                                                                            1950
                                    0.4




                                                                                                                     0.4
                                                                        1940                                                                            1940


                                                                        1930                                                                            1930
                                    0.2




                                                                                                                     0.2
                                                                        1920                                                                            1920


                                                                        1910                                                                            1910
                                    0.0




                                                                                                                     0.0

                                                                        1900                                                                            1900


                                          0    20   40     60     80   100     120                                         0   20   40     60     80   100     120

                                                          Age                                                                             Age




                                                                                                                                                                     11
Arthur CHARPENTIER, Life insurance, and actuarial models, with R




                           Life table and transversality
> XV<-unique(Deces$Age); YV<-unique(Deces$Year)
> DTF<-t(matrix(Deces[,3],length(XV),length(YV)))
> ownames(DTF)=YV;colnames(DTF)=XV
> t(DTF)[1:13,1:10]
    1899 1900 1901 1902 1903 1904 1905 1906 1907 1908
0 64039 61635 56421 53321 52573 54947 50720 53734 47255 46997
1 12119 11293 10293 10616 10251 10514 9340 10262 10104 9517
2   6983 6091 5853 5734 5673 5494 5028 5232 4477 4094
3   4329 3953 3748 3654 3382 3283 3294 3262 2912 2721
4   3220 3063 2936 2710 2500 2360 2381 2505 2213 2078
5   2284 2149 2172 2020 1932 1770 1788 1782 1789 1751
6   1834 1836 1761 1651 1664 1433 1448 1517 1428 1328
7   1475 1534 1493 1420 1353 1228 1259 1250 1204 1108
8   1353 1358 1255 1229 1251 1169 1132 1134 1083          961
9   1175 1225 1154 1008 1089       981 1027 1025    957   885
10 1174 1114 1063      984   977   882   955    937 942   812
11 1162 1055 1038 1020       945   954   931    936 880   851
12 1100 1254 1076 1034 1023 1009 1041 1026          954   908
13 1251 1283 1190 1126 1108 1093 1111 1054 1103           940


                                                                     12
Arthur CHARPENTIER, Life insurance, and actuarial models, with R




                             Life table and transversality
It might be interesting to follow a cohort, per year of birth x − t,
> Nannee <- max(DEATH$Year)
> naissance <- 1950
> taille <- Nannee - naissance
> Vage <- seq(0,length=taille+1)
> Vnaissance <- seq(naissance,length=taille+1)
> Cagreg <- DEATH$Year*1000+DEATH$Age
> Vagreg <- Vnaissance*1000+Vage
> indice <- Cagreg%in%Vagreg
> DEATH[indice,]
      Year Age   Female     Male    Total
5662 1950    0 18943.05 25912.38 44855.43
5774 1951    1 2078.41 2500.70 4579.11
5886 1952    2   693.20   810.32 1503.52
5998 1953    3   375.08   467.12   842.20
6110 1954    4   287.04   329.09   616.13
6222 1955    5   205.03   246.07   451.10
6334 1956    6   170.00   244.00   414.00


                                                                       13
Arthur CHARPENTIER, Life insurance, and actuarial models, with R




                                            Life table and transversality
                       0              Mortality rate 1900                                                    Mortality rate 1950




                                                                                              0
                       −2




                                                                                              −2
    Death rate (log)




                                                                           Death rate (log)
                       −4




                                                                                              −4
                       −6




                                                                                              −6
                                                            Longitudinal                                                           Longitudinal
                                                                  Female                                                                 Female
                                                                  Male                                                                   Male

                                                            Transversal                                                            Transversal
                                                                 Female                                                                 Female
                       −8




                                                                                              −8
                                                                 Male                                                                   Male
                       −10




                                                                                              −10




                             0   20    40       60          80      100                             0   20    40       60          80      100

                                             Age                                                                    Age




                                                                                                                                                  14
Arthur CHARPENTIER, Life insurance, and actuarial models, with R




                            Lee & Carter (1992) model
Assume here (as in the original model)

                                 log µx,t = αx + βx · κt + εx,t ,

with some i.i.d. noise εx,t . Identification assumptions are usually

                                  xM                      tM
                                        βx = 1 and              κt = 0.
                                 x=xm                    t=tm


Then sets of parameters α = (αx ), β = (βx ) and κ = (κt ), are obtained solving

                                                                               2
                     ˆ ˆ
                     αx , βx , κt = arg min             (ln µxt − αx − βx · kt ) .
                                                  x,t




                                                                                     15
Arthur CHARPENTIER, Life insurance, and actuarial models, with R




                               Using demography package
Package demography can be used to fit a Lee-Carter model

>   library(forecast)
>   library(demography)
>   YEAR=unique(DEATH$Year);nC=length(YEAR)
>   AGE =unique(DEATH$Age);nL=length(AGE)
>   MUF =matrix(DEATH$Female/EXPOSURE$Female,nL,nC)
>   MUH =matrix(DEATH$Male/EXPOSURE$Male,nL,nC)
>   POPF=matrix(EXPOSURE$Female,nL,nC)
>   POPH=matrix(EXPOSURE$Male,nL,nC)


Then wo use the demogdata format

>   BASEH <- demogdata(data=MUH, pop=POPH, ages=AGE, years=YEAR, type="mortality",
+   label="France", name="Hommes", lambda=1)
>   BASEF <- demogdata(data=MUF, pop=POPF,ages=AGE, years=YEAR, type="mortality",
+   label="France", name="Femmes", lambda=1)



                                                                                     16
Arthur CHARPENTIER, Life insurance, and actuarial models, with R




                             Estimation of α = (αx ) and β = (βx )
The code is simply LCH <- lca(BASEH)

> plot(LCH$age,LCH$ax,col="blue"); plot(LCH$age,LCH$bx,col="blue")



                                                                                                                               q                    q




                                                                                                                                            0.025
                                                                                                                               q
                                                                                                                             qq
                                                                                                                           qq
                                                                                                                         qq
                        −1




                                                                                                                        q
                                                                                                                       q                                q
                                                                                                                      q
                                                                                                                     q
                                                                                                                    q
                                                                                                                   q
                                                                                                                  q                                     q
                                                                                                                 q
                                                                                                                q                                        q
                                                                                                               q
                                                                                                              q
                        −2




                                                                                                                                            0.020
                                                                                                             q                                              q
                                                                                                            q                                       q
                                                                                                           q                                                 q
                                                                                                          q
                                                                                                         q                                                    q
                                                                                                        q
                                                                                                       q                                                        q
                                                                                                      q                                                          q
                                                                                                     q                                                            q
                                                                                                    q                                                              q          q
                                                                                                   q                                                                           qq
                                                                                                                                                                                qq
                        −3




                                                                                                  q                                                                q              qq
                                                                                                 q                                                                          q
                                                                                                q                                                                                   q
                             q                                                                                                                                      q                q
                                                                                               q                                                                            q         q
                                                                                              q




                                                                                                                                            0.015
                                                                                             q                                                                                         qq
                                                                                            q                                                                          q                 q
               LCH$ax




                                                                                                                                   LCH$bx
                                                                                           q                                                                               q
                                                                                          q                                                                             q                 q
                                                                                        qq                                                                                                 q
                                                                                       q                                                                                 q
                                                                                      q                                                                                                     q
                        −4




                                                                                     q                                                                                    q
                                                                                    q                                                                                                        q
                                                                                   q
                                                                                  q                                                                                                           q
                                                                                 q
                                                                                q                                                                                                              q
                                                                              qq
                                                                             q                                                                                                                  q
                                                                            q




                                                                                                                                            0.010
                                                                           q                                                                                                                    q
                                                                         qq
                                                                        q                                                                                                                        q
                        −5




                                                                      qq
                                                                     q                                                                                                                            q
                                                                    q                                                                                                                              q
                                                                  qq
                             q                                   q                                                                                                                                  q
                                                               qq
                                                             qq                                                                                                                                      q
                                                           qq                                                                                                                                         q
                                                      qqqqq
                                                     qqqqq                                                                                                                                             q
                                                    q                                                                                                                                                   q
                                                   q                                                                                                                                                     q
                        −6




                                                  q                                                                                                                                                       qq
                                 q                                                                                                                                                                          qq
                                                                                                                                            0.005                                                             qqqq
                                                                                                                                                                                                                qq         q
                                                                                                                                                                                                                    qqqqqqq qq
                                                  q                                                                                                                                                                qqqqqqq qqq
                                                                                                                                                                                                                               qq
                                                                                                                                                                                                                               qq
                                 q            q                                                                                                                                                                                   qqq
                                                                                                                                                                                                                                     qq
                                     q        q                                                                                                                                                                                        q
                                      q                                                                                                                                                                                                 qq
                                                                                                                                                                                                                                         q
                                             q                                                                                                                                                                                             q q
                        −7




                                       q                                                                                                                                                                                                    q
                                        q                                                                                                                                                                                                    q
                                         q q                                                                                                                                                                                                  qq
                                          qq
                                          qq                                                                                                                                                                                                     q




                             0                    20                 40                 60                 80                100                    0                      20                 40              60               80             100

                                                                         LCH$age                                                                                                                    LCH$age




                                                                                                                                                                                                                                                     17
Arthur CHARPENTIER, Life insurance, and actuarial models, with R




                  Estimation and projection of κ = (κt )’s
Use library(forcast) to predict future κt ’s, e.g. using exponential smoothing

> library(forecast)
> Y <- LCH$kt
> (ETS <- ets(Y))
ETS(A,N,N)

Call:
 ets(y = Y)

  Smoothing parameters:
    alpha = 0.8923

  Initial states:
    l = 71.5007

  sigma:   12.3592

     AIC       AICc         BIC

                                                                            18
Arthur CHARPENTIER, Life insurance, and actuarial models, with R



1042.074 1042.190 1047.420

> plot(forecast(ETS,h=100))


But as in Lee & Carter original model, it is possible to fit an ARMA(1,1) model,
on the differentiate series (∆κt )

                               ∆κt = φ∆κt−1 + δ + ut − θut−1

It is also possible to consider a linear tendency

                             κt = α + βt + φκt−1 + ut − θut−1 .

> (ARIMA <- auto.arima(Y,allowdrift=TRUE))
Series: Y
ARIMA(0,1,0) with drift

Call: auto.arima(x = Y, allowdrift = TRUE)

Coefficients:

                                                                           19
Arthur CHARPENTIER, Life insurance, and actuarial models, with R




         drift
       -1.9346
s.e.    1.1972

sigma^2 estimated as 151.9: log likelihood = -416.64
AIC = 837.29   AICc = 837.41  BIC = 842.62

> plot(forecast(ARIMA,h=100))




                                                                     20
Arthur CHARPENTIER, Life insurance, and actuarial models, with R




                                                              Projection of κt ’s
                               Forecasts from ETS(A,N,N)                                  Forecasts from ARIMA(0,1,0) with drift

                     q                                                                    q
                     qq
                      q                                                                   qq
                                                                                          q
       100




                                                                            100
                      q                                                                    q
                               qq                                                                   qq
               q q
               q q q q                                                              q q
                                                                                    q q q q
                qq q
                q qq
                 q q                                                                 qq q
                                                                                     q qq
                                                                                      q q
                     q qq
                     q q qq     q                                                         q qq
                                                                                          q q qq     q
                        q qq qq
                        q q qq q
                         q                                                                   q qq qq
                                                                                             q q qq q
                                                                                              q
                           qqqq
                              q
                             qq                                                                 qqqq
                                                                                                   q
                                                                                                  qq

                               qq
                               qqq
                                 q                                                                  qq
                                                                                                    qqq
                                                                                                      q
                                qqq                                                                  qqq
       0




                                                                            0
                                   q
                                  qq q                                                                  q
                                                                                                       qq q
                                     qqqq
                                     q q
                                    qqqq                                                                  qqqq
                                                                                                          q q
                                                                                                         qqqq
                                       q qq
                                         qq
                                          qq                                                                q qq
                                                                                                              qq
                                                                                                               qq
                                           q                                                                    q
                                            q
                                            qq
                                             q                                                                   q
                                                                                                                 qq
                                                                                                                  q
                                              qq
                                              qq                                                                   qq
                                                                                                                   qq
                                               qq                                                                   qq
                                                 q
                                                 q                                                                    q
                                                                                                                      q
                                                  q
                                                  q                                                                    q
                                                                                                                       q
                                                   q                                                                    q
       −100




                                                                            −100
                                                   qq                                                                   qq
                                                    qq
                                                     q                                                                   qq
                                                                                                                          q
                                                      q
                                                      qq                                                                   q
                                                                                                                           qq
                                                       qq                                                                   qq
                                                        qq                                                                   qq
                                                         qq                                                                   qq
       −200




                                                                            −200
       −300




                                                                            −300
       −400




                                                                            −400
       −500




                                                                            −500




              1900            1950                  2000      2050   2100          1900            1950                  2000      2050   2100




                                                                                                                                                 21
Arthur CHARPENTIER, Life insurance, and actuarial models, with R




                       Shouldn’t we start modeling after 1945 ?
Starting in 1948, LCH0 <- lca(BASEH,years=1948:2005)


                                                                                                                           q
                                                                                                                                                q
                                                                                                                           q




                                                                                                                                        0.025
                                                                                                                          q
                                                                                                                      qqq
                                                                                                                        q
                                                                                                                     q
                                                                                                                   qq
                                                                                                                  q
                                                                                                                 q                                  q
                                                                                                                q
                                                                                                               q
                                                                                                              q
                                                                                                             q
                                                                                                            q
                                                                                                           q                                        q
                                                                                                          q
                  −2




                                                                                                         q                                           q
                                                                                                        q
                                                                                                       q




                                                                                                                                        0.020
                                                                                                      q                                                 q
                                                                                                     q                                          q
                                                                                                    q
                                                                                                   q                                                     q
                                                                                                  q                                                       q
                                                                                                 q
                                                                                                q                                                           q
                                                                                               q                                                             q
                                                                                              q                                                               q
                                                                                             q
                                                                                            q                                                                  q          q
                       q                                                                   q                                                                               qq
                                                                                          q                                                                                 qq
                                                                                         q                                                                     q        q     qq
                                                                                        q                                                                                       q
                                                                                       q                                                                        q
                                                                                      q                                                                                          q
                                                                                     q                                                                                  q         q




                                                                                                                                        0.015
                                                                                    q                                                                                              qq
                                                                                   q
                                                                                  q
                  −4




                                                                                                                                                                   q                 q
         LCH$ax




                                                                                                                               LCH$bx
                                                                                 q
                                                                               qq                                                                                   q q               q
                                                                              q                                                                                                        q
                                                                            qq                                                                                       q
                                                                           q                                                                                          q                 q
                                                                          q
                                                                        qq                                                                                                               q
                                                                      qq                                                                                                                  q
                                                                    qq
                                                                   q                                                                                                                       q
                                                                  q
                                                                qq                                                                                                                          q
                                                              qq




                                                                                                                                        0.010
                       q                                    qq                                                                                                                              q
                                                          qq
                                                                                                                                                                                             q
                                                       qq
                                                        q
                                                  qqqqq
                                                 qqqqq                                                                                                                                        q
                                                q
                                               q                                                                                                                                               q
                  −6




                                              q                                                                                                                                                 q
                           q
                                                                                                                                                                                                 q
                                          q                                                                                                                                                       q
                           q              q                                                                                                                                                        qq
                                                                                                                                                                                                     q
                               q         q                                                                                                                                                            qq
                                q                                                                                                                                                                       qq


                                                                                                                                        0.005
                                        q                                                                                                                                                                 qqqq
                                 q                                                                                                                                                                          qq         q
                                  q                                                                                                                                                                             qqqqqqq qq
                                                                                                                                                                                                               qqqqqqq qqq
                                   q q q                                                                                                                                                                                   qq
                                                                                                                                                                                                                           qq
                                    qq
                                    q                                                                                                                                                                                         qqq
                                                                                                                                                                                                                                 qqq
                                                                                                                                                                                                                                    qq
                                                                                                                                                                                                                                     q
                                                                                                                                                                                                                                       q q
                                                                                                                                                                                                                                        q
                                                                                                                                                                                                                                         q
                  −8




                                                                                                                                                                                                                                          qq
                                                                                                                                                                                                                                             q




                       0                      20                 40                 60                 80                100                    0                      20                 40              60               80             100

                                                                     LCH$age                                                                                                                    LCH$age




                                                                                                                                                                                                                                                 22
Arthur CHARPENTIER, Life insurance, and actuarial models, with R




                                                               Projection of κt ’s
                     Forecasts from ARIMA(0,1,0) with drift                                Forecasts from ARIMA(1,1,0) with drift

                     q
                     qq
                      q
       100




                                                                             100
                      q
                               qq
               q q
               q q q q
                qq q
                q qq
                 q q
                     q qq
                     q q qq     q
                        q qq qq
                        q q qq q
                         q
                           qqqq
                              q
                             qq

                                qq                                                                 qq
                                qqq
                                  q                                                                qq
                                                                                                   qqq
                                 qqq
       0




                                                                             0
                                    q
                                   qq q                                                               q
                                                                                                     qq
                                      qqqq
                                      q q
                                     qqqq                                                               qq q
                                                                                                        qqqq
                                                                                                       qqqq
                                        q qq
                                          qq
                                           qq                                                             q qq
                                                                                                            qq
                                                                                                             qq
                                            q                                                                 q
                                             q
                                             qq
                                              q                                                                q
                                                                                                               qq
                                                                                                                q
                                               qq
                                               qq                                                                qq
                                                                                                                 qq
                                                qq                                                                qq
                                                  q
                                                  q                                                                 q
                                                                                                                    q
                                                   q
                                                   q                                                                 q
                                                                                                                     q
                                                    q                                                                 q
       −100




                                                                             −100
                                                    qq                                                                qq
                                                     qq
                                                      q                                                                qq
                                                                                                                        q
                                                       q
                                                       qq                                                                q
                                                                                                                         qq
                                                        qq                                                                qq
                                                         qq                                                                qq
                                                          qq                                                                qq
       −200




                                                                             −200
       −300




                                                                             −300
       −400




                                                                             −400
       −500




                                                                             −500




              1900             1950                  2000      2050   2100          1900          1950                 2000      2050   2100




                                                                                                                                               23
Arthur CHARPENTIER, Life insurance, and actuarial models, with R




              Projection of life expectancy, born in 2005
> LCHT=lifetable(LCHf); plot(0:100,LCHT$ex[,5],type="l",col="red")
> LCHTu=lifetable(LCHf,"upper"); lines(0:100,LCHTu$ex[,5],lty=2)
> LCHTl=lifetable(LCHf,"lower"); lines(0:100,LCHTl$ex[,5],lty=2)

                                                         Life expectancy in 2005
                                           80
                                           60
               Residual expected liftime

                                           40
                                           20
                                           0




                                                0   20   40                   60   80   100

                                                                  Age




                                                                                              24
Arthur CHARPENTIER, Life insurance, and actuarial models, with R




                         Residuals in Lee & Carter model
Recall that
                                   log µx,t = αx + βx · κt + εx,t

Let εx,t denote pseudo-residuals, obtained from estimation

                                 εx,t = log µx,t − αx + βx · κt .

>   RES=residuals(LCH,"pearson")
>   colr=function(k) rainbow(110)[k*100]
>   couleur=Vectorize(colr)(seq(.01,1,by=.01))
>   plot(rep(RES$y,length(RES$x)),(RES$z),col=couleur[rep(RES$x,
+   each=length(RES$y))-RES$x[1]+1])
>   plot(rep(RES$x,each=length(RES$y)),t(RES$z),col=couleur[rep(RES$y,length(RES$x))+1])




                                                                                  25
Swiss part2
Swiss part2
Swiss part2
Swiss part2
Swiss part2
Swiss part2
Swiss part2
Swiss part2
Swiss part2
Swiss part2
Swiss part2
Swiss part2
Swiss part2
Swiss part2
Swiss part2
Swiss part2
Swiss part2
Swiss part2
Swiss part2
Swiss part2
Swiss part2

More Related Content

More from Arthur Charpentier (20)

Family History and Life Insurance
Family History and Life InsuranceFamily History and Life Insurance
Family History and Life Insurance
 
ACT6100 introduction
ACT6100 introductionACT6100 introduction
ACT6100 introduction
 
Family History and Life Insurance (UConn actuarial seminar)
Family History and Life Insurance (UConn actuarial seminar)Family History and Life Insurance (UConn actuarial seminar)
Family History and Life Insurance (UConn actuarial seminar)
 
Control epidemics
Control epidemics Control epidemics
Control epidemics
 
STT5100 Automne 2020, introduction
STT5100 Automne 2020, introductionSTT5100 Automne 2020, introduction
STT5100 Automne 2020, introduction
 
Family History and Life Insurance
Family History and Life InsuranceFamily History and Life Insurance
Family History and Life Insurance
 
Machine Learning in Actuarial Science & Insurance
Machine Learning in Actuarial Science & InsuranceMachine Learning in Actuarial Science & Insurance
Machine Learning in Actuarial Science & Insurance
 
Reinforcement Learning in Economics and Finance
Reinforcement Learning in Economics and FinanceReinforcement Learning in Economics and Finance
Reinforcement Learning in Economics and Finance
 
Optimal Control and COVID-19
Optimal Control and COVID-19Optimal Control and COVID-19
Optimal Control and COVID-19
 
Slides OICA 2020
Slides OICA 2020Slides OICA 2020
Slides OICA 2020
 
Lausanne 2019 #3
Lausanne 2019 #3Lausanne 2019 #3
Lausanne 2019 #3
 
Lausanne 2019 #4
Lausanne 2019 #4Lausanne 2019 #4
Lausanne 2019 #4
 
Lausanne 2019 #2
Lausanne 2019 #2Lausanne 2019 #2
Lausanne 2019 #2
 
Lausanne 2019 #1
Lausanne 2019 #1Lausanne 2019 #1
Lausanne 2019 #1
 
Side 2019 #10
Side 2019 #10Side 2019 #10
Side 2019 #10
 
Side 2019 #11
Side 2019 #11Side 2019 #11
Side 2019 #11
 
Side 2019 #12
Side 2019 #12Side 2019 #12
Side 2019 #12
 
Side 2019 #9
Side 2019 #9Side 2019 #9
Side 2019 #9
 
Side 2019 #8
Side 2019 #8Side 2019 #8
Side 2019 #8
 
Side 2019 #7
Side 2019 #7Side 2019 #7
Side 2019 #7
 

Recently uploaded

Call Girls Koregaon Park Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Koregaon Park Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Koregaon Park Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Koregaon Park Call Me 7737669865 Budget Friendly No Advance Bookingroncy bisnoi
 
The Economic History of the U.S. Lecture 21.pdf
The Economic History of the U.S. Lecture 21.pdfThe Economic History of the U.S. Lecture 21.pdf
The Economic History of the U.S. Lecture 21.pdfGale Pooley
 
Booking open Available Pune Call Girls Wadgaon Sheri 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Wadgaon Sheri  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Wadgaon Sheri  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Wadgaon Sheri 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
 
VVIP Pune Call Girls Katraj (7001035870) Pune Escorts Nearby with Complete Sa...
VVIP Pune Call Girls Katraj (7001035870) Pune Escorts Nearby with Complete Sa...VVIP Pune Call Girls Katraj (7001035870) Pune Escorts Nearby with Complete Sa...
VVIP Pune Call Girls Katraj (7001035870) Pune Escorts Nearby with Complete Sa...Call Girls in Nagpur High Profile
 
Call US 📞 9892124323 ✅ Kurla Call Girls In Kurla ( Mumbai ) secure service
Call US 📞 9892124323 ✅ Kurla Call Girls In Kurla ( Mumbai ) secure serviceCall US 📞 9892124323 ✅ Kurla Call Girls In Kurla ( Mumbai ) secure service
Call US 📞 9892124323 ✅ Kurla Call Girls In Kurla ( Mumbai ) secure servicePooja Nehwal
 
Solution Manual for Principles of Corporate Finance 14th Edition by Richard B...
Solution Manual for Principles of Corporate Finance 14th Edition by Richard B...Solution Manual for Principles of Corporate Finance 14th Edition by Richard B...
Solution Manual for Principles of Corporate Finance 14th Edition by Richard B...ssifa0344
 
The Economic History of the U.S. Lecture 26.pdf
The Economic History of the U.S. Lecture 26.pdfThe Economic History of the U.S. Lecture 26.pdf
The Economic History of the U.S. Lecture 26.pdfGale Pooley
 
05_Annelore Lenoir_Docbyte_MeetupDora&Cybersecurity.pptx
05_Annelore Lenoir_Docbyte_MeetupDora&Cybersecurity.pptx05_Annelore Lenoir_Docbyte_MeetupDora&Cybersecurity.pptx
05_Annelore Lenoir_Docbyte_MeetupDora&Cybersecurity.pptxFinTech Belgium
 
VIP Independent Call Girls in Bandra West 🌹 9920725232 ( Call Me ) Mumbai Esc...
VIP Independent Call Girls in Bandra West 🌹 9920725232 ( Call Me ) Mumbai Esc...VIP Independent Call Girls in Bandra West 🌹 9920725232 ( Call Me ) Mumbai Esc...
VIP Independent Call Girls in Bandra West 🌹 9920725232 ( Call Me ) Mumbai Esc...dipikadinghjn ( Why You Choose Us? ) Escorts
 
02_Fabio Colombo_Accenture_MeetupDora&Cybersecurity.pptx
02_Fabio Colombo_Accenture_MeetupDora&Cybersecurity.pptx02_Fabio Colombo_Accenture_MeetupDora&Cybersecurity.pptx
02_Fabio Colombo_Accenture_MeetupDora&Cybersecurity.pptxFinTech Belgium
 
06_Joeri Van Speybroek_Dell_MeetupDora&Cybersecurity.pdf
06_Joeri Van Speybroek_Dell_MeetupDora&Cybersecurity.pdf06_Joeri Van Speybroek_Dell_MeetupDora&Cybersecurity.pdf
06_Joeri Van Speybroek_Dell_MeetupDora&Cybersecurity.pdfFinTech Belgium
 
The Economic History of the U.S. Lecture 17.pdf
The Economic History of the U.S. Lecture 17.pdfThe Economic History of the U.S. Lecture 17.pdf
The Economic History of the U.S. Lecture 17.pdfGale Pooley
 
Best VIP Call Girls Noida Sector 18 Call Me: 8448380779
Best VIP Call Girls Noida Sector 18 Call Me: 8448380779Best VIP Call Girls Noida Sector 18 Call Me: 8448380779
Best VIP Call Girls Noida Sector 18 Call Me: 8448380779Delhi Call girls
 
The Economic History of the U.S. Lecture 20.pdf
The Economic History of the U.S. Lecture 20.pdfThe Economic History of the U.S. Lecture 20.pdf
The Economic History of the U.S. Lecture 20.pdfGale Pooley
 
Pooja 9892124323 : Call Girl in Juhu Escorts Service Free Home Delivery
Pooja 9892124323 : Call Girl in Juhu Escorts Service Free Home DeliveryPooja 9892124323 : Call Girl in Juhu Escorts Service Free Home Delivery
Pooja 9892124323 : Call Girl in Juhu Escorts Service Free Home DeliveryPooja Nehwal
 
The Economic History of the U.S. Lecture 18.pdf
The Economic History of the U.S. Lecture 18.pdfThe Economic History of the U.S. Lecture 18.pdf
The Economic History of the U.S. Lecture 18.pdfGale Pooley
 
The Economic History of the U.S. Lecture 30.pdf
The Economic History of the U.S. Lecture 30.pdfThe Economic History of the U.S. Lecture 30.pdf
The Economic History of the U.S. Lecture 30.pdfGale Pooley
 
The Economic History of the U.S. Lecture 25.pdf
The Economic History of the U.S. Lecture 25.pdfThe Economic History of the U.S. Lecture 25.pdf
The Economic History of the U.S. Lecture 25.pdfGale Pooley
 

Recently uploaded (20)

Call Girls Koregaon Park Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Koregaon Park Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Koregaon Park Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Koregaon Park Call Me 7737669865 Budget Friendly No Advance Booking
 
The Economic History of the U.S. Lecture 21.pdf
The Economic History of the U.S. Lecture 21.pdfThe Economic History of the U.S. Lecture 21.pdf
The Economic History of the U.S. Lecture 21.pdf
 
Booking open Available Pune Call Girls Wadgaon Sheri 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Wadgaon Sheri  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Wadgaon Sheri  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Wadgaon Sheri 6297143586 Call Hot Ind...
 
VVIP Pune Call Girls Katraj (7001035870) Pune Escorts Nearby with Complete Sa...
VVIP Pune Call Girls Katraj (7001035870) Pune Escorts Nearby with Complete Sa...VVIP Pune Call Girls Katraj (7001035870) Pune Escorts Nearby with Complete Sa...
VVIP Pune Call Girls Katraj (7001035870) Pune Escorts Nearby with Complete Sa...
 
Call US 📞 9892124323 ✅ Kurla Call Girls In Kurla ( Mumbai ) secure service
Call US 📞 9892124323 ✅ Kurla Call Girls In Kurla ( Mumbai ) secure serviceCall US 📞 9892124323 ✅ Kurla Call Girls In Kurla ( Mumbai ) secure service
Call US 📞 9892124323 ✅ Kurla Call Girls In Kurla ( Mumbai ) secure service
 
Solution Manual for Principles of Corporate Finance 14th Edition by Richard B...
Solution Manual for Principles of Corporate Finance 14th Edition by Richard B...Solution Manual for Principles of Corporate Finance 14th Edition by Richard B...
Solution Manual for Principles of Corporate Finance 14th Edition by Richard B...
 
The Economic History of the U.S. Lecture 26.pdf
The Economic History of the U.S. Lecture 26.pdfThe Economic History of the U.S. Lecture 26.pdf
The Economic History of the U.S. Lecture 26.pdf
 
05_Annelore Lenoir_Docbyte_MeetupDora&Cybersecurity.pptx
05_Annelore Lenoir_Docbyte_MeetupDora&Cybersecurity.pptx05_Annelore Lenoir_Docbyte_MeetupDora&Cybersecurity.pptx
05_Annelore Lenoir_Docbyte_MeetupDora&Cybersecurity.pptx
 
VIP Independent Call Girls in Bandra West 🌹 9920725232 ( Call Me ) Mumbai Esc...
VIP Independent Call Girls in Bandra West 🌹 9920725232 ( Call Me ) Mumbai Esc...VIP Independent Call Girls in Bandra West 🌹 9920725232 ( Call Me ) Mumbai Esc...
VIP Independent Call Girls in Bandra West 🌹 9920725232 ( Call Me ) Mumbai Esc...
 
02_Fabio Colombo_Accenture_MeetupDora&Cybersecurity.pptx
02_Fabio Colombo_Accenture_MeetupDora&Cybersecurity.pptx02_Fabio Colombo_Accenture_MeetupDora&Cybersecurity.pptx
02_Fabio Colombo_Accenture_MeetupDora&Cybersecurity.pptx
 
(INDIRA) Call Girl Mumbai Call Now 8250077686 Mumbai Escorts 24x7
(INDIRA) Call Girl Mumbai Call Now 8250077686 Mumbai Escorts 24x7(INDIRA) Call Girl Mumbai Call Now 8250077686 Mumbai Escorts 24x7
(INDIRA) Call Girl Mumbai Call Now 8250077686 Mumbai Escorts 24x7
 
06_Joeri Van Speybroek_Dell_MeetupDora&Cybersecurity.pdf
06_Joeri Van Speybroek_Dell_MeetupDora&Cybersecurity.pdf06_Joeri Van Speybroek_Dell_MeetupDora&Cybersecurity.pdf
06_Joeri Van Speybroek_Dell_MeetupDora&Cybersecurity.pdf
 
The Economic History of the U.S. Lecture 17.pdf
The Economic History of the U.S. Lecture 17.pdfThe Economic History of the U.S. Lecture 17.pdf
The Economic History of the U.S. Lecture 17.pdf
 
Best VIP Call Girls Noida Sector 18 Call Me: 8448380779
Best VIP Call Girls Noida Sector 18 Call Me: 8448380779Best VIP Call Girls Noida Sector 18 Call Me: 8448380779
Best VIP Call Girls Noida Sector 18 Call Me: 8448380779
 
The Economic History of the U.S. Lecture 20.pdf
The Economic History of the U.S. Lecture 20.pdfThe Economic History of the U.S. Lecture 20.pdf
The Economic History of the U.S. Lecture 20.pdf
 
Pooja 9892124323 : Call Girl in Juhu Escorts Service Free Home Delivery
Pooja 9892124323 : Call Girl in Juhu Escorts Service Free Home DeliveryPooja 9892124323 : Call Girl in Juhu Escorts Service Free Home Delivery
Pooja 9892124323 : Call Girl in Juhu Escorts Service Free Home Delivery
 
The Economic History of the U.S. Lecture 18.pdf
The Economic History of the U.S. Lecture 18.pdfThe Economic History of the U.S. Lecture 18.pdf
The Economic History of the U.S. Lecture 18.pdf
 
Veritas Interim Report 1 January–31 March 2024
Veritas Interim Report 1 January–31 March 2024Veritas Interim Report 1 January–31 March 2024
Veritas Interim Report 1 January–31 March 2024
 
The Economic History of the U.S. Lecture 30.pdf
The Economic History of the U.S. Lecture 30.pdfThe Economic History of the U.S. Lecture 30.pdf
The Economic History of the U.S. Lecture 30.pdf
 
The Economic History of the U.S. Lecture 25.pdf
The Economic History of the U.S. Lecture 25.pdfThe Economic History of the U.S. Lecture 25.pdf
The Economic History of the U.S. Lecture 25.pdf
 

Swiss part2

  • 1. Arthur CHARPENTIER, Life insurance, and actuarial models, with R Actuarial Science with 2. life insurance & mortality tables Arthur Charpentier joint work with Christophe Dutang & Vincent Goulet and Rob Hyndman’s demography package Meielisalp 2012 Conference, June 6th R/Rmetrics Meielisalp Workshop & Summer School on Computational Finance and Financial Engineering 1
  • 2. Arthur CHARPENTIER, Life insurance, and actuarial models, with R Some (standard) references Pitacco, E., Denuit, M., Haberman, S. & Olivieri, A. (2008) Modeling Longevity Dynamics for Pensions and Annuity Business Oxford University Press Schoen, R. (2007) Dynamic Population Models Springer Verlag 2
  • 3. Arthur CHARPENTIER, Life insurance, and actuarial models, with R A possible motivation ? 3
  • 4. Arthur CHARPENTIER, Life insurance, and actuarial models, with R Lexis diagram, age and time From Lexis (1880), idea of visualizing lifetime, age x, time t and year of birth y 4
  • 5. Arthur CHARPENTIER, Life insurance, and actuarial models, with R Lexis diagram, age and time Idea : Life tables Lx should depend on time, Lx,t . Let Dx,t denote the number of deaths of people aged x, during year t, data frame DEATH and let Ex,t denote the exposure, of age x, during year t, data frame EXPOSURE, from http://www.mortality.org/ 5
  • 6. Arthur CHARPENTIER, Life insurance, and actuarial models, with R Lexis diagram, age and time Remark : be carefull of age 110+ > DEATH$Age=as.numeric(as.character(DEATH$Age)) > DEATH$Age[is.na(DEATH$Age)]=110 > EXPOSURE$Age=as.numeric(as.character(EXPOSURE$Age)) > EXPOSURE$Age[is.na(EXPOSURE$Age)]=110 Consider force of mortality function Dx,t µx,t = Ex,t > MU=DEATH[,3:5]/EXPOSURE[,3:5] > MUT=matrix(MU[,3],length(AGE),length(ANNEE)) > persp(AGE[1:100],ANNEE,log(MUT[1:100,]), + theta=-30,col="light green",shade=TRUE) 6
  • 7. Arthur CHARPENTIER, Life insurance, and actuarial models, with R 7
  • 8. Arthur CHARPENTIER, Life insurance, and actuarial models, with R Tables, per year t and Survival lifetimes Let us study deaths occurred in year=1900 or 2000, x → log µx,t when t = 1900 or 2000. > D=DEATH[DEATH$Year==year,]; E=EXPOSURE[EXPOSURE$Year==year,] > MU = D[,3:5]/E[,3:5] > plot(0:110,log(MU[,1]),type="l",col="red"); lines(0:110,log(MU[,2]),col="blue") x Evolution of x → Lx,t = exp − µh,t dh when t = 1900 or 2000, 0 > PH=PF=matrix(NA,111,111) > for(x in 0:110){ + PH[x+1,1:(111-x)]=exp(-cumsum(MU[(x+1):111,2])) + PF[x+1,1:(111-x)]=exp(-cumsum(MU[(x+1):111,1]))} > x=0; plot(1:111,PH[x+1,],ylim=c(0,1),type="l",col="blue") > lines(1:111,PF[x+1,],col="red") 8
  • 9. Arthur CHARPENTIER, Life insurance, and actuarial models, with R Tables, per year t and Survival lifetimes 0 Mortality rate 1900 Mortality rate 2000 0 −2 −2 Death rate (log) Death rate (log) −4 −4 −6 −6 Female Female Male Male −8 −8 −10 −10 0 20 40 60 80 100 0 20 40 60 80 100 Age Age 9
  • 10. Arthur CHARPENTIER, Life insurance, and actuarial models, with R Tables, per year t and Survival lifetimes 1.0 Survival probability in 1900 Survival probability in 2000 1.0 0.8 0.8 Survival probability at age 0 in 1900 Survival probability at age 0 in 2000 0.6 0.6 0.4 0.4 0.2 0.2 Female Female Male Male 0.0 0.0 0 20 40 60 80 100 0 20 40 60 80 100 Age Age 10
  • 11. Arthur CHARPENTIER, Life insurance, and actuarial models, with R Survival lifetimes and rectangularization’ 1.0 Male Mortality Female Mortality 1.0 2000 2000 1990 1990 0.8 0.8 1980 1980 1970 1970 Survival probability at birth Survival probability at birth 0.6 0.6 1960 1960 1950 1950 0.4 0.4 1940 1940 1930 1930 0.2 0.2 1920 1920 1910 1910 0.0 0.0 1900 1900 0 20 40 60 80 100 120 0 20 40 60 80 100 120 Age Age 11
  • 12. Arthur CHARPENTIER, Life insurance, and actuarial models, with R Life table and transversality > XV<-unique(Deces$Age); YV<-unique(Deces$Year) > DTF<-t(matrix(Deces[,3],length(XV),length(YV))) > ownames(DTF)=YV;colnames(DTF)=XV > t(DTF)[1:13,1:10] 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 0 64039 61635 56421 53321 52573 54947 50720 53734 47255 46997 1 12119 11293 10293 10616 10251 10514 9340 10262 10104 9517 2 6983 6091 5853 5734 5673 5494 5028 5232 4477 4094 3 4329 3953 3748 3654 3382 3283 3294 3262 2912 2721 4 3220 3063 2936 2710 2500 2360 2381 2505 2213 2078 5 2284 2149 2172 2020 1932 1770 1788 1782 1789 1751 6 1834 1836 1761 1651 1664 1433 1448 1517 1428 1328 7 1475 1534 1493 1420 1353 1228 1259 1250 1204 1108 8 1353 1358 1255 1229 1251 1169 1132 1134 1083 961 9 1175 1225 1154 1008 1089 981 1027 1025 957 885 10 1174 1114 1063 984 977 882 955 937 942 812 11 1162 1055 1038 1020 945 954 931 936 880 851 12 1100 1254 1076 1034 1023 1009 1041 1026 954 908 13 1251 1283 1190 1126 1108 1093 1111 1054 1103 940 12
  • 13. Arthur CHARPENTIER, Life insurance, and actuarial models, with R Life table and transversality It might be interesting to follow a cohort, per year of birth x − t, > Nannee <- max(DEATH$Year) > naissance <- 1950 > taille <- Nannee - naissance > Vage <- seq(0,length=taille+1) > Vnaissance <- seq(naissance,length=taille+1) > Cagreg <- DEATH$Year*1000+DEATH$Age > Vagreg <- Vnaissance*1000+Vage > indice <- Cagreg%in%Vagreg > DEATH[indice,] Year Age Female Male Total 5662 1950 0 18943.05 25912.38 44855.43 5774 1951 1 2078.41 2500.70 4579.11 5886 1952 2 693.20 810.32 1503.52 5998 1953 3 375.08 467.12 842.20 6110 1954 4 287.04 329.09 616.13 6222 1955 5 205.03 246.07 451.10 6334 1956 6 170.00 244.00 414.00 13
  • 14. Arthur CHARPENTIER, Life insurance, and actuarial models, with R Life table and transversality 0 Mortality rate 1900 Mortality rate 1950 0 −2 −2 Death rate (log) Death rate (log) −4 −4 −6 −6 Longitudinal Longitudinal Female Female Male Male Transversal Transversal Female Female −8 −8 Male Male −10 −10 0 20 40 60 80 100 0 20 40 60 80 100 Age Age 14
  • 15. Arthur CHARPENTIER, Life insurance, and actuarial models, with R Lee & Carter (1992) model Assume here (as in the original model) log µx,t = αx + βx · κt + εx,t , with some i.i.d. noise εx,t . Identification assumptions are usually xM tM βx = 1 and κt = 0. x=xm t=tm Then sets of parameters α = (αx ), β = (βx ) and κ = (κt ), are obtained solving 2 ˆ ˆ αx , βx , κt = arg min (ln µxt − αx − βx · kt ) . x,t 15
  • 16. Arthur CHARPENTIER, Life insurance, and actuarial models, with R Using demography package Package demography can be used to fit a Lee-Carter model > library(forecast) > library(demography) > YEAR=unique(DEATH$Year);nC=length(YEAR) > AGE =unique(DEATH$Age);nL=length(AGE) > MUF =matrix(DEATH$Female/EXPOSURE$Female,nL,nC) > MUH =matrix(DEATH$Male/EXPOSURE$Male,nL,nC) > POPF=matrix(EXPOSURE$Female,nL,nC) > POPH=matrix(EXPOSURE$Male,nL,nC) Then wo use the demogdata format > BASEH <- demogdata(data=MUH, pop=POPH, ages=AGE, years=YEAR, type="mortality", + label="France", name="Hommes", lambda=1) > BASEF <- demogdata(data=MUF, pop=POPF,ages=AGE, years=YEAR, type="mortality", + label="France", name="Femmes", lambda=1) 16
  • 17. Arthur CHARPENTIER, Life insurance, and actuarial models, with R Estimation of α = (αx ) and β = (βx ) The code is simply LCH <- lca(BASEH) > plot(LCH$age,LCH$ax,col="blue"); plot(LCH$age,LCH$bx,col="blue") q q 0.025 q qq qq qq −1 q q q q q q q q q q q q q q −2 0.020 q q q q q q q q q q q q q q q q q q q q qq qq −3 q q qq q q q q q q q q q q q 0.015 q qq q q q LCH$ax LCH$bx q q q q q qq q q q q q −4 q q q q q q q q q q qq q q q 0.010 q q qq q q −5 qq q q q q qq q q q qq qq q qq q qqqqq qqqqq q q q q q −6 q qq q qq 0.005 qqqq qq q qqqqqqq qq q qqqqqqq qqq qq qq q q qqq qq q q q q qq q q q q −7 q q q q q q qq qq qq q 0 20 40 60 80 100 0 20 40 60 80 100 LCH$age LCH$age 17
  • 18. Arthur CHARPENTIER, Life insurance, and actuarial models, with R Estimation and projection of κ = (κt )’s Use library(forcast) to predict future κt ’s, e.g. using exponential smoothing > library(forecast) > Y <- LCH$kt > (ETS <- ets(Y)) ETS(A,N,N) Call: ets(y = Y) Smoothing parameters: alpha = 0.8923 Initial states: l = 71.5007 sigma: 12.3592 AIC AICc BIC 18
  • 19. Arthur CHARPENTIER, Life insurance, and actuarial models, with R 1042.074 1042.190 1047.420 > plot(forecast(ETS,h=100)) But as in Lee & Carter original model, it is possible to fit an ARMA(1,1) model, on the differentiate series (∆κt ) ∆κt = φ∆κt−1 + δ + ut − θut−1 It is also possible to consider a linear tendency κt = α + βt + φκt−1 + ut − θut−1 . > (ARIMA <- auto.arima(Y,allowdrift=TRUE)) Series: Y ARIMA(0,1,0) with drift Call: auto.arima(x = Y, allowdrift = TRUE) Coefficients: 19
  • 20. Arthur CHARPENTIER, Life insurance, and actuarial models, with R drift -1.9346 s.e. 1.1972 sigma^2 estimated as 151.9: log likelihood = -416.64 AIC = 837.29 AICc = 837.41 BIC = 842.62 > plot(forecast(ARIMA,h=100)) 20
  • 21. Arthur CHARPENTIER, Life insurance, and actuarial models, with R Projection of κt ’s Forecasts from ETS(A,N,N) Forecasts from ARIMA(0,1,0) with drift q q qq q qq q 100 100 q q qq qq q q q q q q q q q q q q qq q q qq q q qq q q qq q q q qq q q qq q q qq q q qq q q qq qq q q qq q q q qq qq q q qq q q qqqq q qq qqqq q qq qq qqq q qq qqq q qqq qqq 0 0 q qq q q qq q qqqq q q qqqq qqqq q q qqqq q qq qq qq q qq qq qq q q q qq q q qq q qq qq qq qq qq qq q q q q q q q q q q −100 −100 qq qq qq q qq q q qq q qq qq qq qq qq qq qq −200 −200 −300 −300 −400 −400 −500 −500 1900 1950 2000 2050 2100 1900 1950 2000 2050 2100 21
  • 22. Arthur CHARPENTIER, Life insurance, and actuarial models, with R Shouldn’t we start modeling after 1945 ? Starting in 1948, LCH0 <- lca(BASEH,years=1948:2005) q q q 0.025 q qqq q q qq q q q q q q q q q q q −2 q q q q 0.020 q q q q q q q q q q q q q q q q q q q q q q qq q qq q q q qq q q q q q q q q q 0.015 q qq q q −4 q q LCH$ax LCH$bx q qq q q q q q qq q q q q q qq q qq q qq q q q qq q qq 0.010 q qq q qq q qq q qqqqq qqqqq q q q q −6 q q q q q q q q qq q q q qq q qq 0.005 q qqqq q qq q q qqqqqqq qq qqqqqqq qqq q q q qq qq qq q qqq qqq qq q q q q q −8 qq q 0 20 40 60 80 100 0 20 40 60 80 100 LCH$age LCH$age 22
  • 23. Arthur CHARPENTIER, Life insurance, and actuarial models, with R Projection of κt ’s Forecasts from ARIMA(0,1,0) with drift Forecasts from ARIMA(1,1,0) with drift q qq q 100 100 q qq q q q q q q qq q q qq q q q qq q q qq q q qq qq q q qq q q qqqq q qq qq qq qqq q qq qqq qqq 0 0 q qq q q qq qqqq q q qqqq qq q qqqq qqqq q qq qq qq q qq qq qq q q q qq q q qq q qq qq qq qq qq qq q q q q q q q q q q −100 −100 qq qq qq q qq q q qq q qq qq qq qq qq qq qq −200 −200 −300 −300 −400 −400 −500 −500 1900 1950 2000 2050 2100 1900 1950 2000 2050 2100 23
  • 24. Arthur CHARPENTIER, Life insurance, and actuarial models, with R Projection of life expectancy, born in 2005 > LCHT=lifetable(LCHf); plot(0:100,LCHT$ex[,5],type="l",col="red") > LCHTu=lifetable(LCHf,"upper"); lines(0:100,LCHTu$ex[,5],lty=2) > LCHTl=lifetable(LCHf,"lower"); lines(0:100,LCHTl$ex[,5],lty=2) Life expectancy in 2005 80 60 Residual expected liftime 40 20 0 0 20 40 60 80 100 Age 24
  • 25. Arthur CHARPENTIER, Life insurance, and actuarial models, with R Residuals in Lee & Carter model Recall that log µx,t = αx + βx · κt + εx,t Let εx,t denote pseudo-residuals, obtained from estimation εx,t = log µx,t − αx + βx · κt . > RES=residuals(LCH,"pearson") > colr=function(k) rainbow(110)[k*100] > couleur=Vectorize(colr)(seq(.01,1,by=.01)) > plot(rep(RES$y,length(RES$x)),(RES$z),col=couleur[rep(RES$x, + each=length(RES$y))-RES$x[1]+1]) > plot(rep(RES$x,each=length(RES$y)),t(RES$z),col=couleur[rep(RES$y,length(RES$x))+1]) 25