Skip to content

philippehardydata/CDRboot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CDRboot — Tweedie GLM Bootstrap Reserve Risk Model

Overview

CDRboot estimates the distribution of the one-year technical result (Claims Development Result) for non-life insurance reserve risk, as required under Solvency 2.

The capital requirement for reserve risk is defined as:

VaR(0.995) of L   where   L = C1 + R1 - R0

(equivalently L = -CDR with CDR = R0 - C1 - R1)

  • R0 — opening reserves (IBNR reserves at the beginning of the year)
  • C1 — claims payments during the year
  • R1 — closing reserves at the end of the year (re-reserving)

The model addresses the three main challenges of Solvency 2 reserve risk modelling:

  1. Process variance — inherent variability in future claim payments, captured via simulation
  2. Parameter variance — uncertainty in GLM parameter estimation, captured via bootstrap resampling of Pearson residuals
  3. Re-reserving — the dependency between next-year payments and closing reserves, handled by re-fitting a GLM on the extended triangle

Methodology

The model follows the double bootstrap re-reserving methodology introduced by Diers (2007) and Ohlsson & Lauzenings (2008), combined with Tweedie GLMs from the exponential dispersion family.

Step 1 — Opening reserves

A Tweedie GLM is fitted on the observed incremental claims triangle using accident year and development year as the only explanatory variables (Chain Ladder structure):

log(E[Cij]) = ci + bj

Opening reserves are the sum of fitted values in the future triangle.

Step 2 — Bootstrap & next-year payment simulation

For each bootstrap replication:

  • Adjusted Pearson residuals are resampled with replacement
  • A pseudo-triangle is constructed and a new GLM is fitted
  • Next-year diagonal payments are simulated from the fitted pseudo-triangle using the selected Tweedie distribution (Poisson, Gamma, Tweedie, or Inverse Gaussian)

Step 3 — Closing reserves (re-reserving)

For each simulation:

  • Simulated next-year payments are added to the initial triangle
  • A new GLM is fitted on the extended triangle (unobserved future cells remain NA and are excluded from the fit)
  • Closing reserves are predicted from this updated fit

Output

The distribution of L = C1 + R1 - R0 is obtained from nBoot × nsim replications. The VaR at 99.5% of this distribution is the Solvency 2 capital requirement for reserve risk.


Installation

# Install required packages (run once)
install.packages(c("tweedie", "statmod"))
# Load the function
source("CDRboot.R")

Data

Sample Motor cumulative triangle (10×10, Belgian market illustration):

File Description
triangle_auto.csv Cumulative triangle (NA = unobserved future)
triangle_auto.RData Same triangle as object triangle_auto
# From CSV
y <- as.matrix(read.csv("triangle_auto.csv", header = TRUE, na.strings = ""))

# From RData
load("triangle_auto.RData")
y <- as.matrix(triangle_auto)

Usage

source("CDRboot.R")
load("triangle_auto.RData")
y <- as.matrix(triangle_auto)

# Smoke test (fast)
set.seed(42)
CDRboot(y = y, g = 1.28, nBoot = 2, nsim = 3)

# Full run (slow)
results <- CDRboot(y = y, g = 1.28, nBoot = 999, nsim = 1000)

Arguments

Argument Type Description
y matrix (n × n) Cumulative claims triangle
g numeric Tweedie power parameter
nBoot integer Number of bootstrap replications
nsim integer Number of simulations per bootstrap
plot logical Draw P&L density plot (default TRUE)

Tweedie power parameter g

Value Distribution
1 Poisson
1 < g < 2 Tweedie (compound Poisson-Gamma)
2 Gamma
3 Inverse Gaussian

The optimal power can be selected by maximising the quasi log-likelihood over the observed triangle.

Importing your own triangle from a CSV

y <- as.matrix(read.csv("your_triangle.csv", header = TRUE, na.strings = ""))
CDRboot(y = y, g = 1.28, nBoot = 999, nsim = 1000)

Storing results for further analysis

results <- CDRboot(y = y, g = 1.28, nBoot = 999, nsim = 1000)

results$open_reserves   # Opening reserves R0
results$next_yr_tot     # Distribution of next-year payments C1
results$close_res       # Distribution of closing reserves R1
results$pnl             # Distribution of loss L = C1 + R1 - R0

# Capital requirement at 99.5%
quantile(results$pnl, 0.995)

Output

The function prints:

  • Quantiles of next-year payments (C1) at levels 50%, 75%, 90%, 95%, 99%, 99.5%, 99.95%
  • Quantiles of closing reserves (R1) at the same levels
  • Quantiles of the technical result / loss (P&L) at the same levels
  • Mean and standard deviation of the P&L
  • Opening reserves R0
  • Pearson and Spearman correlations between C1 and R1
  • A density plot of the P&L with empirical and normal fit overlay

Empirical results (from thesis)

Results obtained on Belgian insurance market data (National Bank of Belgium, 10 accident years 2001–2010):

Line of Business Settlement period Best GLM Opening Reserves Capital Req. % of Reserves
Motor Short Tweedie (1.28) 204,738 k€ 23,002 k€ 11.2%
Casualty Medium Poisson 212,594 k€ 21,623 k€ 10.2%
Motor TPL Medium Gamma 2,038,056 k€ 138,000 k€ 6.8%
Legal Protection Long Poisson 462,871 k€ 35,464 k€ 7.7%

Key findings:

  • Re-reserving reduces capital requirements by 10–20% for lines with medium and long settlement periods
  • Ignoring parameter variance (bootstrap) leads to serious underestimation of risk, especially for long-tail lines
  • The Tweedie GLM outperforms Poisson in motor insurance, confirming that all members of the exponential dispersion family should be considered

Dependencies

Package Role
tweedie rtweedie() simulation
statmod Tweedie GLM family and rinvgauss() for Inverse Gaussian (g = 3)

References

  • Diers, D. (2008). Stochastic re-reserving in multi-year internal models. ASTIN Colloquium, Helsinki.
  • England, P. & Verrall, R.J. (2002). Stochastic claims reserving in general insurance. British Actuaries Journal, 8(3).
  • Merz, M. & Wüthrich, M.V. (2008). Modelling the claims development result for solvency purposes. CAS E-Forum.
  • Ohlsson, E. & Lauzenings, J. (2008). The one-year non-life insurance risk. ASTIN Colloquium, Manchester.
  • Renshaw, A.E. & Verrall, R.J. (1998). A stochastic model underlying the chain-ladder technique. B.A.J. 4.
  • Wüthrich, M.V. (2003). Claims reserving using Tweedie's compound Poisson model. ASTIN Bulletin.

Related projects

Part of a non-life quantitative risk series:

Project Focus Repo
Claim frequency GLM vs ML for P(claim) EDA-GLM-RF-XGB
Aggregate loss (this repo) Frequency–severity Monte Carlo, VaR/TVaR mtpl-loss-model
Reserve risk (Solvency II) Tweedie GLM + double bootstrap CDR CDRboot

Full portfolio overview: philippehardydata


Author

Philippe le Hardÿ — Actuarial & Quantitative Risk Consultant
GitHub

About

One-year reserve risk (CDR) under Solvency II — Tweedie GLM + double bootstrap (R)

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages