The hardware and bandwidth for this mirror is donated by METANET, the Webhosting and Full Service-Cloud Provider.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]metanet.ch.

NetSimR NetSimR logo

R-CMD-check CRAN status CRAN downloads Codecov test coverage

NetSimR is an R package of actuarial functions for non-life insurance and reinsurance pricing, reserving and capital modelling, with six Shiny tools for simulating claims, fitting distributions and GLMs, reserving, pricing excess of loss reinsurance and the capital of a portfolio. Its website, with every help page and the vignettes, is https://netsimr.netsimanalytics.com/, where the tools can also be tried in the browser, with nothing to install.

Your data stays on your computer. The tools run on your own machine: in R or, on the website, in an R that runs inside your browser. A file you open in a tool is read there and is not sent anywhere. How this works.

Try the Shiny apps in your browser, nothing to install

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

Examples

library(NetSimR)

# mean claim size capped at 600 for a Pareto with scale 200 and shape 1.2
# (the older CamelCase names, such as ParetoCappedMean(), still work)
pareto_capped_mean(600, 200, 1.2)

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

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

# pure IBNR exposure (in days) of three periods, with a Gamma reporting delay
pure_ibnr_gamma(
  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 at 100% of an upfront premium of 10,000
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, eel_premium = 10000
)
mean(ceded$total_claims)
mean(ceded$reinstatement_premium)

# chain ladder reserves of the RAA triangle with Mack's standard errors and a
# fitted tail, then the 99.5th percentile of the bootstrapped total reserve
chain_ladder(raa_triangle, tail = "exponential")
bootstrap_chain_ladder(raa_triangle, n = 10000, seed = 1)$total[["p99.5"]]

# the one-year view of the same reserves, and paid and incurred claims projected together
merz_wuthrich(raa_triangle)$total
munich_chain_ladder(quarg_mack_paid, quarg_mack_incurred)$total

# a layer of 4m excess of 1m priced on its experience and on a property risk
# profile with the Swiss Re Y3 exposure curve
burning_cost(xl_large_losses, xl_premium[, c("year", "premium")], 1e6, 4e6,
             inflation = 0.04, rating_premium = 60e6)
property_exposure_rating(xl_property_profile, 1e6, 4e6, curve = "Y3", loss_ratio = 0.55)

Shiny tools

run_shiny_simulator()                  # NetSimulator: claims simulation
run_shiny_distribution_fitting_tool()  # NetDisFit: frequency and severity fits
run_shiny_glm_fitting_tool()           # NetGLM: generalised linear models
run_shiny_reserving_tool()             # NetReserve: claims reserving
run_shiny_reinsurance_pricing_tool()   # NetTreaty: reinsurance pricing
run_shiny_portfolio_tool()             # NetCapital: portfolio capital

Problems and ideas are welcome as GitHub issues; each tool’s About card links to them.

Vignettes

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

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).

How to cite

If NetSimR helps your work, please cite it; citation("NetSimR") gives the reference for the version installed, and a BibTeX entry:

Parizas, Y. (2026). NetSimR: Non-Life Actuarial Pricing, Reserving, Reinsurance and Capital. R package version 0.4.0. https://doi.org/10.32614/CRAN.package.NetSimR

A star on GitHub or a mention to a colleague also helps others find it.

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.