Case study · Health insurance
Health claims: clean data and a new reserving method
One engagement, two connected problems: rebuild reliable insurance data, then estimate remaining claim costs from the history and timing of each claim.
The need
Contract, exposure and claim sources did not form a coherent base. Label variants, missing values and joins had to be fixed before payments and future costs could be analysed. The reserving question came next: how much will the claims still open at the valuation date cost, and how sure can we be?
Rebuilding the data
NLP-assisted correspondence dictionaries reconciled label variants and removed artificial categories; identifiers, dates and exposure periods were reconciled with claims. Investigating the gaps separated data problems from payments made outside coverage; that exposure check and what it recovered are told in the claims-leakage article. How such dictionaries are built and validated is described in our article on cleaning text data.
What a claim costs: a heavy tail
On the 10,114 ambulatory claims of the largest group contract, the logarithm of cost is almost exactly normal (skewness −0.15), so a lognormal severity model is the right starting point. The tail matters: the average claim costs 1.7 times the median one, and the top 1% cost more than 7.5 times the median. An average alone hides most of the risk.
Profile matters less than the path
Age has a visible but limited effect: the median claim for children is 25% below the overall median, and adults are close to each other. Rank correlations make the point sharper. Demographic and contract variables barely move cost (age 0.11, smoker 0.03, deductible −0.08), while the way the claim unfolds does: number of payments 0.55, days between payments 0.47.
False discoveries were controlled throughout. Across care types, 2,482 pairwise differences were significant at the 5% level before adjustment; 1,685 remained after correction for multiple comparisons. Controls also revealed effects that simple comparisons conceal: for drugs outside the national basket, smoking was not significant in a univariate test (p = 0.22) but was once age, seniority and coverage were included (p = 0.04, partial R² = 0.11), a classic suppression effect.
That is why a reserving model should follow each claim’s path rather than average the portfolio.
Why aggregate reserving did not answer the question
Chain Ladder projects totals: it assumes the portfolio will keep developing the way its past aggregates did. It never looks inside a claim. Yet the client’s question was precisely about individual claims: for each one still open, what is left to come?
There was a second difficulty. Many claims stay open in the systems because they have not yet been closed there. The open stock mixes finished episodes with live ones, and an aggregate method cannot tell them apart.
A claim is a story, not a line
A health claim is rarely a single event. It is a sequence: a test, then a scan, then a specialist. The prenatal screening path below is taken straight from the data, with the share of claims that move to each next step.
The meaning of a step depends on what came before it. An acupuncture session after an accident is likely to open a treatment series; the same session for chronic back pain from desk work is closer to a wellness routine. The data shows exactly this: after a first acupuncture, another one follows 45% of the time; after a reflexology session, the episode simply ends in 65% of cases.
Variable-length memory: the context tree
A classical Markov chain looks only at the current step: an acupuncture session is an acupuncture session, whatever its history. That is not enough here. A variable-length Markov chain, built on context trees (Rissanen, 1983) and formalised by Bühlmann and Wyner (Annals of Statistics, 1999), learns how much of the past matters, path by path: a long memory where the data supports it, a short one where it does not.
From 84,036 observed steps, the model keeps 396 statistically robust contexts, up to five steps deep. The effect is large: after one psychological counselling session, another follows 11% of the time; after two in a row, 40%. Cataract surgery works the other way: once the second eye is operated, the episode closes in 90% of cases.
Time matters too: the semi-Markov layer
The order of events is not the whole story; the time between them matters as well. In the prenatal path, the genetic test follows the early scan after a median of 20 days, and the specialist consultation after 30. A prenatal claim still open after six months does not have the same future as one still open after nine, once the birth has taken place; a claim open for six months is not the same as one open for twelve.
The semi-Markov layer models these waiting times, so the simulation knows both what may come next and when. Together they give the method its name: VLSMC, a variable-length semi-Markov chain.
Simulating the remaining cost
Each open claim is continued thousands of times, step by step, with its own history. Summed over the portfolio, the simulations give the best estimate and its uncertainty: half of the remaining cost is paid within 21 days of the valuation date and 90% within 91 days, and the 99.5% value at risk sits 18% above the best estimate.
Bringing claims and data teams together
A path model is only as good as the coding of the claims it reads. Our approach links the two sides that rarely meet: the claims department, which knows what each case really is, and the data team, which owns the databases. Using each claim’s history, the work improved how claims are coded and classified, flagged episodes that should have been closed, and fed the corrections back into the bases.
The result is a secure, clean pipeline that goes from raw claims to a reserve estimate, combining data preparation, path modelling and simulation in one reproducible chain.
Comparison, backtest and limits
A comparison with Chain Ladder has to use exactly the same scope, the same flows and the same corrections on both sides; the figure we first published compared an episode scope with a loss-date scope, and is withdrawn until that comparison is rebuilt.
Two sequential pre-registered backtests were evaluated at the October 2022 and October 2023 cuts, with truth dated by payment and split by part. Their total forecasts were 0.91 and 0.96 times what was actually paid in the following year; but the parts were off in opposite directions: continuing payments on lines already open 0.73 and 0.87, new care in open episodes 1.45 and 1.14, care reported late 1.78 and 0.66. A total that looks right because errors offset is not a validation: by the criteria fixed in advance, the method was not adopted. The coverage of the intervals on the continuing payments also failed at the second cut. That is the point of a backtest by part: it tells you what to trust and what to fix.
All case studies
K-means and GLMs: pricing 74 breeds that did not fit one tariff
K-means grouped 74 breeds into three risk groups, revealing nine priced below cost (107% loss ratio), then fed frequency, severity and Tweedie GLMs.
9 breeds at a 107% loss ratio, now priced as a group
- K-means
- GLM
- Tweedie
SGTech: finding the signals linked to methane production
Cleaning 10,000+ industrial variables lifted the correlation with methane output from −7% to +71%; our models then pointed to the microbiome families associated with it.
Correlation −7% → +71% after cleaning
- Time series
- Outliers
- PCA
Let’s build better decisions together
Tell us about the decision you need to make.
A few lines are enough: your sector, the data you have and what you want to improve. We reply personally with a first view of the approach.
- A few lines are enough
- NDA on request
- Code and documentation handed over

