Actuarial Data Science

An initiative of the Swiss Association of Actuaries

Actuarial Data Science Tutorials

On this page we present all the tutorials that have been prepared by the working party. We are intensively working on additional ones and we aim to have approx. 10 tutorials, covering a wide range of Data Science topics relevant for actuaries.


All tutorials consist of an article and the corresponding code. In the article, we describe the methodology and the statistical model. By providing you with the code you can easily replicate the analysis performed and test it on your own data.


Case Study 15: Privacy-preserving Machine Learning

Article on SSRN

Code on GitHub


Case Study 14: SHAP for Actuaries: Explain any Model

Article on SSRN

Code on GitHub ; Notebook

Case Study 13: Gini Index and Friends

Article on SSRN

Code on GitHub


Data Simulator: Individual Claims Generator for Claims Reserving Studies: data simulation.R

Article on SSRN

Repository on GitHub


Case Study 12: Actuarial Applications of Natural Language Processing Using
Transformers: Case Studies for Using Text Features in an Actuarial Context

Article on arXiv ; Article in British Actuarial Journal

Code on GitHub ; Notebook (Part 1) ; Notebook (Part 2) ; Notebook (Part 3)


Case Study 11: Model Comparison and Calibration Assessment: User Guide for Consistent Scoring Functions in Machine Learning and Actuarial Practice

Article on arXiv

Code on GitHub ; Notebook


Case Study 10: LocalGLMnet: a deep learning architecture for actuaries

Article on SSRN

Code on GitHub ; Notebook


Case Study 9: Convolutional neural network studies: (1) anomalies in mortality rates (2) image recognition

Article on SSRN

Code on GitHub ; Notebook (Mortality) ; Notebook (Digits) ; Notebook (Image)


Case Study 8: Peeking into the Black Box: An Actuarial Case Study for Interpretable Machine Learning

Article on SSRN

R Code on GitHub ; Notebook


Case Study 7: The Art of Natural Language Processing: Classical, Modern and Contemporary Approaches to Text Document Classification

Article on SSRN

Code on GitHub ; Notebook (Pip) ; Notebook (ML) ; Notebook (RNN)


Case Study 6: Lee and Carter go Machine Learning: Recurrent Neural Networks

Article on SSRN

Code on GitHub ; Notebook


Case Study 5: Unsupervised Learning: What is a Sports Car?

Article on SSRN

Code on GitHub ; Notebook


Case Study 4: On Boosting: Theory and Applications

Article on SSRN

Code on GitHub ; Notebook


Case Study 3: Nesting Classical Actuarial Models into Neural Networks

Article on SSRN

Code on GitHub ; Notebook


Case Study 2: Insights from Inside Neural Networks

Article on SSRN

Code on GitHub ; Notebook


Case Study 1: French Motor Third-Party Liability Claims

Article on SSRN

Code on GitHub ; R Notebook (desciptive) ; R Notebook (GLM) ; Python Notebook (descriptive) ; Python Notebook (GLM)