Category Archives: Economics

R for actuarial science

As mentioned in the Appendix of Modern Actuarial Risk Theory, “R (and S) is the ‘lingua franca’ of data analysis and statistical computing, used in academia, climate research, computer science, bioinformatics, pharmaceutical industry, customer analytics, data mining, finance and by some insurers. Apart from being stable, fast, always up-to-date and very versatile, the chief advantage of R is that it is available to everyone free of charge. It has extensive and powerful graphics abilities, and is developing rapidly, being the statistical tool of choice in many academic environments.

R is based on the S statistical programming language developed by Joe Chambers at Bell labs in the 80’s. To be more specific, R is an open-source implementation of the S language, developed by Robert Gentlemn and Ross Ihaka. It is a vector based language, which makes it extremely interesting for actuarial computations. For instance, consider some Life Tables,

> TD[39:52,]       > TV[39:52,]
     Age    Lx         Age    Lx
  39  38 95237          38 97753
  40  39 94997          39 97648
  41  40 94746          40 97534
  42  41 94476          41 97413
  43  42 94182          42 97282
  44  43 93868          43 97138
  45  44 93515          44 96981
  46  45 93133          45 96810
  47  46 92727          46 96622
  48  47 92295          47 96424
  49  48 91833          48 96218
  50  49 91332          49 95995
  51  50 90778          50 95752
  52  51 90171          51 95488

Those (French) Life Tables can be found here

> TD <- read.table(
+ "https://perso.univ-rennes1.fr/arthur.charpentier/TD8890.csv",sep=";",header=TRUE)
> TV <- read.table(
+ "https://perso.univ-rennes1.fr/arthur.charpentier/TV8890.csv",sep=";",header=TRUE)

From those vectors, it is possible to construct the matrix of death probabilities, https://latex.codecogs.com/gif.latex?\boldsymbol{P}=[\text{%20}_{k}p_x], using for instance

>  Lx <- TD$Lx
>  m <- length(Lx)
>  p <- matrix(0,m,m); d <- p
>  for(i in 1:(m-1)){
+  p[1:(m-i),i] <- Lx[1+(i+1):m]/Lx[i+1]
+  d[1:(m-i),i] <- (Lx[(1+i):(m)]-Lx[(1+i):(m)+1])/Lx[i+1]}
>  diag(d[(m-1):1,]) <- 0
>  diag(p[(m-1):1,]) <- 0
>  q <- 1-p

One can compute easily, e.g., the (curtate) expectation of life defined as

https://latex.codecogs.com/gif.latex?e_x%20=\mathbb{E}(K_x)=\sum_{k=1}^\infty%20k\cdot%20\text{%20}_{k|1}q_x%20=%20\sum_{k=1}^\infty%20\text{%20}_{k}p_x

and one can compute the vector of life expectancy, at various ages https://latex.codecogs.com/gif.latex?\boldsymbol{e}=[e_x], as

> life.exp = function(x){sum(p[1:nrow(p),x])}
> e = Vectorize(life.exp)(1:m)

An actually, any kind of actuarial quantity can be derived from those matrices. The expected present value (or actuarial value) of a temporary life annuity-due is, for instance,

https://latex.codecogs.com/gif.latex?\ddot{a}_{x:\overline{n}|}=\sum_{k=0}^{n-1}%20\nu^k%20\cdot%20{}_{k}p_x%20=\frac{1-A_{x:\overline{n}|}}{1-\nu}

The code to compute those functions is here

> for(j in 1:(m-1)){ adots[,j]<-cumsum(1/(1+i)^(0:(m-1))*c(1,p[1:(m-1),j])) }

or consider the expected present value of a term insurance

https://latex.codecogs.com/gif.latex?%20A^1_{x:\overline{n}|}%20=\sum_{k=0}^{n-1}%20\nu^{k+1}%20\cdot%20\text{%20}_{k|}q_x

with the following code

> for(j in 1:(m-1)){ A[,j]<-cumsum(1/(1+i)^(1:m)*d[,j]) }

Some more details can be found in the first part of the notes of the crash courses of last summer, in Meielisalp. Vector – or matrices – are extremely convenient to work with, when dealing with life contingencies. It is also possible to model prospective mortality. Here, the mortality is not only function of the age https://latex.codecogs.com/gif.latex?x, but also time https://latex.codecogs.com/gif.latex?t,

> t(DTF)[1:10,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

Thus, we now have a force of mortality matrix https://latex.codecogs.com/gif.latex?\boldsymbol{\mu}=[\mu_{x,t}], or surface

http://freakonometrics.hypotheses.org/wp-content/blogs.dir/253/files/2013/01/Capture-d%E2%80%99e%CC%81cran-2013-01-10-a%CC%80-14.29.04.png

It is also possible to use R packages to estimate a Lee-Carter model of the mortality rate,

https://latex.codecogs.com/gif.latex?\log%20\mu%20_{x,t}%20=\alpha%20_{x}%20+\beta%20_{x}%20\cdot%20\kappa_{t}%20+\varepsilon%20_{x,t}

> library(demography)
> MUH =matrix(DEATH$Male/EXPOSURE$Male,nL,nC)
> POPH=matrix(EXPOSURE$Male,nL,nC)
> BASEH <- demogdata(data=MUH, pop=POPH, ages=AGE, years=YEAR, type="mortality",
+ label="France", name="Hommes", lambda=1)
> RES=residuals(LCH,"pearson")

One can easily study residuals, for instance as a function of the age,

http://freakonometrics.hypotheses.org/wp-content/blogs.dir/253/files/2013/01/Capture-d%E2%80%99e%CC%81cran-2013-01-10-a%CC%80-14.29.15.png

or a function of the year,

http://freakonometrics.hypotheses.org/wp-content/blogs.dir/253/files/2013/01/Capture-d%E2%80%99e%CC%81cran-2013-01-10-a%CC%80-14.29.22.png

Some more details can be found in the second part of the notes of the crash courses of last summer, in Meielisalp.

R is also interesting because of its huge number of libraries, that can be used for predictive modeling. One can easily use smoothing functions in regression, or regression trees,

> TREE = tree((nbr>0)~ageconducteur,data=sinistres,split="gini",mincut = 1)
> age = data.frame(ageconducteur=18:90)
> y1 = predict(TREE,age)
> reg = glm((nbr>0)~bs(ageconducteur),data=sinistres,family="binomial")
> y = predict(reg,age,type="response")

http://freakonometrics.hypotheses.org/files/2013/01/predictive-gam-tree.png

Some practitioners might be scared because the legend claims that R is not as good as SAS to handle large databases. Actually, a lot of functions can be used to import datasets. The most convenient one is probably

> baseCOUT = read.table("http://freakonometrics.free.fr/baseCOUT.csv",
+  sep=";",header=TRUE,encoding="latin1")
>  tail(baseCOUT,4)
     numeropol  debut_pol    fin_pol freq_paiement langue  type_prof alimentation type_territoire
6512     87291 2002-10-16 2003-01-22       mensuel      A Professeur   Vegetarien          Urbain
6513     87301 2002-10-01 2003-09-30       mensuel      A Technicien   Vegetarien          Urbain
6514     87417 2002-10-24 2003-10-21       mensuel      F Technicien   Vegetalien     Semi-urbain
6515     88128 2003-01-17 2004-01-16       mensuel      F     Avocat   Vegetarien     Semi-urbain
             utilisation presence_alarme marque_voiture sexe exposition age duree_permis age_vehicule i   coutsin
6512 Travail-occasionnel             oui           FORD    M  0.2684932  47           29           28 1 1274.5901
6513              Loisir             oui          HONDA    M  0.9972603  44           24           25 1  278.0745
6514 Travail-occasionnel             non     VOLKSWAGEN    F  0.9917808  23            3           11 1  403.1242
6515              Loisir             non           FIAT    F  0.9972603  23            4           11 1  230.9565

But if the dataset is too large, it is also possible to specify which variables might be interesting, using

> mycols = rep("NULL", 18)
> mycols[c(1,4,5,12,13,14,18)] <- NA
> baseCOUTsubC = read.table("http://freakonometrics.free.fr/baseCOUT.csv",
+  colClasses = mycols,sep=";",header=TRUE,encoding="latin1")
> head(baseCOUTsubC,4)
  numeropol freq_paiement langue sexe exposition age    coutsin
1         6        annuel      A    M  0.9945205  42   279.5839
2        27       mensuel      F    M  0.2438356  51   814.1677
3        27       mensuel      F    M  1.0000000  53   136.8634
4        76       mensuel      F    F  1.0000000  42   608.7267

It is also possible (before running a code on the entire dataset) to import only the first lines of the dataset.

> baseCOUTsubCR = read.table("http://freakonometrics.free.fr/baseCOUT.csv",
+  colClasses = mycols,sep=";",header=TRUE,encoding="latin1",nrows=100)
> tail(baseCOUTsubCR,4)
    numeropol freq_paiement langue sexe exposition age   coutsin
97       1193       mensuel      F    F  0.9972603  55  265.0621
98       1204       mensuel      F    F  0.9972603  38 9547.7267
99       1231       mensuel      F    M  1.0000000  40  442.7267
100      1245        annuel      F    F  0.6767123  48  179.1925

It is also possible to import a zipped file. The file itself has a smaller size, and it can usually be imported faster.

> import.zip = function(file){
+ temp = tempfile()
+ download.file(file,temp);
+ read.table(unz(temp, "baseFREQ.csv"),sep=";",header=TRUE,encoding="latin1")}
> system.time(import.zip("http://freakonometrics.free.fr/baseFREQ.csv.zip"))
trying URL 'http://freakonometrics.free.fr/baseFREQ.csv.zip'
Content type 'application/zip' length 692655 bytes (676 Kb)
opened URL
==================================================
downloaded 676 Kb
   user  system elapsed 
      0.762       0.029       4.578 
> system.time(read.table("http://freakonometrics.free.fr/baseFREQ.csv", 
+ sep=";",header=TRUE,encoding="latin1"))
   user  system elapsed 
      0.591       0.072       9.277

Finally, note that it is possible to import any kind of dataset, not only a text file. Even a Microsoft Excel folder. On a Windows computer, one can use SQL queries

> sheet = "c:\\Documents and Settings\\user\\excelsheet.xls"
> connection = odbcConnectExcel(sheet)
> spreadsheet = sqlTables(connection)
> query = paste("SELECT * FROM",spreadsheet$TABLE_NAME[1],sep=" ")
> result = sqlQuery(connection,query)

Then, once the dataset is imported, several functions can be used,

> cost = aggregate(coutsin~ AgeSex,mean, data=baseCOUT)
> frequency = merge(aggregate(nbsin~ AgeSex,sum, data=baseFREQ),
+ aggregate(exposition~ AgeSex,sum, data=baseFREQ))
> frequency$freq = frequency$nbsin/frequency$exposition
> base.freq.cost = merge(frequency, cost)

http://freakonometrics.hypotheses.org/wp-content/blogs.dir/253/files/2013/01/cost-freq-qc.png

Finally, R is interesting for its graphical interface. “If you can picture it in your head, chances are good that you can make it work in R. R makes it easy to read data, generate lines and points, and place them where you want them. Its very flexible and super quick. When youve only got two or three hours until deadline, R can be brilliant” as said Amanda Cox, a graphics editor at the New York Times. “R is particularly valuable in deadline situations when data is scant and time is precious.”.
Several cases were considered on the blog http ://chartsnthings.tumblr.com/…. First, we start with a simple graph, here State Government control in the US

http://freakonometrics.hypotheses.org/files/2013/01/nyt-chartsnthings-1.png

Then try to find a nice visual representation, e.g.

http://freakonometrics.hypotheses.org/wp-content/blogs.dir/253/files/2013/01/nyt-chartsnehings-2.png

And finally, you can just print it in your favorite newspaper,

http://freakonometrics.hypotheses.org/files/2013/01/nyt-chartsnthings-3.jpg

And you can get any kind of graphs,

http://freakonometrics.hypotheses.org/wp-content/blogs.dir/253/files/2013/01/nyt-6.png

And not only about politics,

http://freakonometrics.hypotheses.org/files/2013/01/nyt-7-b.jpg Graphs are important. “Its not just about producing graphics for publication. Its about playing around and making a bunch of graphics that help you explore your data. This kind of graphical analysis is a really useful way to help you understand what you’re dealing with, because if you cant see it, you cant really understand it. But when you start graphing it out, you can really see what you’ve got” as said Peter Aldhous, San Francisco bureau chief of New Scientist magazine. Even for actuaries. “The commercial insurance underwriting process was rigorous but also quite subjective and based on intuition. R enables us to communicate our analytic results in appealing and innovative ways to non-technical audiences through rapid development lifecycles. R helps us show our clients how they can improve their processes and effectiveness by enabling our consultants to conduct analyses efficiently”, as explained by John Lucker, team of advanced analytics professionals at Deloitte Consulting Principal, in http://blog.revolutionanalytics.com/r-is-hot/. See also Andrew Gelman’s view, on graphs, http://www.stat.columbia.edu/…

So yes, actuaries might be interested to use R for actuarial communication, as mentioned in http ://www.londonr.org/…

http://freakonometrics.hypotheses.org/wp-content/blogs.dir/253/files/2013/01/mango-R-4.png

The Actuarial Toolkit (see http ://www.actuaries.org.uk/…) stresses the interest of R, “The power of the language R lies with its functions for statistical modelling, data analysis and graphics ; its ability to read and write data from various data sources; as well as the opportunity to embed R in excel or other languages like VBA. In the way SAS is good for data manipulations, R is superior for modelling and graphical output“.

From 2011, Asia Capital Reinsurance Group (ACR) uses R to Solve Big Data Challenges (see http ://www.reuters.com/…). And Lloyd’s uses motion charts created with R to provide analysis to investors (as discussed on http ://blog.revolutionanalytics.com/…)

A lot of information can be found on http ://jeffreybreen.wordpress.com/…

http://freakonometrics.hypotheses.org/files/2013/01/6a010534b1db25970b01538fea1796970b-800wi.png

Markus Gesmann mentioned on his blog a lot of interesting graphs used for actuarial reporting, http ://lamages.blogspot.ca/…

http://freakonometrics.hypotheses.org/wp-content/blogs.dir/253/files/2013/01/Capture-d%E2%80%99e%CC%81cran-2013-01-10-a%CC%80-15.37.33.png

Further, R is free. Which can be compared with SAS, $6,000 per PC, or $28,000 per processor on a server (as mentioned on http ://en.wikipedia.org/…)

It is also becoming more and more popular, as a programming language. As mentioned on this month Transparent Language Popularity (see http ://lang-index.sourceforge.net/), R is ranked 12. Far away after C or Java, but before Matlab (22) or SAS (27). On StackOverFlow (see http ://stackoverflow.com/) is also far being C++ (399,232 occurrences) or Java (348,418), but with 21,818 occurrences, it appears before Matlab (14,580) and SAS (899). As mentioned on http ://r4stats.com/articles/popularity/ R is becoming more and more popular, on listserv discussion traffic

http://freakonometrics.hypotheses.org/wp-content/blogs.dir/253/files/2013/01/fig_1_listserv.png

It is clearly the most popular software in data analysis, as mentioned by the Rexer Analytics survey, in 2009

http://freakonometrics.hypotheses.org/wp-content/blogs.dir/253/files/2013/01/fig_3_rexersurvey.png

What about actuaries ? In a survey (see http ://palisade.com/…), R was not extremely popular.

http://freakonometrics.hypotheses.org/wp-content/blogs.dir/253/files/2013/01/mango-R-1.png

If we consider only statistical softwares, SAS is still far ahead, among UK and CAS actuaries

http://freakonometrics.hypotheses.org/wp-content/blogs.dir/253/files/2013/01/mango-R-2.png

But, as mentioned by Mike King, Quantitative Analyst, Bank of America, “I cant think of any programming language that has such an incredible community of users. If you have a question, you can get it answered quickly by leaders in the field. That means very little downtime.” This was also mentioned by Glenn Meyers, in the Actuarial Review “The most powerful reason for using R is the community” (in http ://nytimes.com/…). For instance, http ://r-bloggers.com/ has contributions from more than 425 R users.

As said by Bo Cowgill, from Google “The best thing about R is that it was developed by statisticians. The worst thing about R is that it was developed by statisticians.

Econometric Modeling in Finance and Insurance with the R language

On February 15th, IFM2, the Institute of Financial Mathematics in Montréal will organize an (one day) Executive workshop on Econometric Modeling in Finance and Insurance with the R language. The event is not yet mentioned in the calendar, but the syllabus can be downloaded here. Additional details (slides and R code) will be available soon, on this blog. In the morning, it will be an introduction to the R langage, and in the afternoon, we will focus on applications,

  • Principal components analysis and application to yield curves
  • Regression tree, logistic regression and application to credit scoring
  • Poisson regression and applications to claims reserving (IBNR) and projected mortality tables (LifeMetrics)

De la difficulté de faire parler les chiffres…

Parution d’un court article intituléde la difficulté de faire parler des chiffres pour analyser la gravité des accidents de la route” dans le dernier numéro de Variance. Le numéro complet est en ligne sur http://ensae.org/…. Sinon, tous les articles de vulgarisation sont en ligne sur http://freakonometrics.hypotheses.org/….

Le code pour le premier graphique (sur les tuées) est

base=read.table(
"http://freakonometrics.free.fr/base-graph-accidents-graves.txt",
header=TRUE,sep=";")
base$date=as.Date(base$date)
base$dateavant=as.Date(base$dateavant)
base$dateapres=as.Date(base$dateapres)
plot(base$date,base$compte,main="Blessés graves sur route entre 2002 et 2009",
xlab="Date",
ylab="Nombre de blessés sur la route, par jour",col="white")
points(base$dateavant,base$compteavant,col="light green")
lines(base$dateavant,base$tendanceavant,col="red",lty=2)
lines(base$dateavant,base$splinesavant,lwd=3,col="red")
points(base$dateapres,base$compteapres,col="light blue")
lines(base$dateapres,base$tendanceapres,col="red",lty=2)
lines(base$dateapres,base$splinesapres,lwd=3,col="red")

alors que pour les seconds (sur les blessés)

base=read.table(
"http://freakonometrics.free.fr/base-graph-accidents-deces.txt",
header=TRUE,sep=";")
base$date=as.Date(base$date)
base$dateavant=as.Date(base$dateavant)
base$dateapres=as.Date(base$dateapres)
plot(base$date,base$compte,main="Blessés graves sur route entre 2002 et 2009",
xlab="Date",
ylab="Nombre de blessés sur la route, par jour",col="white")
points(base$dateavant,base$compteavant,col="light green")
lines(base$dateavant,base$tendanceavant,col="red",lty=2)
lines(base$dateavant,base$splinesavant,lwd=3,col="red")
points(base$dateapres,base$compteapres,col="light blue")
lines(base$dateapres,base$tendanceapres,col="red",lty=2)
lines(base$dateapres,base$splinesapres,lwd=3,col="red")

Jeux et assurance

Félicitations à Christophe Dutang, qui a obtenu il y a quelques heures le prix Scor de la meilleure thèse de doctorat en actuariat. Christophe avait soutenu sa thèse à Lyon sur “Étude des marchés d’assurance non-vie à l’aide d’équilibres de Nash et de modèles de risques avec dépendance” (les transparents sont en ligne sur sa page, et la thèse est en ligne sur http://tel.archives-ouvertes.fr/…)

La cérémonie avait lieu mercredi soir, et je ne pouvais pas y être car je fêtais mon anniversaire en famille (et accessoirement, je suis à Montréal pour finir la session). En fait, je n’ai jamais eu l’occasion de me rendre à cette cérémonie annuelle (même lorsque le prix m’avait été attribué, voilà quelques années, car j’étais alors à Valparaiso). Je pourrais aussi souligner que si je trouve que le prix est une très bonne idée, le lieu n’est pas idéal.

Histoire de jouer un peu les vieux cons, Le Cercle de l’Union Interallié est un club très select, très sexiste (« les femmes n’ont pas accès aux instances dirigeantes du Cercle » comme le précise http://fr.wikipedia.org/…), et en plus la cravate est de rigueur pour les hommes (sinon, on ne peut pas entrer). Si je sors mon costume à l’occasion (certains collègues ont eu l’occasion de se moquer), je dois avouer que mes cravates sont depuis fort longtemps dans la malle à déguisement des enfants. Et elles ne sont pas prêt d’en sortir !

En attendant, félicitations à Christophe qui méritait le prix… Et félicitations à Aymric Kamega qui a obtenu le même soir une mention spéciale !

Interview mutualisation vs. segmentation

Hier, j’ai été un peu surpris quand un ancien collègue en France m’a parlé d’une interview exclusive (de moi) sur http://argusdelassurance.com/…. Je me suis souvenu qu’il y a quelques semaines, Madeleine m’avait contacter pour me poser quelques questions sur les assurance « à la carte », et la plus grande modularité des produits. Elle avait mis le doigt sur deux questions importantes, “comment procéder au calcul quand les offres sont personnalisées” et “est-ce intéressant pour l’assureur, pour l’assureur” ? Pour la première partie, c’est technique, et ça correspond à ce qu’on fait dans les cours de tarification (on en reparle dans quelques semaines, promis). Par contre le second point est plus troublant. Avec la théorie économique d’un côté, et les principes d’antisélection et d’aléa moral. En particulier, j’avais voulu reprendre simplement un modèle qu’on avait utilisé dans le livre avec Michel Denuit (tome 1). Cet exemple nécessite un peu de formalisation, et j’ai été très surpris de voir que Madeleine l’avait gardé. Mieux, qu’elle l’avait clarifié (il faut dire qu’elle m’avait demandé un courriel en fin de journée, et que j’avais tapé ça rapidement, tout en faisant les devoirs des grands, et le bain de la plus petite… quand je relis ce que j’avais envoyé, et ce qu’elle en a fait, je suis admiratif). Mais prenons deux minutes pour reformuler cette histoire de segmentation d’un marché de l’assurance…

Commençons par le cas le plus simple, sans segmentation, avec mutualisation parfaite (et donc prime unique). En utilisant un principe de prime pure, si https://latex.codecogs.com/gif.latex?S désigne la perte (aléatoire) pour un assuré, la prime à payer serait https://latex.codecogs.com/gif.latex?\mathbb{E}(S). Et dans ce cas, en moyenne, le bilan de l’assureur serait équilibré, car https://latex.codecogs.com/gif.latex?\mathbb{E}(S-\mathbb{E}(S))=0. Si on regarde l’incertitude associée aux dépenses (disons la variance pour faire simple), les assurés n’ont aucune variance car la dépense est la même pour tous. Tout le risque (la variance) est à la charge de l’assureur. On peut résumer ça dans le petit tableau suivant,

Assurés Assureur
Dépense https://latex.codecogs.com/gif.latex?\mathbb{E}(S) https://latex.codecogs.com/gif.latex?S-\mathbb{E}(S)
Dépense moyenne https://latex.codecogs.com/gif.latex?\mathbb{E}(S) https://latex.codecogs.com/gif.latex?0
Variance https://latex.codecogs.com/gif.latex?0 https://latex.codecogs.com/gif.latex?\text{Var}(S)

On a ici la répartition des dépenses et du risque (que nous appellerons variance, à la Markowitz) entre l’assureur et les assurés.

Continuons dans un monde parfait (disons avec information parfaite) mais avec cette fois de la segmentation (parfaite). Autrement dit, si la variable de risque est un variable https://latex.codecogs.com/gif.latex?\Omega, connue par l’assureur, alors il devrait faire payer https://latex.codecogs.com/gif.latex?\mathbb{E}(S|\Omega) pour un assuré portant le risque https://latex.codecogs.com/gif.latex?\Omega. Cette fois, la décomposition des dépenses et des risques se fait de la manière suivante

Assurés Assureur
Dépense https://latex.codecogs.com/gif.latex?\mathbb{E}(S|\Omega) https://latex.codecogs.com/gif.latex?S-\mathbb{E}(S)
Dépense moyenne https://latex.codecogs.com/gif.latex?\mathbb{E}(S) https://latex.codecogs.com/gif.latex?0
Variance https://latex.codecogs.com/gif.latex?\text{Var}(\mathbb{E}(S|\Omega)) https://latex.codecogs.com/gif.latex?\text{Var}(S-\mathbb{E}(S|\Omega))

Cette fois, l’assureur prend à sa charge les risques purement aléatoire, mais les assurés prennent à leur charge une partie de la variabilité, correspondant à l’hétérogénéité. On notera que la variance de l’assureur est ici https://latex.codecogs.com/gif.latex?\mathbb{E}(\text{Var}(S|\Omega)): on retrouve ici la formule classique de décomposition de la variance

https://latex.codecogs.com/gif.latex?\text{Var}(\mathbb{E}(S|\Omega))+\mathbb{E}(\text{Var}(S|\Omega))=\text{Var}(S)

Mais dans la vraie vie, c’est plus compliqué car avec une première composante qui repose sur les assurés, et la seconde sur les assureurs. C’est d’ailleurs le théorème de Pythagore, avec la variance liée à l’hétérogénéité à gauche, et à droite, la composante purement aléatoire. (le risque intrinsèque de l’assuré) n’est pas connu. On doit faire une segmentation imparfaite, car on dispose de quelques variables explicatives, que l’on notera par un vecteur https://latex.codecogs.com/gif.latex?\boldsymbol{X}. On va essayer de construire un proxy de la variable de risque https://latex.codecogs.com/gif.latex?\Omega. La décomposition entre l’assureur et ses assurés se fait de la manière suivante

Assurés Assureur
Dépense https://latex.codecogs.com/gif.latex?\mathbb{E}(S|\boldsymbol{X}) https://latex.codecogs.com/gif.latex?S-\mathbb{E}(S|\boldsymbol{X})
Dépense moyenne https://latex.codecogs.com/gif.latex?\mathbb{E}(S) https://latex.codecogs.com/gif.latex?0
Variance https://latex.codecogs.com/gif.latex?\text{Var}(\mathbb{E}(S|\boldsymbol{X})) https://latex.codecogs.com/gif.latex?\mathbb{E}(\text{Var}(S|\boldsymbol{X}))

qui correspond à la décomposition précédente, en remplaçant la variable non-observée https://latex.codecogs.com/gif.latex?\Omega par le proxy construit à partir de https://latex.codecogs.com/gif.latex?\boldsymbol{X}.   Là encore, en moyenne, l’assureur est à l’équilibre, car

https://latex.codecogs.com/gif.latex?\mathbb{E}(\mathbb{E}(S|\boldsymbol{X}))=\mathbb{E}(S)

autrement dit segmenter n’a pas de conséquence, en moyenne, sur le résultat de l’assureur. Par contre, la variance de l’assureur est ici

https://latex.codecogs.com/gif.latex?\mathbb{E}(\text{Var}(S|\boldsymbol{X}))=\mathbb{E}(\text{Var}(S|\Omega))+\mathbb{E}(\text{Var}(\mathbb{E}(S|\Omega)|\boldsymbol{X}))

et la variance total du portefeuille est alors la somme

https://latex.codecogs.com/gif.latex?\text{Var}(\mathbb{E}(S|\boldsymbol{X}))+\mathbb{E}(\text{Var}(S|\Omega))+\mathbb{E}(\text{Var}(\mathbb{E}(S|\Omega)|\boldsymbol{X}))

avec à gauche, un terme lié à la segmentation, au centre le hasard, et à droite, un terme de solidarité entre assuré (qu’on pourrait appeler de mutualisation), lié au fait que le risque n’est que partiellement assurable. C’est la mutualisation résiduelle qui peut exister en assurance santé si on exclue les tests génétiques: à partir de quelles variables explicatives https://latex.codecogs.com/gif.latex?\boldsymbol{X}, on peut inférer le risque de maladie, mais moins que si des tests génétiques permettaient d’approcher https://latex.codecogs.com/gif.latex?\Omega avec une plus grande précision… Autrement dit, segmenter imparfaitement, ou partiellement, permet de maintenir un effet de mutualisation dans le portefeuille…. de faire de l’assurance en quelque sorte…

 

Actuariat en Afrique subsaharienne francophone

Depuis que le blog (ou les précédents) existe, je sais (par les messages que je reçois par courriel) qu’il est beaucoup lu en Afrique (francophone). J’ai reçu avant hier un livre publié par Aymric Kamega et Frédéric Planchet, tiré de la thèse de doctorat d’Aymric (en ligne sur http://halshs.archives-ouvertes.fr/) défendue en décembre dernier. J’étais alors rapporteur extérieur, et j’avais souligné l’intérêt des travaux d’Aymric dans le cadre de la volonté de la CIMA (autorité de contrôle régionale des marchés d’assurance pour l’Afrique subsaharienne francophone) de fournir aux assureurs de la région des outils adaptés. En particulier des tables de mortalité d’expérience, propres à la région. En effet, (comme le rappelle Aymric), , suite aux états généraux (de l’assurance vie)  en 2007, le principe de la construction de tables de mortalité d’expérience a été adopté en remplacement des tables de mortalité de la population générale française entre 1960 et 1964 (tables dites PM 60-64 et PF 60-64) jusqu’alors imposées. Aymric avait travaillé sur ce sujet, et a soutenu une thèse de doctorat qui avait fait l’unanimité. J’avais pris beaucoup de plaisir à lire la thèse, j’en pense que j’en aurais à lire le livre (disponible sur le site de l’éditeur http://seddita.com/).

Visualizing uncertainty using Jackknife

Once again, I (re)discovered last week at the Rmetrics conference that old tools can be extremely interesting to illustrate complex ideas, like uncertainty in fnancial markets, and stock prices. For instance a 99.5% quantile: we look for the scenario that occur with a probability of 1 out of 200. Are there nice ways to illustrate that quantity ?

Consider the monthly evolution of the SP500 index over the last 22 years,

> library(quantmod) 
> getSymbols('^GSPC', from='1990-01-01') 
[1] "GSPC" 
> GSPC = adjustOHLC(GSPC,
+ symbol.name='^GSPC') 
> MGSPC = to.monthly(GSPC) 
> CLOSE = MGSPC$GSPC.Close 
> plot(CLOSE)

It is possible to use Jackknife technique to illustrate uncertainty. The idea, in Jackknife, it to remove one of the observations, and to do that for all observations. More formally, from a sample , we define a (sub)sample where observation  as been removed, i.e. . Then, we can study all samples when one observation was removed.

Here, in the context of financial time series, over 270 months, we can wonder what might have been the final value of the index if one observation (i.e. one month) had been removed. It is actually the idea of Jackknife,

> R=diff(log(CLOSE)); R=R[-1] 
> n=length(R) 
> X=rnorm(n,mean(R),sd(R)) 
> X=R 
> MX=t(matrix(X,n,n)) 
> MX=exp(MX) 
> diag(MX)=1 
> SMX=MX 
> for(k in 2:n){SMX[,k]=SMX[,k-1]*(MX[,k])}

We can plot the different trajectories of the index, when we remove one month,

> init=as.numeric(CLOSE[1]) 
> plot(1:n,init*cumprod(exp(X)),type="l", 
+ xlab="",ylab="",col="white")
 > for(k in 1:n){lines(0:n,init*c(1,SMX[k,]), 
+ col="light blue")} 
> lines(0:n,init*c(1,cumprod(exp(X))),lwd=2, 
+ col="blue")

This can be used to understand sensitivity, or unccertainty, of financial time series,

We can then look closer at the final value of the index, over those 270 scenarios,

or we also use a Box-Plot,

Here we can clearly see the impact: if we remove one good month, the index ends around 1250, while it reaches 1650 if we remove a bad month. The difference is huge. So instead of talking about volatility (which is actually a complex concept), that Jackknife idea of remove observations might be more intuitive, and much easier to get a first understanding of uncertainty. But those ideas of resampling are great. I will post a nice application soon (but first, I will discuss with some colleagues in Lyon).

Pricing options on multiple assets

I am a big fan of trees. It is a very nice way to see how financial pricing works, for derivatives. An with a matrix-based language (R for instance), it is extremely simple to compute almost everything. Even options multiple assets. Let us see how it works. But first, I have to assume that everyone knows about trees, and risk neutral probabilities, and is familiar with standard financial derivatives. Just in case, I can upload some old slides of the first course on asset pricing we gave a few years ago at École Polytechnique.

Let us get back on the pricing of (European) call options, with trees.The idea is simple. We have to fix the number of periods. Let us start with only one (as described in the slides above). The stock has price and can go either up, and then have price or go down, and have price . And the fundamental theorem of asset pricing says that we do not really care about probabilities of going up, or down. Assuming that we can buy or sell that stock, and that a risk free asset is available on the market, it is possible to price any contingent financial product, like a financial option. Since we know the final value of the option when the stock goes either up, or down, it is possible to replicate the payoff of that option using the stock and the risk free asset. And we can prove that the price of the option is simply

where the probability is the so-called risk neutral probability

So, we’ve done it here with only one single period, but it is possible to extend it to multiperiods. The idea is to keep that multiplicative representation of possible values of the stock, and to get a recombinant tree. At step 2, the stock can take only three different values: went up twice, went down twice, or went up and down (or the reverse, but we don’t care: this is the point of recombining). If we write things down, then we can prove that

for some probability parameter (the so-call risk neutral probability, if it is unique). But we do not really care about those closed formula, the goal is to write an algorithm which computes the tree, and return the price of a call option (say). But before starting, we have to make a connection between that model with up and down prices, and the parameters of the Black-Scholes diffusion, for the stock price. The idea is to identify the first and the second moment, i.e.

(where, under the risk neutral probability, the trend is the risk free rate) and

The code might look like that

n=5; T=1; r=0.05; sigma=.4;S=50;K=50
price=function(n){
u.n=exp(sigma*sqrt(T/n));
d.n=1/u.n
p.n=(exp(r*T/n)-d.n)/(u.n-d.n)
SJ=matrix(0,n+1,n+1)
SJ[1,1]=S
for(i in(2:(n+1)))
{for(j in(1:i)){SJ[i,j]=S*u.n^(i-j)*d.n^(j-1)}}
OPT=matrix(0,n+1,n+1)
OPT[n+1,]=(SJ[n+1,]-K)*(SJ[n+1,]>K)
for(i in(n:1))
{for(j in(1:i)){OPT[i,j]=exp(-r*T/n)*(OPT[i+1,j]*p.n+
(1-p.n)*OPT[i+1,j+1])}}
return(OPT[1,1])
}

We can plot the evolution of the price, as a function of the number of time periods (or subdivision of the time interval, from now till maturity of the European option),

N=10:400
V=Vectorize(price)(N)
plot(N,V,type="l")

Note that we can compare with the Black-Scholes price of this call option, given by

where

and

d1=1/(sigma*sqrt(T))*(log(S/K)+(r+sigma^2/2)*T)
d2=d1-sigma*sqrt(T)
BS=S*pnorm(d1)-K*exp(-r*T)*pnorm(d2)
abline(h=BS,lty=2,col="red")

The code is clearly not optimal, but at least, we see what’s going on. For instance, we do not need a matrix when we calculate using backward recursions the price of the option. We can just keep a single vector. But this matrix is nice, because we can use it to price American options. For instance, with the code below, we compare the price of an American put option, and the price of European put option.

price.american=function(n,opt="put"){
u.n=exp(sigma*sqrt(T/n)); d.n=1/u.n
p.n=(exp(r*T/n)-d.n)/(u.n-d.n)
SJ=matrix(0,n+1,n+1)
SJ[1,1]=S
for(i in(2:(n+1)))
{for(j in(1:i)) {SJ[i,j]=S*u.n^(i-j)*d.n^(j-1)}}
OPTe=matrix(0,n+1,n+1)
OPTa=matrix(0,n+1,n+1)
if(opt=="call"){
OPTa[n+1,]=(SJ[n+1,]-K)*(SJ[n+1,]>K)
OPTe[n+1,]=(SJ[n+1,]-K)*(SJ[n+1,]>K)
}
if(opt=="put"){
OPTa[n+1,]=(K-SJ[n+1,])*(SJ[n+1,]<K)
OPTe[n+1,]=(K-SJ[n+1,])*(SJ[n+1,]<K)
}
for(i in(n:1))
{
for(j in(1:i))
{if(opt=="call"){
OPTa[i,j]=max((SJ[i,j]-K)*(SJ[i,j]>K),
exp(-r*T/n)*(OPTa[i+1,j]*p.n+
(1-p.n)*OPTa[i+1,j+1]))}
if(opt=="put"){
OPTa[i,j]=max((K-SJ[i,j])*(K>SJ[i,j]),
exp(-r*T/n)*(OPTa[i+1,j]*p.n+
(1-p.n)*OPTa[i+1,j+1]))}

OPTe[i,j]=exp(-r*T/n)*(OPTe[i+1,j]*p.n+
(1-p.n)*OPTe[i+1,j+1])}}
priceop=c(OPTe[1,1],OPTa[1,1])
names(priceop)=c("E","A")
return(priceop)}

It is possible to compare those price, obtained on trees, with prices given by closed (approximated) formulas.

> d1=1/(sigma*sqrt(T))*(log(S/K)+(r+sigma^2/2)*T)
> d2=d1-sigma*sqrt(T)
> (BS=-S*pnorm(-d1)+K*exp(-r*T)*pnorm(-d2)  )
[1] 6.572947
> N=10:200
> M=Vectorize(price.american)(N)
> plot(N,M[1,],type='l',col='blue',ylim=range(M))
> lines(N,M[2,],type='l',col='red')
> abline(h=BS,lty=2,col='blue')
> library(fOptions)
> (am=BAWAmericanApproxOption(TypeFlag =
+ "p", S = S,X = K, Time = T, r = r,
+ b = r, sigma =sigma)@price)
[1] 6.840335
> abline(h=am,lty=2,col='red')

Another great thing with trees, is that it becomes possible to plot to region where it is optimal to exercise our right to sell the stock.

Let us move now to a model with two assets, as suggested by Rubinstein (1994). First, observe that a discretization of two independent Brownian motions will be based on two independent random walk, taking values

i.e. both went up (NW), both went down (SE), and one went up while the other went down (either NE or SW). With independent and symmetric random walks, the probabilities will be respectively 1/4. An if we move one step foreward, we have the following tree.

Here it is still recombining. But the size will increase much faster than in the univariate case. Now, assume that there might be some correlation. Then one can consider the following values, to have a specific correlation,

And again, the idea is then to identify the first two moments. This gives us the following system of equations for the four respective (risk neutral) probabilities

For those willing to do the maths, please do. The answer should be

and for the last one

The code here looks like that

price.spead=function(n){
T=1; r=0.05; K=0
S1=105
S2=100
sigma1=0.4
sigma2=0.3
rho=0.5
u1.n=exp(sigma1*sqrt(T/n)); d1.n=1/u1.n
u2.n=exp(sigma2*sqrt(T/n)); d2.n=1/u2.n

v1=r-sigma1^2/2; v2=r-sigma2^2/2
puu.n=(1+rho+sqrt(T/n)*(v1/sigma1+v2/sigma2))/4
pud.n=(1-rho+sqrt(T/n)*(v1/sigma1-v2/sigma2))/4
pdu.n=(1-rho+sqrt(T/n)*(-v1/sigma1+v2/sigma2))/4
pdd.n=(1+rho+sqrt(T/n)*(-v1/sigma1-v2/sigma2))/4
k=0:n
un=matrix(1,n+1,1)
SJ= (S1 * d1.n^k * u1.n^(n-k-1)) %*% t(un) -
un %*%t(S2 * d2.n^k * u2.n^(n-k-1))
OPT=(SJ)*(SJ>K)
for(k in(n:1))
{
OPT0=matrix(0,k,k)
for(i in(1:k))
{
for(j in(1:k))
{OPT0[i,j]=(OPT[i,j]*puu.n+OPT[i+1,j]*pdu.n+
OPT[i,j+1]*pud.n+OPT[i+1,j+1]*pdd.n)*exp(-r*T/n)}}
OPT=OPT0}
return(OPT[1,1])}

If we look at the details, consider two periods, like on the figure above, the are nine values for the spread,

> n=2
> SJ
[,1]      [,2]       [,3]
[1,]  32.02217  84.86869 119.443578
[2,] -47.84652   5.00000  39.574891
[3,] -93.20959 -40.36308  -5.788184

and the payoff of the option is here

> OPT
[,1]     [,2]      [,3]
[1,] 32.02217 84.86869 119.44358
[2,]  0.00000  5.00000  39.57489
[3,]  0.00000  0.00000   0.00000

So if we go backward of one step, we have the following square of values

> k=n
> OPT0<-matrix(0,k,k)
> for(i in(1:k))
+ {
+   for(j in(1:k))
+   {
+     OPT0[i,j]=(OPT[i,j]*puu.n+OPT[i+1,j]*pdu.n+
+ OPT[i,j+1]*pud.n+OPT[i+1,j+1]*pdd.n)*exp(-r*T/n)
+ }
+ }
> OPT0
[,1]      [,2]
[1,] 22.2741190 58.421275
[2,]  0.5305465  5.977683

The idea is then to move backward once more,

> OPT=OPT0
> OPT0<-matrix(0,k,k)
> for(i in(1:k))
+ {
+   for(j in(1:k))
+   {
+     OPT0[i,j]=(OPT[i,j]*puu.n+OPT[i+1,j]*pdu.n+
+ OPT[i,j+1]*pud.n+OPT[i+1,j+1]*pdd.n)*exp(-r*T/n)
+ }
+ }
> OPT0
[,1]
[1,] 16.44106

Here calculations are much (much) longer,

> price.spead(250)
[1]  15.66496

and again, it is possible to use standard approximations to compare that price with a more standard one,

> (sp=SpreadApproxOption(TypeFlag =
+ "c", S1 = 105, S2 = 100, X = 0,
+ Time = 1, r = .05, sigma1 = .4,
+ sigma2 = .3, rho = .5)@price)
[1]  15.65077

Well, playing with trees is nice, but it might not be optimal for complex products. Next time, we’ll discuss other techniques…

Basketball: score dynamics and game theory

Tomorrow morning, I will be giving a talk at Mont Tremblant, for the Journées de la Société Canadienne de Sciences Economiques. I will present a joint work – in progress – with Nathalie Colombier and Romuald Elie. Since the working paper is not online yet, I will wait a little bit before uploading the slides. But they will be online, someday (hopefully soon)…

An important aspect of the strategy of most organizations is the provision of incentives to the employees to meet the organization’s objectives. Typically this implies tying pay to performance (see Prendergast, 1999). In order to reward employees for their effort, firms spend considerable resources on performance evaluations. In many cases, evaluation consists of comparing actual performance to a pre-defined individual target. Another frequently used format is relative performance evaluation. Relative performance evaluation may motivate employees to work harder.But it may also be demoralizing and create an excessively competitive workplace, which may hinder overall performance; see Lazear (1989). Determining the overall impact of relative performance evaluation is crucial for companies. Economic research on relative performance evaluation has mainly focused on the comparison of final performances between competitors,like in tournament theory, and on quantitative and subjective performance ratings (Lazear and Gibbs, 2009). In contrast, what happens during a competition and the impact of feedback frequency on effort have so far received little attention. Following Berger and Pope (2011), we decided to use a basketball application to get a better understanding of the role of the feedback information. Sports datasets allow to observe score and team behavior continuously (during a game but also during the season) which can be use as a proxy of the effort. Berger an Pope (2010) asked ”can loosing lead to winning ?” looking at the impact of the halftime score difference on winning probability in NCAA (college) and NBA(pro) games. More precisely, they studied whether a team loosing at halftime is more likely to win than expected using a logit model. They find that usually the higher the score difference the more likely the are to win. But if the halftime score difference is around 0 they observe a discontinuity: loosing with a small difference (e.g. down by 1 point) can lead to increase the effort and win the game. In this paper we try answer the question ”when loosing lead to winning ?”.

Correlations, dimension, and risk measure

Yesterday, while I was attending the IFM2 conference, at HEC Montreal, I heard a nice talk about credit risk, and a comparison between contagion (or at least default correlation), for corporate and retail companies (in the US). And it was mentioned that default correlation was much lower for retail companies than it could be for corporate risk. In a discussion that followed those slides, it was mentioned that banks in the US should actually have been working more with those small firms, since contagion risk was much lower.

A problem here is that the link between correlation, risk and dimension is rather complicated:

  • corporate means a small number of firms, high correlation (and possible large individual losses)
  • retail means a large number of firms (even perhaps extremely large), lower correlation (and small individual losses)

A simple model for default models is based on the assumption that we deal with an exchangeable portfolio (as in a previous post). With the following code, given an (individual) default probability, a default correlation, and a number of firms, it is possible to calculate the probability to have more than a given number of defaults.

 proba=function(s,a,m,n){
 b=a/m-a
 choose(n,s)*integrate(function(t){t^s*(1-t)^(n-s)*
 dbeta(t,a,b)},lower=0,upper=1,subdivisions=1000,
 stop.on.error =  FALSE)$value}

CDF=function(x=10,r=.4,m=.1,n=50){
a=m*(1-r)/r ;
V=rep(NA,n+1)
 for(i in 0:n){
 V[i+1]=proba(i,a,m,n)}
 V=V/sum(V);
 return(sum(V[1:(x+1)])) }

It is possible to calculate, for a large range of correlations, the probability to have – at least – 20% of default in the portfolio (in order to compare things that are comparable).

R=seq(.01,.99,by=.01)
VQ=matrix(NA,length(A),2)
for(i in 1:length(A)){
VQ[i,1]=1-CDF(r=A[i],x=4,n=20);  
VQ[i,2]=1-CDF(r=A[i],x=200,n=1000)}

With 20 firms (corporate) we want to have at least 4 defaults, while with 1000 firms (retail) there should be 200 defaults. As mentioned in the previous post, the relationship between correlation and quantiles of sums is not simple. Hence, it might not be monotone. The dotted line is the probability to have at least 4 defaults when default correlation is 50% (around 10%). The plain line is the probability to have at least 200 defaults, as a function of the correlation,

plot(A,1-VQ[,2],type="l",col="red",ylim=c(0,.22))
abline(h=1-VQ[50,1],lty=2,col="red")

In that case, with only a correlation of 10% among retail firms, the probability of having 20% defaults is the same as the same probability for corporate, but with 50% correlation… One should remember that in portfolio analysis, the links between correlation, dimension and risk measure is a sensitive issue…

Promesse et rationalité économique (à court terme)

Non, je vais pas faire une analyse des promesses en cette année électorale (bien que le sujet pourrait être amusant, on peut penser aux propos du candidat Newt Gingrich qui veut que la lune devienne un état américain, ici ou ). Non, en fait je voulais faire un billet sur le sujet les assureurs sont-ils vraiment des voleurs ? En effet, lorsqu’en classe on présente le fonctionnement d’un contrat d’assurance – en particulier lorsque l’on parle de tarification et de l’inversion du cycle de production, ou du provisionnement – on explique que l’assuré achète une promesse: celle de se faire indemniser les sinistres survenus pendant la période dite de couverture. Car formellement, c’est bien de cela qu’il s’agit. Sauf qu’il y a toujours quelqu’un pour faire noter que ce n’est peut-être pas aussi simple et que l’assureur, souvent, rechigne à payer.

En fait, il est parfaitement rationnel – d’un point de vue économique (on s’entend) – que l’assureur négocie. En tous les cas si l’assureur a une vision à très court terme… Et c’est ce que justifient Briegleb & Lemaire (1982), sur l’analyse du marchandage ou Lemaire (1982) (dont sera très largement inspiré ce billet).
Considérons un cas très simple: un assuré a subit une perte http://freakonometrics.blog.free.fr/public/perso5/tribunal33.gif (connue, de l’assuré comme de l’assureur). Mais l’assureur refuse de payer. Et l’assuré envisage d’aller au tribunal. Afin de voir s’il s’agit d’une décision rationnelle, on suppose que l’assuré (http://freakonometrics.blog.free.fr/public/perso5/tribunal18.gif) avait une richesse  avant que le sinistre ne survienne, qu’aller en justice lui coûte , et qu’il estime que sa probabilité de gagner le procès est http://freakonometrics.blog.free.fr/public/perso5/tribunal05.gif. De son coté, la compagnie (http://freakonometrics.blog.free.fr/public/perso5/tribunal19.gif) d’assurance a une richesse , qu’aller en justice lui coute http://freakonometrics.blog.free.fr/public/perso5/tribunal04.gif, et que la probabilité que la compagnie perde le procès est – selon la compagnie – http://freakonometrics.blog.free.fr/public/perso5/tribunal06.gif (les http://freakonometrics.blog.free.fr/public/perso5/tribunal.gif sont alors les probabilités que l’assuré gagne son procès, mais vu des deux cotés). Au tribunal, on suppose que le juge rend un verdict du genre tout ou rien (on n’autorise pas ici de compensation plus importantes que le cout réel du sinistre, et on ne parle pas non plus de remboursement des frais d’avocat en cas de victoire du procès).
L’espérance d’utilité de l’assuré est

http://freakonometrics.blog.free.fr/public/perso5/tribunal07.gif

alors que pour la compagnie d’assurance, son espérance d’utilité est

http://freakonometrics.blog.free.fr/public/perso5/tribunal08.gif

La situation est Pareto optimale si

http://freakonometrics.blog.free.fr/public/perso5/tribunal09.gif

Si on suppose que les agents sont risquophobe (i.e. http://freakonometrics.blog.free.fr/public/perso5/tribunal10.gifdécroissante), alors

http://freakonometrics.blog.free.fr/public/perso5/tribunal11.gif

alors que

http://freakonometrics.blog.free.fr/public/perso5/tribunal12.gif

Aussi, une condition nécessaire pour que la situation soit Pareto-optimale est que

http://freakonometrics.blog.free.fr/public/perso5/tribunal14.gif

i.e. http://freakonometrics.blog.free.fr/public/perso5/tribuanl16.gif. Aller au tribunal n’est pas Pareto optimal si http://freakonometrics.blog.free.fr/public/perso5/tribunal18.gif croit plus en ses raisons de gagner que http://freakonometrics.blog.free.fr/public/perso5/tribunal19.gif. Si http://freakonometrics.blog.free.fr/public/perso5/tribunal17.gif, il peut alors être optimal de ne pas aller au tribunal…. On ne dit pas ici qu’il faut que la compagnie indemnise (intégralement) l’assuré, mais que l’assureur et l’assuré peuvent avoir intérêt a trouver une solution amiable…
Si http://freakonometrics.blog.free.fr/public/perso5/tribuanl16.gif, il peut être intéressant d’aller au tribunal… mais pas forcément… Du point de vue de l’assureur, on peut supposer que sa richesse lui permet de ne pas être risquophobe, ou au moins d’être risque neutre (face a cette assuré au moins). Elle est donc indifférente entre aller au tribunal (et avoir un rendement incertain) et verser un règlement amiable si le versement correspond à son espérance de perte si elle va au procès. Autrement dit http://freakonometrics.blog.free.fr/public/perso5/tribunal20.gif. L’assuré acceptera cette somme si l’utilité qu’il en tire est plus grande que l’espérance d’utilité qu’il aura en allant au tribunal,

http://freakonometrics.blog.free.fr/public/perso5/tribunal21.gif

La différence entre le terme de gauche et le terme de droite est une fonction http://freakonometrics.blog.free.fr/public/perso5/tribunal22.gif. Si l’agent a une utilité exponentielle

http://freakonometrics.blog.free.fr/public/perso5/tribunal23.gif

alors

http://freakonometrics.blog.free.fr/public/perso5/tribunal25.gif

doit être une fonction positive. Un calcul rapide de dérivées montre que cette fonction est convexe, avec un minimum atteint en

http://freakonometrics.blog.free.fr/public/perso5/tribunal26.gif

Moralité ?

  • pour les petits et pour les gros sinistres, il est normal que l’assureur et l’assuré cherchent une solution amiable (transaction)
  • en revanche, pour les sinistres de cout intermédiaire, il peut être légitime d’aller au tribunal (procès).

Maintenant, si on a les grandes directions… peut-être peut-on essayer de mieux comprendre quelle serait le montant de la transaction dans le cas ou une solution amiable est envisagée. Nash (1950) a envisagé un jeu non-coopératif afin de décrire le marchandage. La transaction optimale est la quantité http://freakonometrics.blog.free.fr/public/perso5/tribunal28.gif qui maximise le produit des deux gains d’utilité (cf Nash (1950) ou Roth (1979))

http://freakonometrics.blog.free.fr/public/perso5/tribunal30.gif

La condition du premier ordre donne l’équation suivante

http://freakonometrics.blog.free.fr/public/perso5/tribunal27.gif

Si on fait un peu de calcul numérique, on note que la solution http://freakonometrics.blog.free.fr/public/perso5/tribunal32.gif est décroissante en http://freakonometrics.blog.free.fr/public/perso5/tribunal31.gif: plus l’assuré est risquophobe, plus faible sera la montant de la transaction…. Ce qui n’est pas surprenant, on retrouve ici un résultat noté dans Peeters (1981), Roth (1982) ou ecnore Osbourne (1985). Maintenant, sur le modèle théorique on pourrait bien entendu argumenter que le tribunal fonctionne selon une règle trop simple du tout ou rien, et qu’un procès peut couter beaucoup cher que le simple remboursement du cout du sinistre. Ou qu’il pourrait créer une jurisprudence. On pourrait aussi regarder économétriquement le lien entre le cout des sinistres et les montants des ententes amiables (c’est ce que fait Ayusoa, Bermúdezb & Santolinoc (2012)) mais c’est une autre histoire…. ou ça pourrait être le sujet pour une autre histoire… à suivre donc.