Beruflich Dokumente
Kultur Dokumente
Actuarial
Science
with
Edited by
Arthur Charpentier
University of Quebec at Montreal
Canada
CRC Press
Taylor & Francis Group
oca Raton London New York
CRC Press is an imprint of the
Taylor & Francis Croup, an informa business
A CHAPMAN & HALL BOOK
Contents
Preface
Contributors
xvii
xxiii
List of Figures
xxv
List of Tables
xxxi
1 Introduction
Arthur Charpentier and Rob Kaas
1.1 R for Actuarial Science?
1.1.1 From Actuarial Science to Computational Actuarial Science
1.1.2 The S Language and the R Environment
1.1.3 Vectors and Matrices in Actuarial Computations
1.1.4 R Packages
1.1.5 53 versus 54 Classes
1.1.6 R Codes and Efficiency
1.2 Importing and Creating Various Objects, and Datasets in R
1.2.1 Simple Objects in R and Workspace
1.2.2 More Complex Objects in R: From Vectors to Lists
1.2.2.1 Vectors in R
1.2.2.2 Matrices and Arrays
1.2.2.3 Lists
1.2.3 Reading csv or txt Files
1.2.4 Importing Excel Files and SAS Tables
1.2.5 Characters, Factors and Dates with R
1.2.5.1 Strings and Char acters
1.2.5.2 Factors and Categorical Variables
1.2.5.3 Dates in R
1.2.6 Symbolic Expressions in R
1.3 Basics of the R Language
1.3.1 Gore Functions
1.3.2 From Control Flow to "Personal" Functions
1.3.2.1 Control Flow: Looping, Repeating and Conditioning ....
1.3.2.2 Writing Personal Functions
1.3.3 Playing with Functions (in a Life Insurance Context)
1.3.4 Dealing with Errors
1.3.5 Efficient Functions
1.3.6 Numerical Integration
1.3.7 Graphics with R: A Short Introduction
1.3.7.1 Basic Ready-Made Graphs
1.3.7.2 A Simple Graph with Lines and Curves
1
2
2
4
6
6
8
11
11
12
13
13
17
21
22
26
27
27
29
31
33
34
35
37
37
38
43
44
45
49
52
52
53
vii
Contents
viii
1.4
1.5
1.6
I
57
58
59
62
62
63
65
68
68
68
69
Methodology
75
76
76
82
84
86
89
90
91
91
92
93
93
93
95
96
97
99
99
101
102
103
104
107
110
112
113
113
114
114
115
Hg
117
ioo
Contents
ix
3 Bayesian Philosophy
Benedict Escoto and Arthur Charpentier
3.1 Introduction
3.1.1 A Formal Introduction
3.1.2 Two Kinds of Probability
3.1.3 Working with Subjective Probabilities in Real Life
3.1.4 Bayesianism for Actuaries
3.2 Bayesian Conjugates
3.2.1 A Historical Perspective
3.2.2 Motivation on Small Samples
3.2.3 Black Swans and Bayesian Methodology
3.2.4 Bayesian Models in Portfolio Management and Finance
3.2.5 Relation to Bhlmann Credibility
3.2.6 Noninformative Priors
3.3 Computational Considerations
3.3.1 Curse of Dimensionality
3.3.2 Monte Carlo Integration
3.3.3 Markov Chain Monte Carlo
3.3.4 MCMC Example in R
3.3.5 JAGS and Stan
3.3.6 Computational Conclusion and Specific Packages
3.4 Bayesian Regression
3.4.1 Linear Model from a Bayesian Perspective
3.4.2 Extension to Generalized Linear Models
3.4.3 Extension for Hierarchical Structures
3.5 Interpretation of Bayesianism
3.5.1 Bayesianism and Decision Theory
3.5.2 Context of Discovery versus Context of Justification
3.5.3 Practical Classical versus Bayesian Statistics Revisited
3.6 Conclusion
3.7 Exercises
127
4 Statistical Learning
Arthur Charpentier and Stephane Tuffery
4.1 Introduction and Motivation
4.1.1 The Dataset
4.1.2 Description of the Data
4.1.3 Scoring Tools
4.1.4 Recoding the Variables
4.1.5 Training and Testing Samples
4.2 Logistic Regression
4.2.1 Inference in the Logistic Model
4.2.2 Logistic Regression on Categorical Variates
4.2.3 Step-by-Step Variable Selection
4.2.3.1 Forward Algorithm
4.2.3.2 Backward Algorithm
4.2.4 Leaps and Bounds
4.2.5 Smoothing Continuous Covariates
4.2.6 Nearest-Neighbor Method
4.3 Penalized Logistic Regression: From Ridge to Lasso
4.3.1 Ridge Model
165
128
128
129
129
130
130
131
132
136
137
138
140
141
141
143
144
146
149
152
152
152
154
156
157
159
159
160
162
163
165
166
168
169
173
174
175
175
178
179
180
181
183
186
188
189
190
4.4
4.5
5 Spatial Analysis
Aenafo
MoTteZo
Coafa, Marcoa Ofwezm fWea, and
Luis Gustavo Silva e Silva
5.1 Introduction
5.1.1 Point Pattern Data
5.1.2 Random Surface Data
5.1.3 Spatial Interaction Data
5.1.4 Areal Data
5.1.5 Focus of This Chapter
5.2 Spatial Analysis and GIS
5.3 Spatial Objects in R
5.3.1 SpatialPoints Subclass
5.3.2 SpatialPointsDataFrame Subclass
5.3.3 SpatialPolygons Subclass
5.3.3.1 First Elementary Example
5.3.3.2 Second Example
5.3.4 SpatialPolygonsDataFrame Subclass
5.4 Maps in R
5.5 Reading Maps and Data in R
5.6 Exploratory Spatial Data Analysis
5.6.1 Mapping a Variable
5.6.2 Selecting Colors
5.6.3 Using the RgoogleMaps Package
5.6.4 Generating KML Files
5.6.4.1 Adding a Legend to a KML File
5.7 Testing for Spatial Correlation
5.7.1 Neighborhood Matrix
5.7.2 Other Neighborhood Options
5.7.3 Moran's I Index
5.8 Spatial Car Accident Insurance Analysis
5.9 Spatial Car Accident Insurance Shared Analysis
5.10 Conclusion
6 Reinsurance and Extremal Events
Eric Gilleland and Mathieu Ribatet
6.1 Introduction
6.2 Univariate Extremes
6.2.1 Block Maxima
6.2.2 Exceedances above a Threshold
6.2.3 Point Process
6.3 Inference
6.3.1 Visualizing Tails
201
^
204
208
208
208
209
209
210
210
213
214
216
219
219
221
223
223
225
228
229
230
231
235
236
239
239
241
242
243
250
255
257
257
258
259
260
262
263
264
Contents
6.3.2
Estimation
6.3.2.1 Generalized Extreme Value Distribution
6.3.2.2 Poisson-Generalized Pareto Model
6.3.2.3 Point Process
6.3.2.4 Other Tail Index Estimates
6.3.3 Checking for the Asymptotic Regime Assumption
6.3.3.1 Mean Excess Plot
6.3.3.2 Parameter Stability
6.3.4 Quantile Estimation
6.4 Model Checking
6.4.1 Quantile Quantile Plot
6.4.2 Probability-Probability Plot
6.4.3 Return Level Plot
6.5 Reinsurance Pricing
6.5.1 Modeling Occurence and Frequency
6.5.2 Modeling Individual Losses
II
Life Insurance
xi
265
265
267
269
271
272
273
274
275
278
278
279
280
282
283
284
287
7 Life Contingencies
Giorgio Spedicato
7.1 Introduction
7.2 Financial Mathematics Review
7.3 Working with Life Tables
7.4 Pricing Life Insurance
7.5 Reserving Life Insurances
7.6 More Advanced Topics
7.7 Health Insurance and Markov Chams
7.7.1 Markov Chain with R
7.7.2 Valuation of Cash Flows
7.7.3 APV of Benefits and Reserves
7.8 Exercises
7.8.1 Financial Mathematics
7.8.2 Demography
7.8.3 Pricing Life Insurance
7.8.4 Reserving Life Insurances
7.8.5 More Advanced Topics
289
319
289
290
296
300
305
309
313
313
315
316
317
317
317
317
318
318
319
320
322
322
324
326
328
329
331
334
335
Contents
8.4
8.5
8.6
8.7
8.8
345
10 Survival Analysis
Frederic Planchet and Pierre-E. Therond
10.1 Introduction
10.2 Working with Incomplete Data
10.2.1 Data Importation and Some Statistics
10.2.2 Building the Appropriate Database
10.2.3 Some Descriptive Statistics
10.3 Survival Distribution Estimation
10.3.1 Hoem Estimator of the Conditional Rates
10.3.2 Kaplan-Meier Estimator of the Survival Function
10.4 Regularization Techniques
10.4.1 Parametric Adjustment
10.4.2 Semiparametric Adjustment: Brass Relational Model
10.4.3 Nonparametric Techniques: WhittakerHenderson Smoother
10.4.3.1 Application
10.5 Modeling Heterogeneity
10.5.1 Semiparametric Framework: Cox Model
10.5.2 Additive Models
10.6 Validation of a Survival Model
383
346
347
349
349
350
351
353
356
358
358
368
370
375
376
377
378
378
381
383
385
386
387
388
391
392
392
394
396
398
399
400
402
403
404
AKC.
Contents
xiii
III Finance
407
409
429
13 Portfolio Allocation
Yohan Chalabi and Diethelm Wrtz
13.1 Introduction
13.2 Optimization Problems in R
13.2.1 Introduction
13.2.2 Linear Programming
13.2.3 Quadratic Programming
13.2.4 Nonlinear Programming
13.3 Data Sources
13.4 Portfolio Returns and Cumulative Performance
13.5 Portfolio Optimization in R
13.5.1 Introduction
13.5.2 Mean-Variance Portfolio
13.5.3 Robust Mean-Variance Portfolio
13.5.4 Minimum Variance Portfolio
13.5.5 Conditional Value-at-Risk Portfolio
13.5.6 Minimum Drawdown Portfolio
13.6 Display Results
13.6.1 Efficient Frontier
13.6.2 Weighted Return Plots
13.7 Conclusion
447
409
410
410
411
412
414
414
415
420
421
423
427
429
432
432
434
436
440
444
444
447
448
448
449
450
451
452
455
456
456
458
460
460
461
466
467
467
468
470
Contents
xiv
IV
Non-Life Insurance
476
476
476
477
478
478
478
480
482
484
486
488
490
490
491
492
492
492
493
495
497
499
499
500
500
501
501
503
506
507
510
511
511
511
512
513
513
513
513
517
5ig
524
52g
532
532
Contents
xv
543
Bibliography
583
Index
605
R Command Index
613
543
543
544
545
548
548
551
552
553
555
559
564
568
577
577
577
579
580