Aggregate Risk and Capital

Aggregate Risk Computation Lab

Reconcile analytical moments with transparent R and Python simulations.

Aggregate Risk Computation Lab

Use simulation to extend mathematics, not replace it. Each lab follows the same audit:

  1. state the stochastic model and units;
  2. derive available moments;
  3. simulate with a fixed seed;
  4. reconcile simulation with theory;
  5. only then inspect tail quantities.

Lab A — collective model in R

Let NPoisson(40)N\sim\operatorname{Poisson}(40) and lognormal severity have mean £5,000 and log-scale SD 1.

E[S]=40(5,000)=£200,000,E[S]=40(5{,}000)=£200{,}000,SD(S)=40E[X2]=40(5,0002e)£52,133.\operatorname{SD}(S)=\sqrt{40E[X^2]} =\sqrt{40(5{,}000^2e)}\approx£52{,}133.
R

Compound Poisson–lognormal: theory versus simulation

Idle

Monte Carlo mean has standard error approximately SD(S)/30,000£301\operatorname{SD}(S)/\sqrt{30{,}000}\approx£301. A difference of a few hundred pounds is therefore expected; a difference of £20,000 signals a problem.

Lab B — heterogeneous individual risks in Python

Simulate the three risks from the previous page. Claim severities are lognormal with the stated conditional means and SDs; risks and occurrence indicators are independent in this baseline.

Py

Individual risks: formula versus simulation

Idle

The high zero probability and long right tail make a Normal approximation poor despite matching mean and variance.

Simulation quality checklist

CheckMinimum practice
reproducibilityreport seed, code, package versions, and sample size
parameterisationverify software's scale/rate and log/ordinary moments
unitskeep £, £000, and £m explicit
Monte Carlo errorrepeat seeds or estimate standard errors
tail stabilityshow estimates across increasing simulation sizes
rare eventsuse importance sampling or other variance reduction when crude simulation is inadequate
model validationcompare with real holdout data, not simulation from the fitted model alone

Practice extensions

  1. Double n_years; does mean error shrink roughly with 1/n1/\sqrt n?
  2. In Lab A, change severity log-SD from 1 to 1.4 while preserving mean. Predict mean, SD, and 99% quantile before running.
  3. In Lab B, make A and C occurrence indicators share a catastrophe state. Which analytical term must be added?
Expected reasoning
  1. Not exactly in one run, but typical Monte Carlo standard error scales as 1/n1/\sqrt n.
  2. Mean remains about £200,000; SD and tail quantiles rise because E[X2]E[X^2] rises.
  3. Add 2Cov(YA,YC)2\operatorname{Cov}(Y_A,Y_C) to portfolio variance; the full tail also changes and cannot be recovered from variance alone.

Continue to Tail Risk and Capital.

Copyright © 2026