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.
# the released version from CRAN
install.packages("NetSimR")
# the development version from GitHub
# install.packages("remotes")
remotes::install_github("NetSimAnalytics/NetSimR")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)run_shiny_simulator() # claims simulator
run_shiny_distribution_fitting_tool() # frequency and severity fits
run_shiny_glm_fitting_tool() # generalised linear modelsThe methods are described in articles by Yiannis Parizas in The Actuary: Free for All (2023), Escaping the triangle (2019) and Take to excess (2019).