34 open-source Python libraries covering the full pricing stack. Ten of them we consider genuinely differentiated — tools that address hard problems in UK pricing where no adequate Python solution existed before. The full portfolio is below the flagship section.
All libraries are MIT-licensed, installable via pip, and built for Python 3.10+. The GitHub organisation is burning-cost.
Flagship Libraries
Ten libraries for the problems that matter most. Each addresses a specific hard problem — regulatory compliance, causal estimation, uncertainty quantification, smoothing, telematics scoring — where practitioners were previously doing things by hand or not doing them at all.
pearson_weighted score produces 13.4% narrower intervals than parametric Tweedie at identical 90% coverage. Frequency-severity conformal intervals, online retrospective adjustment, Solvency II SCR bounds.Search and Filter
Model Building
Tools for building and interpreting pricing models.
_Benchmark: +2.85pp Gini lift over direct GLM; NCD relativity error 4.47% vs GLM's 9.44%_ | `pip install shap-relativities` | | [insurance-glm-tools](https://github.com/burning-cost/insurance-glm-tools) | GLM tooling — nested GLM embeddings, R2VF factor level clustering, territory banding, SKATER. Torch is optional: core clustering and banding works without it
_Benchmark: R2VF fused lasso clustering vs manual quintile banding benchmarked_ | Core: `pip install insurance-glm-tools`
Neural: `pip install insurance-glm-tools[neural]` | | [insurance-gam](https://github.com/burning-cost/insurance-gam) | **Flagship.** Interpretable GAMs — EBM tariffs, Actuarial NAM, Pairwise Interaction Networks, exact Shapley values
_Benchmark: EBM/NAM interpretable tariffs with exact Shapley values benchmarked on synthetic motor data_ | `pip install insurance-gam` | | [insurance-interactions](https://github.com/burning-cost/insurance-interactions) | Automated GLM interaction detection using CANN, NID scoring, and SHAP interaction values
_Benchmark: Production defaults recover both planted interactions; compact config less reliable_ | `pip install insurance-interactions` | | [insurance-frequency-severity](https://github.com/burning-cost/insurance-frequency-severity) | **Flagship.** Sarmanov copula joint frequency-severity — analytical premium correction, IFM estimation. Torch is optional: Sarmanov copulas and IFM estimation work without it
_Benchmark: Sarmanov copula joint modelling with analytical premium correction benchmarked_ | Core: `pip install insurance-frequency-severity`
Neural: `pip install insurance-frequency-severity[neural]` | | [insurance-spatial](https://github.com/burning-cost/insurance-spatial) | BYM2 spatial territory ratemaking — PyMC 5 ICAR, adjacency matrices, Moran's I diagnostics
_Benchmark: BYM2 vs raw vs manual banding benchmarked on synthetic territory data_ | `pip install insurance-spatial` | | [insurance-distill](https://github.com/burning-cost/insurance-distill) | GBM-to-GLM distillation — fits a surrogate Poisson/Gamma GLM to CatBoost predictions, exports multiplicative factor tables for Radar/Emblem
_Benchmark: 90-97% R² match between GBM predictions and distilled GLM factors_ | `pip install insurance-distill` |
Distributional & Tail Risk
Beyond point estimates: full distribution modelling and tail risk quantification.
_Benchmark: GammaGBM +1.5% log-likelihood; prediction intervals calibrated_ | `pip install insurance-distributional` | | [insurance-distributional-glm](https://github.com/burning-cost/insurance-distributional-glm) | GAMLSS for Python — model all distribution parameters as functions of covariates, seven families
_Benchmark: GAMLSS sigma correlation 0.998 vs 0.000 for constant-phi_ | `pip install insurance-distributional-glm` | | [insurance-dispersion](https://github.com/burning-cost/insurance-dispersion) | Double GLM for joint mean-dispersion modelling — alternating IRLS, REML, actuarial factor tables
_Benchmark: Double GLM captures heteroscedasticity that constant-phi misses_ | `pip install insurance-dispersion` | | [insurance-quantile](https://github.com/burning-cost/insurance-quantile) | Quantile and expectile GBMs for tail risk, TVaR, and increased limit factors
_Benchmark: GBM lower TVaR bias on heavy tails; lognormal wins on pinball at small n_ | `pip install insurance-quantile` | | [insurance-severity](https://github.com/burning-cost/insurance-severity) | Spliced Pareto/Gamma severity, Deep Regression Networks, composite Lognormal-GPD, and EQRN extreme quantile neural networks for large loss modelling
_Benchmark: Composite reduces tail error 5.6% vs single lognormal; heavy-tail benchmark (Pareto α=1.5) shows 15–20% tail error reduction_ | `pip install insurance-severity` |
Credibility & Thin Data
When you don’t have enough data to trust a standard GLM.
_Benchmark: 6.8% MAE improvement on thin schemes vs raw experience_ | `pip install insurance-credibility` | | [insurance-multilevel](https://github.com/burning-cost/insurance-multilevel) | Two-stage CatBoost + REML random effects for high-cardinality group factors — ICC diagnostics
_Benchmark: 15.9% gamma deviance reduction; thin-group MAPE 63.6% vs one-hot 66.1%_ | `pip install insurance-multilevel` | | [bayesian-pricing](https://github.com/burning-cost/bayesian-pricing) | Hierarchical Bayesian models for thin-data pricing segments using PyMC 5 | `pip install bayesian-pricing` | | [insurance-thin-data](https://github.com/burning-cost/insurance-thin-data) | Pricing techniques for low-volume segments where standard GLM fitting is unreliable
_Benchmark: GLMTransfer narrows bootstrap 90% CI widths 30–60% vs standalone GLM_ | `pip install insurance-thin-data` | | [insurance-whittaker](https://github.com/burning-cost/insurance-whittaker) | **Flagship.** Whittaker-Henderson 1D/2D smoothing with REML lambda selection, Bayesian CIs, Poisson PIRLS
_Benchmark: 57.2% MSE reduction vs raw rates_ | `pip install insurance-whittaker` |
Causal Inference
Separating what causes what from what correlates with what.
_Benchmark: DML removes nonlinear confounding bias at scale (n≥50k); honest: over-partials at small n_ | `pip install insurance-causal` | | [insurance-causal-policy](https://github.com/burning-cost/insurance-causal-policy) | Synthetic difference-in-differences for causal rate change evaluation — event study, HonestDiD sensitivity. v0.2.0 adds DoublyRobustSCEstimator (DRSC, arXiv:2503.11375): doubly robust — consistent if either parallel trends or SC weights hold
_Benchmark: SDID 98% CI coverage; naive before-after biased +3.8pp by market inflation. DRSC: 24% lower RMSE than SDID with few donors (N_co=6), equivalent with many (N_co=40)_ | `pip install insurance-causal-policy` |
Fairness & Regulation
Proxy discrimination, Consumer Duty, and FCA evidence packs.
_Benchmark: Proxy R²=0.78 catches postcode proxy that Spearman (r=0.06) misses entirely_ | `pip install insurance-fairness` | | [insurance-covariate-shift](https://github.com/burning-cost/insurance-covariate-shift) | Density ratio correction for book shifts — CatBoost/RuLSIF/KLIEP, LR-QR conformal, FCA SUP 15.3 diagnostics
_Benchmark: Density ratio correction for portfolio composition shift benchmarked_ | `pip install insurance-covariate-shift` |
Validation & Monitoring
Prediction intervals, conformal methods, and post-deployment monitoring.
_Benchmark: Walk-forward catches 10.5% optimism that k-fold hides_ | `pip install insurance-cv` | | [insurance-conformal](https://github.com/burning-cost/insurance-conformal) [](https://github.com/burning-cost/insurance-conformal/actions/workflows/ci.yml) | **Flagship.** Distribution-free prediction intervals for insurance GBMs and GLMs — 5 non-conformity scores tuned for Tweedie/Poisson claims (`pearson_weighted` default, `pearson`, `deviance`, `anscombe`, `raw`), frequency-severity conformal intervals (Graziadei et al.), online retrospective adjustment (RetroAdj), Solvency II SCR bounds. v0.6.0.
_Benchmark: pearson_weighted score 13.4% narrower intervals than parametric Tweedie at identical 90% coverage; 50k synthetic UK motor policies_ | `pip install insurance-conformal` | | [insurance-conformal-ts](https://github.com/burning-cost/insurance-conformal-ts) | Conformal prediction for non-exchangeable claims time series — ACI, EnbPI, SPCI, Poisson/NB scores
_Benchmark: Sequential conformal vs static prediction intervals on claims time series benchmarked_ | `pip install insurance-conformal-ts` | | [insurance-deploy](https://github.com/burning-cost/insurance-deploy) [](https://github.com/burning-cost/insurance-deploy/actions/workflows/ci.yml) | Champion/challenger pricing framework — shadow mode, SHA-256 routing, SQLite quote log, bootstrap LR test
_Benchmark: Champion/challenger routing, shadow mode, quote logging benchmarked_ | `pip install insurance-deploy` | | [insurance-monitoring](https://github.com/burning-cost/insurance-monitoring) [](https://github.com/burning-cost/insurance-monitoring/actions/workflows/ci.yml) | **Flagship.** Model drift detection — exposure-weighted PSI/CSI, actual-vs-expected ratios, Gini drift z-test. `SequentialTest` for anytime-valid champion/challenger A/B testing (mSPRT, Johari et al. 2022). `PITMonitor` for calibration drift via PIT e-process martingale (~3% FPR vs repeated Hosmer-Lemeshow's 46%). `InterpretableDriftDetector` for feature-interaction drift attribution with BH FDR control (zero false positives in benchmarks). Current: v0.8.0.
_Benchmark: Peeking t-test 25% FPR (5x nominal); mSPRT holds at 1%. PITMonitor FPR ~3% vs repeated H-L 46%. InterpretableDriftDetector: 2/5 drifting factors correctly attributed, zero false positives_ | `pip install insurance-monitoring` | | [insurance-governance](https://github.com/burning-cost/insurance-governance) | **Flagship.** Model governance — PRA SS1/23 validation reports, model risk management, risk tier scoring
_Benchmark: Automated suite catches age-band miscalibration manual checklists miss_ | `pip install insurance-governance` |
Optimisation & Pricing Strategy
From rate change recommendations to live price experimentation.
_Benchmark: Demand-curve pricing +143.8% profit lift over flat loading_ | `pip install insurance-optimise` |
Time Series & Trends
Inflation, reporting delays, and dynamic pricing.
_Benchmark: 3.93pp MAPE improvement over naive OLS trend; structural break detection now confirmed on step-change DGP_ | `pip install insurance-trend` | | [insurance-dynamics](https://github.com/burning-cost/insurance-dynamics) | Dynamic pricing models — GAS score-driven filters, Bayesian changepoint detection (BOCPD/PELT)
_Benchmark: GAS Poisson +13% MAE improvement over GLM trend_ | `pip install insurance-dynamics` |
Other Libraries
_Benchmark: Cure model recovers 34.1% cure fraction (true 35.0%); KM/Cox extrapolate to zero_ | `pip install insurance-survival` | | [insurance-telematics](https://github.com/burning-cost/insurance-telematics) | **Flagship.** HMM-based driving state classification and GLM-compatible risk scoring from raw telematics trip data
_Benchmark: HMM state features 3–8pp Gini improvement over raw trip averages_ | `pip install insurance-telematics` | | [insurance-synthetic](https://github.com/burning-cost/insurance-synthetic) | Vine copula synthetic portfolio generation — exposure-aware, preserves multivariate dependence
_Benchmark: Copula 64% better correlation preservation vs naive_ | `pip install insurance-synthetic` | | [insurance-datasets](https://github.com/burning-cost/insurance-datasets) | Synthetic UK motor portfolio with known DGP parameters — validate that your model recovers true relativities before using real data. Polars output supported via `polars=True` on `load_motor()` and `load_home()`
_Benchmark: GLM parameter recovery RMSE 0.069; OVB demo shows 24% NCD inflation when age omitted_ | `pip install insurance-datasets`
Polars: `pip install insurance-datasets[polars]` |