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:
- state the stochastic model and units;
- derive available moments;
- simulate with a fixed seed;
- reconcile simulation with theory;
- only then inspect tail quantities.
Lab A — collective model in R
Let and lognormal severity have mean £5,000 and log-scale SD 1.
R
Compound Poisson–lognormal: theory versus simulation
Monte Carlo mean has standard error approximately . 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
The high zero probability and long right tail make a Normal approximation poor despite matching mean and variance.
Simulation quality checklist
| Check | Minimum practice |
|---|---|
| reproducibility | report seed, code, package versions, and sample size |
| parameterisation | verify software's scale/rate and log/ordinary moments |
| units | keep £, £000, and £m explicit |
| Monte Carlo error | repeat seeds or estimate standard errors |
| tail stability | show estimates across increasing simulation sizes |
| rare events | use importance sampling or other variance reduction when crude simulation is inadequate |
| model validation | compare with real holdout data, not simulation from the fitted model alone |
Practice extensions
- Double
n_years; does mean error shrink roughly with ? - In Lab A, change severity log-SD from 1 to 1.4 while preserving mean. Predict mean, SD, and 99% quantile before running.
- In Lab B, make A and C occurrence indicators share a catastrophe state. Which analytical term must be added?
Expected reasoning
- Not exactly in one run, but typical Monte Carlo standard error scales as .
- Mean remains about £200,000; SD and tail quantiles rise because rises.
- Add to portfolio variance; the full tail also changes and cannot be recovered from variance alone.
Continue to Tail Risk and Capital.