CRAN Task View: Actuarial Science
|Maintainer:||Christophe Dutang, Vincent Goulet|
|Contact:||dutangc at gmail.com|
|Contributions:||Suggestions and improvements for this task view are very welcome and can be made through issues or pull requests on GitHub or via e-mail to the maintainer address. For further details see the Contributing guide.|
|Citation:||Christophe Dutang, Vincent Goulet (2023). CRAN Task View: Actuarial Science. Version 2023-10-01. URL https://CRAN.R-project.org/view=ActuarialScience.|
|Installation:||The packages from this task view can be installed automatically using the ctv package. For example, |
ctv::install.views("ActuarialScience", coreOnly = TRUE) installs all the core packages or
ctv::update.views("ActuarialScience") installs all packages that are not yet installed and up-to-date. See the CRAN Task View Initiative for more details.
Actuaries are experts in evaluating the likelihood and financial consequences of future events. A pivotal part of their work is the modeling of the size and frequency of insurance claims. With probability models for the claims process in hand, actuaries can compute insurance premiums, determine the amount a company has to set aside in its actuarial reserve to cope with future events, evaluate the risk the company will not be able to meet its obligations, elaborate optimal investment strategies for its assets, or run simulations to compare business strategies or solve otherwise untractable problems.
Base R contains a wide array of functions for probabilistic and statistical models used in actuarial mathematics. Nevertheless, a number of packages have been developed to extend or ease actuarial computations. Due to the intrinsically interdisciplinary nature of actuarial science, this view intersects with other views Distributions, Econometrics, ExtremeValue, and Finance.
The maintainers gratefully acknowledge the comments and suggestions from Patrice Kiener and Quentin Guibert. If you think that some package is missing from the list, please let us know, either via e-mail to the maintainer or by submitting an issue or pull request in the GitHub repository linked above.
Table of contents
- lifecontingencies provides the most popular functionalities for life actuarial mathematics, namely, survival/death probabilities, the present value of life annuities and (whole)-life insurance one, two or multiple heads. The package also propose S4 classes for handling lifetables, multiple decrement tables and actuarial tables.
- AnnuityRIR proposes different techniques for the approximation of the present and final value of a unitary annuity-due or annuity-immediate considering interest rate as a random variable.
- LifeInsuranceContracts provides R6 classes to model traditional life insurance contracts like annuities, whole life insurances or endowments with (discretionary) profit participation. This package provides a framework to model such contracts in a very generic (cash-flow-based) way and includes modelling profit participation schemes, dynamic increases or more general contract layers, as well as contract changes.
- MortCast provides a function
life.table to compute survival/death probabilities.
Mortality laws and prospective mortality models
- demography provides functions for demographic analysis including lifetable calculations; Lee-Carter modelling; functional data analysis of mortality rates, fertility rates, net migration numbers; stochastic population forecasting.
- HMDHFDplus allows to read Human Mortality Database and Human Fertility Database Data from the Web in conjunction with demography.
- StMoMo implements of the family of generalised age-period-cohort stochastic mortality models. This family of models encompasses many models proposed in the actuarial and demographic literature including the Lee-Carter (1992) doi:10.2307/2290201 and Cairns-Blake-Dowd (2006) doi:10.1111/j.1539-6975.2006.00195.x models. It includes functions for fitting mortality models, analysing their goodness-of-fit and performing mortality projections and simulations.
- apc provides functions for age-period-cohort analysis. It can deal with: aggregate data indexed by age-cohort, age-period or cohort-period, for which a GLM allow a fit for 3, 2, 1 or 0 of the age-period-cohort factors; individual-level data for each of age, period, and cohort for which a GLM allow to fit repeated cross-section model.
- MortalityTables provides classes to implement and plot cohort life tables for actuarial calculations. In particular, birth-year dependent mortality tables using a yearly trend to extrapolate from a base year are implemented, as well as period life table, cohort life tables using an age shift, and merged life tables.
- StanMoMo implements of popular mortality models using the ‘rstan’ package, which provides the R interface to the Stan C++ library for Bayesian estimation.
- MortCast provides estimation and projection methods for Kannisto and Lee-Carter mortality models, as well as methods blending.
- MortalityLaws provides 27 parametric mortality distributions and construct full or abridged life tables given various input indices.
- MortalityGaps provides methods for forecasting male/female life expectancy based on analysis of the gap between male/female life expectancy in a country compared with the record level of female life expectancy in the world.
- GPRMortality estimate Bayesian statistical models for estimating child and adult mortality rates which its data likelihood is mortality rates from different data sources such as: death registration system, Censuses or surveys.
- IBMPopSim allows the efficient simulation of a wide class of individual based models where individuals are marked by their date of birth and a set of (discrete or continuous) characteristics.
- WH provides an enhanced implementation of Whittaker-Henderson smoothing for the gradation of one-dimensional and two-dimensional life insurance tables, based on Biessy (2023) doi:10.48550/arXiv.2306.06932. Among other features, it generalizes the original smoothing algorithm to maximum likelihood estimation, automatically selects the smoothing parameter(s) and extrapolates beyond the range of data.
See also the view Epidemiology for epidemiology topics and the view Bayesian for Bayesian inference.
Survival analysis and portfolio experience
For a general overview of survival analysis, see the view Survival.
- ELT provides functions to build experience life tables for three methods: the standardized mortality ratio, a semi-parametric relational model, a GLM Poisson with interactions between age and calendar years.
- lemur allows the user to selected mortality changes over the entire lifespan or at specific ages, as well as for overall mortality or for specific causes of death.
Life and pension reserving
- lifecontingencies for many life and pension computations.
- SimBEL allows to carry out Monte-Carlo simulation of asset-liability cashflows for unit-linked insurance and retirement plans in France.
The view Distributions provides a detailed list of probability distributions available in base R and CRAN packages. Here we focus only on packages that implement distributions particularly designed for actuarial science.
- Pioneer package actuar provides functions and data sets for actuarial science: modeling of loss distributions; simulation of compound models, discrete mixtures and compound hierarchical models. It support for many additional probability distributions to model insurance loss size and frequency: 23 continuous heavy tailed distributions (e.g. the Feller-Pareto family of distributions); the Poisson-inverse Gaussian discrete distribution; zero-truncated and zero-modified extensions of the standard discrete distributions as well as phase-type distributions.
- fitdistrplus provides a user-friendly function to fit discrete/continuous probability distributions based on maximum likelihood estimation, quantile matching estimation, moment matching estimation, etc. Starting values for numerical algorithms for loss distributions of actuar are provided.
- mbbefd provides distributions that are typically used for exposure rating in general insurance, in particular to price reinsurance contracts.
- OpVaR provides functions for computing the value-at-risk in compound Poisson models. The implementation comprises functions for modeling loss frequencies and loss severities with plain, mixed or spliced distributions using maximum likelihood estimation and Bayesian approaches.
- NetSimR provides capped mean, exposure curves and increased limit factor curves (ILFs) for lognormal, gamma, Pareto, sliced lognormal-Pareto and sliced gamma-Pareto distributions.
- Delaporte provides probability mass, distribution, quantile, random-variate generation, and method-of-moments parameter-estimation functions for the Delaporte discrete distribution.
A priori insurance pricing
A priori insurance pricing consists in fitting two models: one for claim frequency and one for claim severity. Classical pricing models rely on generalized linear models (GLM) that can be fitted in base R using
- tweedie allows an alternative approach to model the aggregate claim amount directly using a Tweedie model.
- insurancerating helps actuaries to implement GLMs with all relevant steps needed to construct a risk premium from raw data. It provides a data driven strategy for the construction of insurance tariff classes.
More advanced statistical models can be found in the views Econometrics and MachineLearning. See also the view Spatial for analysis of spatial data.
A posteriori experience pricing
- actuar provides functions for credibility theory:
cm is the unified front end for credibility models fitting and supports hierarchical models with any number of levels (with Bühlmann and Bühlmann-Straub models as special cases) and the regression model of Hachemeister.
cm can also fit linear Bayes models, in which case usage is much simplified.
- actuaRE allows to fit a random effects model using either the hierarchical credibility model, a combination of the hierarchical credibility model with a generalized linear model or a Tweedie generalized linear mixed model.
- ChainLadder provides various statistical methods and models which are typically used for the estimation of outstanding claims reserves in non-life insurance, including those to estimate the claims development result as required under Solvency II.
- clmplus implements the chain ladder model under the reverse time framework introduced in Hiabu (2017) doi:10.1080/03461238.2016.1240709 and extensions that add flexibility to the individual development factors modeling by allowing practitioners to set their own hazard rate model.
- NetSimR provides functions that help model excess levels, capping and pure incurred but not reported claims (pure IBNR) and includes calculating pure IBNR exposure with lognormal and gamma distribution for reporting delay.
- actuar provides infinite time ruin probability of Cramér-Lundberg and Sparre Andersen models, using phase-type distributions including mixtures of exponentials, Erlang and mixture of Erlang for both claim amount distribution and claim interarrival times.
- ruin implements a collection of common models of risk processes in actuarial science, represented as formal S4 classes. Each class (risk model) has a simulator of its path, and a plotting function. Further, a Monte-Carlo estimator of a ruin probability for a finite time is implemented, using a parallel computation. Currently, the package extends two classical risk models Cramer-Lundberg and Sparre Andersen models by including capital injections, that are positive jumps.
- SynthETIC creates an individual claims simulator which generates various features of non-life insurance claims. An initial set of test parameters, designed to mirror the experience of an Auto Liability portfolio, were set up and applied by default to generate a realistic test data set of individual claims (see vignette). The simulated data set then allows practitioners to back-test the validity of various reserving models and to prove and/or disprove certain actuarial assumptions made in claims modelling. The distributional assumptions used to generate this data set can be easily modified by users to match their experiences.
- SPLICE is an extension of SynthETIC , to simulate the evolution of case estimates of incurred losses through the lifetime of an insurance claim. The transactional simulation output now comprises key dates, and both claim payments and revisions of estimated incurred losses. An initial set of test parameters, designed to mirror the experience of a real insurance portfolio, were set up and applied by default to generate a realistic test data set of incurred histories.
Reinsurance and extreme events
- ReIns follows the book “Reinsurance: Actuarial and Statistical Aspects” and provides basic extreme value theory (EVT) estimators and graphical methods, EVT estimators and graphical methods adapted for censored and/or truncated data, Splicing of mixed Erlang distributions with EVT distributions, value-at-risk (VaR), conditional tail expectation (CTE) and excess-loss premium estimates.
- ExtremeRisks provides a set of procedures for estimating risks related to extreme events via risk measures such as expectile, value-at-risk, etc.
For a comprehensive review of extreme value analysis, see the view ExtremeValue.
- actuar provides functions to compute value-at-risk and conditional tail expectation.
- ActuarialM computes actuarial measures such as expected shortfall and value-at-risk using the Bell G family.
- atRisk provides actuarial measures such as expected shortfall and value-at-risk using a non-parametric approach or a parametric fit (via Gaussian or skew-t distributions).
- actuaryr contains functions to easily refer to the first or last (working) day within a specific period relative to a base date to facilitate actuarial reporting and to compare results.
- eiopaR provides EIOPA (European Insurance And Occupational Pensions Authority) risk-free rates.
- actxps helps to prepare data, summarize results, and create reports via a dedicated S3 class Actuarial Experience Studies.
Mortality databases are generally provided by demography and/or statistical institutes by each country (see below). However, the Human Mortality Database project at HMD provides a collection of reliable mortality datasets after a careful and very detailed protocol. HMD is a keystone for actuaries to compute reliable mortality/longevity estimates.
- Australian database is available at AHMD
- Canadian database is available at CHMD
- French regional database is available at FRD
- Japan database is available at JMD
- United States database is available at USMD
- CASdatasets provides a large variety of actuarial datasets, originally for the book Computational Actuarial Science with R. Note that the package is not hosted on CRAN but on github, at CNRS and UQAM.
- raw organizes several sets of publicly available data of interest to non-life actuaries.
- insuranceData provides insurance datasets, which are often used in claims severity and claims frequency modelling. It helps testing new regression models in those problems, such as GLM, GLMM, HGLM, nonlinear mixed models.
- actuar provides functions to facilitate the generation of random variates from various probability models commonly used in actuarial applications, such as discrete mixtures and compound models where both the frequency and the severity components can have a hierarchical structure.
- An individual claims generator for claims reserving studies is provided by Wang & Wuethrich at IndividualClaimsSimulator.
- An individual claims history simulation machine for annual cashflows is provided by Gabrielli & Wuethrich at IndividualClaimsHistory; see also simulationmachine.
- Cellar is a collection of community-curated open datasets for insurance analytics.
- DDPM provides some insurance-related datasets, some already in CASdatasets.
Documentation and online courses
See the view TeachingStatistics for usual documentation on teaching statistics.
Actuarial science using R references
- Charpentier, A., ed. (2014). Computational Actuarial Science with R, Chapman & Hall/CRC. doi:10.1201/b17230
- Kaas, R., Goovaerts, M., Dhaene, J. & Denuit, M. (2008). Modern Actuarial Risk Theory Using R, 2nd ed., Springer-Verlag. doi:10.1007/978-3-540-70998-5
- Bowers, N. L., Gerber, H. U., Hickman, J. C., Jones, D. A. & Nesbitt, C. J. (1997). Actuarial Mathematics, The Society of Actuaries.
- Teugels, J. & Sundt, B. (2004). Encyclopedia of Actuarial Science, Vol. 1, John Wiley & Sons. doi:10.1002/9780470012505
Life insurance references
- Dickson, D., Hardy, M. & Waters, H. (2013). Actuarial Mathematics for Life Contingent Risks, 2nd ed., Cambridge University Press. doi:10.1017/9781108784184
- Macdonald, A., Richard, S. & Currie, I. (2018). Modelling Mortality with Actuarial Applications, Cambridge University Press. doi:10.1017/9781107051386
Non-life insurance references
- Frees, E. (2009). Regression Modeling with Actuarial and Financial Applications, International Series on Actuarial Science, Cambridge University Press. doi:10.1017/CBO9780511814372
- Jong, P. D. & Heller, G. (2008). Generalized Linear Models for Insurance Data, Cambridge University Press. doi:10.1017/CBO9780511755408
- Klugman, S., Panjer, H. & Willmot, G. (2019). Loss Models: From Data to Decisions, 5th ed., John Wiley & Sons.
|Core:||actuar, ChainLadder, lifecontingencies, mbbefd, ReIns.|
|Regular:||actuaRE, ActuarialM, actuaryr, actxps, AnnuityRIR, apc, atRisk, clmplus, DDPM, Delaporte, demography, eiopaR, ELT, ExtremeRisks, FinancialMath, fitdistrplus, GPRMortality, HMDHFDplus, IBMPopSim, insuranceData, insurancerating, LifeInsuranceContracts, MortalityGaps, MortalityLaws, MortalityTables, MortCast, NetSimR, OpVaR, raw, ruin, SPLICE, StanMoMo, StMoMo, SynthETIC, tweedie, WH.|