Insurance pricing

GLM, GAM or gradient boosting: choosing a pricing model an insurer can defend

The useful question is not which algorithm wins on a leaderboard, but which model a tariff, a regulator and an underwriting team can live with. Our answer is a sequence rather than a choice: a GLM as the benchmark, smooth effects where bands are arbitrary, boosting as a microscope on what the GLM still misses, and the interactions it justifies brought back into a tariff anyone can read.

Start from a GLM: a tariff anyone can read

With a log link and exposure as an offset, a GLM turns every rating factor into a multiplier: a level of the factor raises or lowers the expected cost by a percentage anyone can read. Those relativities translate straight into a rating table, can be explained to an underwriter and documented for a regulator, and their uncertainty comes with the model.

For the number of claims Ni of policy i, observed over an exposure Ei, the frequency model our engine fits reads

ln𝔼[Ni∣xi]=lnEi+β0+∑jβjxij,𝔼[Ni∣xi]=Eieβ0∏j(eβj)xij
(1)

where xij is rating factor j of the policy, an indicator for a level when the factor is categorical, and eβj the multiplier of that level: the relativity that goes into the rating table. The exposure enters as an offset, with a coefficient fixed at 1, so that twice the exposure means twice the expected claims.

The price of that clarity is that the GLM only sees what it is given. The analyst decides the shape of each effect, and an interaction, a young driver in a powerful car, a breed at a given age, exists in the model only if someone thought to add it. The rest of the sequence is about finding what was not given, without losing the readable tariff.

Frequency and cost apart, Tweedie as a cross-check

Most policies cost nothing in a year and a few cost a lot. We model the two parts separately first: the number of claims with a Poisson GLM, or a negative binomial when claims are over-dispersed, with exposure as an offset, and the average cost per claim with a Gamma GLM weighted by the number of claims. The pure premium is their product. The point is to see which factors drive frequency and which drive cost, a young driver who claims often but cheaply, a vehicle that claims rarely but expensively, and to diagnose each part on its own.

In formulas, for a policy whose rating factors are x,

PP(x)=λ(x)μ(x),λ(x)=exp(β0+∑jβjxj),μ(x)=𝔼[SiNi|xi=x, Si>0]=exp(ζ0+∑jζjxj)
(2)

where PP(x) is the pure premium per unit of exposure, λ(x) the expected frequency per unit of exposure from (1), μ(x) the mean cost of a claim and Si the total paid on policy i. Our engine fits μ(x) by a Gamma GLM with a log link on the rows with a payment, each weighted by its number of claims Ni; ζj are the coefficients of that cost model. The product assumes that, given x, the number of claims and their amounts are independent: the assumption of the collective model, which we state rather than take for granted.

A Tweedie GLM, a Poisson number of gamma-distributed claims, models the pure premium in one step. It is compact, and it is a natural objective for gradient boosting. With a constant dispersion, though, it makes each factor act on frequency and on cost in a fixed proportion: when a factor raises frequency but lowers cost, its single relativity is a compromise that hides both effects.

The fixed proportion is a property of the Tweedie law, whatever the software that fits it, and it holds only under three assumptions: a power p strictly between 1 and 2, a dispersion ϕ fixed, the same for every policy per unit of exposure (a policy of exposure Ei then has the dispersion ϕ/Ei), and the compound Poisson–Gamma representation: the cost Y of a policy over one unit of exposure is a Poisson number of claims, of mean λ, whose amounts are independent and follow a gamma law of mean μ, so that the pure premium is λμ. Then

Var(Y)=ϕ(λμ)p,λ=(λμ)2−pϕ(2−p),μ=ϕ(2−p)(λμ)p−1,λ′=κ2−pλ,μ′=κp−1μ,λ′μ′=κλμ
(3)

where the first statement is the Tweedie variance, the next two say that, once p and ϕ are fixed, the pure premium alone sets both the frequency and the mean cost, and the last three follow: a factor that multiplies the pure premium by κ turns λ and μ into λ′ and μ′, the frequency multiplied by κ2−p and the mean cost by κp−1: always the same split, whatever the factor. Under these assumptions, a factor that raises the frequency and lowers the cost cannot be represented.

So Tweedie is our cross-check, not our explanation. Comparing its relativities with the frequency-severity product shows quickly where they diverge, and each divergence is a question to answer before the tariff is set. Large claims are capped and loaded separately when that is justified; otherwise they can drive the severity model.

Smooth effects where bands are arbitrary

Bands are convenient but arbitrary. A driver of 24 and one of 25 can end up a whole relativity apart while drivers of 25 and 34 pay the same, and on sparse ages at the edges of the portfolio a band averages very different risks. A smooth curve, kept inside the same GLM structure and with a flexibility chosen from the data by cross-validation rather than by eye, follows the risk instead. It can be read directly or discretised into a rating table that tracks it closely: the tariff keeps its multiplicative form, without the jumps.

A banded GLM effect against a smooth curve fitted to the same data
A banded GLM effect against a smooth curve fitted to the same data

Boosting as a microscope on the residuals

Gradient boosting finds non-linear effects and interactions nobody specified. As a filed tariff it is hard to carry: thin cells can be fitted too closely, effects that should be monotonic can wobble, and explanations such as SHAP values describe the model after the fact rather than define it. So we use it differently. The boosting model starts from the GLM or smoothed model, its prediction as offset or base score under the same loss, and is fitted on training folds only. What it still finds is, by construction, what the simpler model misses, and it is usually a handful of interactions rather than a new model.

Justified interactions back into the tariff

Each interaction the boosting points to comes back as an explicit term of the GLM, and stays only if it holds on a period the models have not seen, is stable from one year to the next and makes sense to someone who knows the business. The result is still a tariff anyone can read, with the effects the first GLM missed. Boosting earns its place as a detector, and as the final model only where the decision allows it, such as claims triage or retention scoring rather than a filed tariff.

Comparing the candidates fairly

Same data, same exposure, a period none of the models has seen. We measure fit, ranking and level by segment, and we look at where the candidate and the current model disagree and which one the actual claims support. Two further tests matter as much: how stable the relativities are from one year to the next, and how much the new tariff would move each customer’s premium. A model that ranks risks better but moves the premium of a third of the portfolio by 20% is not ready.

In practice

Rating factors with many levels need their own treatment before any of these models; we describe it in our article on clustering categories and apply it in our 74-breed pricing case, where frequency, severity and Tweedie GLMs were fitted on the grouped breeds.

References

E. Ohlsson and B. Johansson (2010), Non-Life Insurance Pricing with Generalized Linear Models, Springer; S. N. Wood (2017), Generalized Additive Models: An Introduction with R, 2nd ed., CRC Press; J. H. Friedman (2001), “Greedy function approximation: a gradient boosting machine”, Annals of Statistics; T. Chen and C. Guestrin (2016), “XGBoost: a scalable tree boosting system”, KDD; S. M. Lundberg and S.-I. Lee (2017), “A unified approach to interpreting model predictions”, NeurIPS; M. V. Wüthrich and M. Merz (2023), Statistical Foundations of Actuarial Learning and its Applications, Springer; B. Jørgensen (1987), “Exponential dispersion models”, Journal of the Royal Statistical Society, Series B; G. K. Smyth and B. Jørgensen (2002), “Fitting Tweedie’s compound Poisson model to insurance claims data: dispersion modelling”, ASTIN Bulletin.

Raphael Sebbah

About the author

Raphael Sebbah

Actuary (ISUP) and data scientist, founder of Smart Data Science. Formerly at Amundi (CAAM), Dexia, AIG and Phoenix; co-author of research published in The European Physical Journal C and Brain Communications.

LinkedIn · ORCID · Google Scholar

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