Actuarial Functions for Non-Life Insurance Modelling

Assists actuaries and other insurance modellers in pricing, reserving and capital modelling for non-life insurance and reinsurance modelling. Provides functions that help model excess levels, capping and pure Incurred but not reported claims (pure IBNR). Includes capped mean, exposure curves and increased limit factor curves (ILFs) for LogNormal, Gamma, Pareto, Sliced LogNormal-Pareto and Sliced Gamma-Pareto distributions. Includes mean, probability density function (pdf), cumulative probability function (cdf) and inverse cumulative probability function for Sliced LogNormal-Pareto and Sliced Gamma-Pareto distributions. Includes calculating pure IBNR exposure with LogNormal and Gamma distribution for reporting delay. Includes three 'shiny' tools: a claims simulator with reinsurance structures, a generalised linear model fitting tool, and a claims frequency and severity distribution fitting tool. Methods used in the package refer to Free for All by Yiannis Parizas (2023) < https://www.theactuary.com/2023/03/02/free-all>; Escaping the triangle by Yiannis Parizas (2019) < https://www.theactuary.com/features/2019/06/2019/06/05/escaping-triangle>; Taken to excess by Yiannis Parizas (2019) < https://www.theactuary.com/features/2019/03/2019/03/06/taken-excess>.


NetSimR

R-CMD-check CRAN status

NetSimR is an R package of actuarial functions for non-life insurance and reinsurance pricing, reserving and capital modelling, with three Shiny tools for simulating claims and fitting distributions and GLMs.

Installation

# the released version from CRAN
install.packages("NetSimR")

# the development version from GitHub
# install.packages("remotes")
remotes::install_github("NetSimAnalytics/NetSimR")

What it does

  • Capped means, exposure curves and increased limit factors (ILFs) for LogNormal, Gamma, Pareto, sliced LogNormal-Pareto and sliced Gamma-Pareto claim sizes.
  • Sliced distributions: mean, density, cdf and quantile function of the sliced LogNormal-Pareto and Gamma-Pareto distributions.
  • Pure IBNR exposure from a LogNormal or Gamma reporting delay.
  • Claims simulation with a frequency-severity model, Pareto tail slices, a severity cap, each-and-every-loss layers with reinstatements and aggregate layers.
  • Three Shiny tools: a claims simulator with reports and run comparison, a distribution fitting tool for claim counts and sizes, and a GLM fitting tool.

Examples

library(NetSimR)

# mean claim size capped at 600 for a Pareto with scale 200 and shape 1.2
ParetoCappedMean(600, 200, 1.2)

# increased limit factor from 700 to 1,000 for Gamma claim sizes
ILFGamma(700, 1000, 1, 0.0005)

# Gamma body sliced at 3,000 with a Pareto tail of shape 1.4
pSlicedGammaPareto(5000, 1.2, 0.0004, 3000, 1.4)

# pure IBNR exposure (in days) of three periods, with a Gamma reporting delay
PureIBNRGamma(
  as.Date(c("2006-01-01", "2006-07-01", "2007-01-01")),
  as.Date(c("2006-12-31", "2007-06-30", "2007-12-31")),
  as.Date("2007-10-30"),
  shape = 7, rate = 0.15
)

# 10,000 years of Poisson claim counts with LogNormal claim sizes, a Pareto tail
# above 100,000, and a layer of 50,000 excess of 20,000 on each claim with two
# reinstatements
ceded <- simulate_claims(
  10000, "Poisson", 3, "LogNormal", c(meanlog = 8, sdlog = 1.5), seed = 1,
  pareto_thresholds = 100000, pareto_alphas = 1.5,
  eel_layer = "limited", eel_deductible = 20000, eel_limit = 50000,
  eel_reinstatements = 2
)
mean(ceded$total_claims)

Shiny tools

run_shiny_simulator()                  # claims simulator
run_shiny_distribution_fitting_tool()  # frequency and severity fits
run_shiny_glm_fitting_tool()           # generalised linear models

Vignettes

Four vignettes set out the theory behind the functions and work through examples:

  • Capped means, exposure curves and increased limit factors
  • Sliced LogNormal-Pareto and Gamma-Pareto distributions
  • Pure IBNR exposure from a reporting delay distribution
  • Simulating claims with simulate_claims()

They are on the package's CRAN page, and browseVignettes("NetSimR") opens the copies installed with the package (a development version installed from GitHub has them only when installed with build_vignettes = TRUE).

References

The methods are described in articles by Yiannis Parizas in The Actuary: Free for All (2023), Escaping the triangle (2019) and Taken to excess (2019).

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.