Successfully reported this slideshow.
Upcoming SlideShare
×

# Swiss part2

10,885 views

Published on

Published in: Economy & Finance, Business
• Full Name
Comment goes here.

Are you sure you want to Yes No
• Be the first to comment

### Swiss part2

1. 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. 2. Arthur CHARPENTIER, Life insurance, and actuarial models, with R Some (standard) referencesPitacco, E., Denuit, M., Haberman, S.& Olivieri, A. (2008) Modeling LongevityDynamics for Pensions and Annuity BusinessOxford University PressSchoen, R. (2007)Dynamic Population ModelsSpringer Verlag 2
3. 3. Arthur CHARPENTIER, Life insurance, and actuarial models, with R A possible motivation ? 3
4. 4. Arthur CHARPENTIER, Life insurance, and actuarial models, with R Lexis diagram, age and timeFrom Lexis (1880), idea of visualizing lifetime, age x, time t and year of birth y 4
5. 5. Arthur CHARPENTIER, Life insurance, and actuarial models, with R Lexis diagram, age and timeIdea : 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 frameDEATH and let Ex,t denote the exposure, of age x, during year t, data frameEXPOSURE, from http://www.mortality.org/ 5
6. 6. Arthur CHARPENTIER, Life insurance, and actuarial models, with R Lexis diagram, age and timeRemark : 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)]=110Consider 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. 7. Arthur CHARPENTIER, Life insurance, and actuarial models, with R 7
8. 8. Arthur CHARPENTIER, Life insurance, and actuarial models, with R Tables, per year t and Survival lifetimesLet us study deaths occurred in year=1900 or 2000, x → log µx,t when t = 1900 or2000.> 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") xEvolution 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. 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. 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. 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. 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 19080 64039 61635 56421 53321 52573 54947 50720 53734 47255 469971 12119 11293 10293 10616 10251 10514 9340 10262 10104 95172 6983 6091 5853 5734 5673 5494 5028 5232 4477 40943 4329 3953 3748 3654 3382 3283 3294 3262 2912 27214 3220 3063 2936 2710 2500 2360 2381 2505 2213 20785 2284 2149 2172 2020 1932 1770 1788 1782 1789 17516 1834 1836 1761 1651 1664 1433 1448 1517 1428 13287 1475 1534 1493 1420 1353 1228 1259 1250 1204 11088 1353 1358 1255 1229 1251 1169 1132 1134 1083 9619 1175 1225 1154 1008 1089 981 1027 1025 957 88510 1174 1114 1063 984 977 882 955 937 942 81211 1162 1055 1038 1020 945 954 931 936 880 85112 1100 1254 1076 1034 1023 1009 1041 1026 954 90813 1251 1283 1190 1126 1108 1093 1111 1054 1103 940 12
13. 13. Arthur CHARPENTIER, Life insurance, and actuarial models, with R Life table and transversalityIt 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 Total5662 1950 0 18943.05 25912.38 44855.435774 1951 1 2078.41 2500.70 4579.115886 1952 2 693.20 810.32 1503.525998 1953 3 375.08 467.12 842.206110 1954 4 287.04 329.09 616.136222 1955 5 205.03 246.07 451.106334 1956 6 170.00 244.00 414.00 13
14. 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. 15. Arthur CHARPENTIER, Life insurance, and actuarial models, with R Lee & Carter (1992) modelAssume here (as in the original model) log µx,t = αx + βx · κt + εx,t ,with some i.i.d. noise εx,t . Identiﬁcation assumptions are usually xM tM βx = 1 and κt = 0. x=xm t=tmThen 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. 16. Arthur CHARPENTIER, Life insurance, and actuarial models, with R Using demography packagePackage demography can be used to ﬁt 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. 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. 18. Arthur CHARPENTIER, Life insurance, and actuarial models, with R Estimation and projection of κ = (κt )’sUse 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. 19. Arthur CHARPENTIER, Life insurance, and actuarial models, with R1042.074 1042.190 1047.420> plot(forecast(ETS,h=100))But as in Lee & Carter original model, it is possible to ﬁt an ARMA(1,1) model,on the diﬀerentiate series (∆κt ) ∆κt = φ∆κt−1 + δ + ut − θut−1It is also possible to consider a linear tendency κt = α + βt + φκt−1 + ut − θut−1 .> (ARIMA <- auto.arima(Y,allowdrift=TRUE))Series: YARIMA(0,1,0) with driftCall: auto.arima(x = Y, allowdrift = TRUE)Coefficients: 19
20. 20. Arthur CHARPENTIER, Life insurance, and actuarial models, with R drift -1.9346s.e. 1.1972sigma^2 estimated as 151.9: log likelihood = -416.64AIC = 837.29 AICc = 837.41 BIC = 842.62> plot(forecast(ARIMA,h=100)) 20
21. 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. 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. 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. 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. 25. Arthur CHARPENTIER, Life insurance, and actuarial models, with R Residuals in Lee & Carter modelRecall that log µx,t = αx + βx · κt + εx,tLet ε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