Statistique de l'assurance STT6705V, partie 12 bis
By arthur charpentier on Tuesday, December 7 2010, 10:16 - actuariat 10/11 STT6705V - Permalink
In the previous post (here) discussing forecasts of actuarial quantities, I did not mention much how to forecast the temporal component in the Lee-Carter model. Actually, many things can be done. Consider here some exponential smoothing techniques (see here for more details). For instance, with a simple model, with an additive error, no trend and no seasonal component,

or equivalently

Then
, and if we want a confidence interval
Here, a natural idea will probably be to take into account a linear trend on the series, i.e.

where

then the forecast we make is
i.e.
It is also possible to ask for an "optimal" exponential smoothing model (without any specification)

Another idea can be to consider some autoregressive integrated moving average models (ARIMA), here with a linear trend

For instance, if we want only the integrated component, i.e.

then the code is
But note that any kind of ARIMA model can be considered, e.g. integrated with an autoregressive component (here of order 1)
or with also a moving average component (again of order 1)
Actually, note that, once again, we can ask for an automatic selection of the model,

Finally, it is possible to use also also some specific functions of the package, for instance to consider a random walk with a drift,
or Holt model (with a trend)
And if all that is not enough, it is also possible to go further by changing the size of the series we use to fit the model. A question that naturally arises is the treatment of wars in our model: shouldn't we assume that the forecast should be based only on the last 50 years (and exclude wars from our analysis) ? In that case, for instance, the exponential smoothing technique gives
while the ARIMA procedure returns
And finally, with the Holt technique, we have
So, it looks like we have a lot of techniques that can be used to provide a forecast for the temporal component in the Lee-Carter model,
All those estimators can be used to estimate annuities of insurance contracts (as here),
Hence, here the difference is significant,
or graphically,


or equivalently

Then
, and if we want a confidence interval > (ETS.ANN=ets(Y,model="ANN"))
ETS(A,N,N)
Call:
ets(y = Y, model = "ANN")
Smoothing parameters:
alpha = 0.7039
Initial states:
l = 75.0358
sigma: 11.4136
AIC AICc BIC
941.0089 941.1339 946.1991
> plot(forecast(ETS.ANN,h=100))
Here, a natural idea will probably be to take into account a linear trend on the series, i.e.

where

then the forecast we make is
i.e.
It is also possible to ask for an "optimal" exponential smoothing model (without any specification)> ETS
ETS(A,A,N)
Call:
ets(y = Y)
Smoothing parameters:
alpha = 0.6107
beta = 1e-04
Initial states:
l = 74.5622
b = -1.9812
sigma: 11.0094
AIC AICc BIC
937.8695 938.2950 948.2500
> plot(forecast(ETS,h=100))

Another idea can be to consider some autoregressive integrated moving average models (ARIMA), here with a linear trend

For instance, if we want only the integrated component, i.e.

then the code is
> ARIMA010T=Arima(Y,order=c(0,1,0),include.drift=TRUE)
Series: Y
ARIMA(0,1,0) with drift
Call: Arima(x = Y, order = c(0, 1, 0), include.drift = TRUE)
Coefficients:
drift
-2.0337
s.e. 1.1904
sigma^2 estimated as 138.9: log likelihood = -380.8
AIC = 765.6 AICc = 765.73 BIC = 770.77
> plot(forecast(ARIMA010T,h=100))
But note that any kind of ARIMA model can be considered, e.g. integrated with an autoregressive component (here of order 1)
or with also a moving average component (again of order 1)
Actually, note that, once again, we can ask for an automatic selection of the model,> (autoARIMA=auto.arima(Y,allowdrift=TRUE))
Series: Y
ARIMA(0,1,1) with drift
Call: auto.arima(x = Y, allowdrift = TRUE)
Coefficients:
ma1 drift
-0.3868 -2.0139
s.e. 0.0970 0.6894
sigma^2 estimated as 122.3: log likelihood = -374.65
AIC = 755.29 AICc = 755.55 BIC = 763.05
> plot(forecast(autoARIMA,h=100))

Finally, it is possible to use also also some specific functions of the package, for instance to consider a random walk with a drift,
RWF=rwf(Y,h=100,drift=TRUE)
plot(RWF)
or Holt model (with a trend)HOLT=holt(Y,h=100,damped=TRUE)
plot(HOLT)
And if all that is not enough, it is also possible to go further by changing the size of the series we use to fit the model. A question that naturally arises is the treatment of wars in our model: shouldn't we assume that the forecast should be based only on the last 50 years (and exclude wars from our analysis) ? In that case, for instance, the exponential smoothing technique gives
while the ARIMA procedure returns
And finally, with the Holt technique, we have
So, it looks like we have a lot of techniques that can be used to provide a forecast for the temporal component in the Lee-Carter model,
All those estimators can be used to estimate annuities of insurance contracts (as here),BASEB=BASEB[,1:99]
BASEC=BASEC[,1:99]
AGE=AGE[1:99]
library(gnm)
D=as.vector(BASEB)
E=as.vector(BASEC)
A=rep(AGE,each=length(ANNEE))
Y=rep(ANNEE,length(AGE))
base=data.frame(D,E,A,Y,a=as.factor(A),
y=as.factor(Y))
LC2=gnm(D~a+Mult(a,y),offset=log(E),
family=poisson,data=base)
A=LC2$coefficients[1]+LC2$coefficients[2:99]
B=LC2$coefficients[100:198]
K0=LC2$coefficients[199:297]
Y=as.numeric(K01)
K1=c(K0,forecast(ets(Y),h=120)$mean)
K2=c(K0,forecast(auto.arima(Y,allowdrift=TRUE),h=120)$mean)
K3=c(K0,rwf(Y,h=120,drift=TRUE)$mean)
K4=c(K0,holt(Y,h=120,drift=TRUE)$mean)
K5=c(K0,forecast(ets(Y[50:99]),h=120)$mean)
K6=c(K0,forecast(auto.arima(Y[50:99],allowdrift=TRUE),h=120)$mean)
K7=c(K0,rwf(Y[50:99],h=120,drift=TRUE)$mean)
K8=c(K0,holt(Y[50:99],h=120,drift=TRUE)$mean)
MU=matrix(NA,length(A),length(K1))
MU1=MU2=MU3=MU4=MU5=MU6=MU7=MU8=MU
for(i in 1:length(A)){
for(j in 1:length(K1)){
MU1[i,j]=exp(A[i]+B[i]*K1[j])
MU2[i,j]=exp(A[i]+B[i]*K5[j])
MU3[i,j]=exp(A[i]+B[i]*K3[j])
MU4[i,j]=exp(A[i]+B[i]*K4[j])
MU5[i,j]=exp(A[i]+B[i]*K5[j])
MU6[i,j]=exp(A[i]+B[i]*K6[j])
MU7[i,j]=exp(A[i]+B[i]*K7[j])
MU8[i,j]=exp(A[i]+B[i]*K8[j])
}}
t=2000
x=40
s=seq(0,98-x-1)
Pxt1=cumprod(exp(-diag(MU1[x+1+s,t+s-1898])))
Pxt2=cumprod(exp(-diag(MU2[x+1+s,t+s-1898])))
Pxt3=cumprod(exp(-diag(MU3[x+1+s,t+s-1898])))
Pxt4=cumprod(exp(-diag(MU4[x+1+s,t+s-1898])))
Pxt5=cumprod(exp(-diag(MU5[x+1+s,t+s-1898])))
Pxt6=cumprod(exp(-diag(MU6[x+1+s,t+s-1898])))
Pxt7=cumprod(exp(-diag(MU7[x+1+s,t+s-1898])))
Pxt8=cumprod(exp(-diag(MU8[x+1+s,t+s-1898])))
r=.035
m=70
h=seq(0,21)
V1=1/(1+r)^(m-x+h)*Pxt1[m-x+h]
V2=1/(1+r)^(m-x+h)*Pxt2[m-x+h]
V3=1/(1+r)^(m-x+h)*Pxt3[m-x+h]
V4=1/(1+r)^(m-x+h)*Pxt4[m-x+h]
V5=1/(1+r)^(m-x+h)*Pxt5[m-x+h]
V6=1/(1+r)^(m-x+h)*Pxt6[m-x+h]
V7=1/(1+r)^(m-x+h)*Pxt7[m-x+h]
V8=1/(1+r)^(m-x+h)*Pxt8[m-x+h]
> M=cbind(V1,V2,V3,V4,V5,V6,V7,V8) > apply(M,2,sum) V1 V2 V3 V4 V5 V6 V7 V8 4.389372 4.632793 4.406465 4.389372 4.632793 4.468934 4.482064 4.632793








Comments
Do you use these methods to predict long term values?
In my point of view this econometric models are good to predict for the next, say, 3 or 4 years. Not for the next 50 years...
Even if you use a long time series there will be a facing structural changes. In other words; the 1970s were very different from the 1980s and 1990s, and these time series models relays on a implicit assumption, that the: previous year values are somehow similar to this year. But this can not go forever,
We can only use these models for the long run when you assume that reality will work exactly the same way. But you know this is a hell of an assumption.
When I'm facing a challenge that demands a very long term projections I usually use a casualty-financial-structural model. The principal here comes from Casablanca: “as times goes by, the fundamental things still apply”. So you take of all the conjectural details and you relay on the theory. To find some confidant intervals you do some montecarlo experiments.
RESPONSE: I agree, for instance Box and Jenkins say that if you have n observations, it is not relevant to try to forecast on a higher horizon than n/6... This is exactly the message I tried to deliver when I gave a talk last winter (here). I also mentioned it here, saying that we should at least check that simulations of the model provide things similar to what we've seen in the past (there). But I will publish something more, soon, on that topic, I promise...
First of all, let me say that you are very kind giving me this quote honours. You blog is very impressive, so it feels good to be in the shoulders of giants.
I cannot replay to this post: “Is it that stupid to make extremely long term forecast when studying mortality ?” so I’m placing the comments here.
The question of how bad are the time-series forecast depends how much an error costs... In terms of money, of course. How much it cost to predict a fault of two points? It depends on each case.
(yes I agree with you) of course you can use the time series approach to give you a hint of what is going to happened in the long run - especially if you use a prudent approach. For instance if we fail in our forecasts because we were too prudent, when reality hit us, we will have a nice surprise.
That is the funny thing about the insurance forecasts – the reality will always hit us; we will always have to pay our actuarial mistakes.
But me previous point is still valid – and I know that you agree with me. How can you control that your forecast is a prudent one?
That is a difficult task. My answer relays on using a structural model.
Bonsoir
je suis en train de travailler sur l’implémentation du modèle de Lee-Carter, et je ne comprends pas les prédictions données par R quand on ajuste un processus ARIMA, ou plus précisément un processus ARMA sur la série différenciée. Je vous envoie mes codes R par email.
Merci et bonne continuation pour votre blog qui est la source des réponses à presque toutes les questions que l'on se pose avec mes collègues.