Insurance · FinTech
Insurance analytics platform
Actuarial loss reserving, interactively
Chain ladder modelling in Python with Plotly Dash. Replaced days of manual spreadsheet work with an interactive web app analysts can use in real time.
AI-Powered Insurance Analytics Platform
Domain: Insurance / FinTech / Actuarial Science Engagement: Client project (backend + data science delivery) Team Size: Backend + Data Science
The Problem
Loss reserving — the actuarial process that estimates future claim payouts from historical data — drives some of the largest numbers on an insurer's balance sheet. The client's existing workflow ran on spreadsheets passed between analysts. That workflow failed on every axis a senior actuary cares about:
- Time — a full reserving exercise took days, and had to be redone whenever new claims data arrived
- Auditability — the result was a spreadsheet snapshot; the sequence of decisions that produced it was not reconstructable
- Reproducibility — two analysts running "the same" analysis could produce different numbers because the pipeline was ad-hoc
- Error surface — a single mis-typed cell could silently change reserve estimates by millions
- Collaboration — spreadsheets don't share well; parameter tweaks broke other analysts' views
- Executive reporting — the outputs weren't presentable; every executive summary was re-built by hand
They needed a web-based platform that could run industry-standard actuarial chain ladder models on demand, expose the full parameter surface interactively, version every run, and produce regulator-friendly exports — all without asking actuaries to become software engineers.
What We Built
An interactive analytics platform combining production actuarial mathematics with a working web UI — where senior actuaries control every assumption, less-senior analysts can explore scenarios safely, and every result is traceable back to its inputs.
Actuarial engine
- Chain Ladder reserving as the core methodology, built on the
chainladderPython library — the same reference implementation used by actuarial practitioners globally - Triangle construction from raw claims data — origin period × development period matrices for paid and incurred losses, with configurable grain (monthly/quarterly/annual)
- Development factor selection — volume-weighted, simple-average, and analyst-overridden options, with per-column override so a senior actuary can pin specific factors based on judgment
- Tail factor handling — curve-fit tails (exponential, inverse power, Weibull) with analyst selection, not hardcoded defaults
- Ultimate loss projection and IBNR (Incurred But Not Reported) derivation
- Uncertainty quantification — Mack standard errors and bootstrapped reserve distributions so reserves come with a confidence range, not a single point estimate
- ML augmentation — Scikit-learn / Statsmodels models overlay GLM-based development factor estimation for segments where traditional chain ladder is thin on data, explicitly flagged rather than silently mixed in
Interactive dashboard (Plotly Dash)
- Real-time charts and tables that react to parameter changes without round-tripping to a separate frontend codebase
- AG Grid data tables for spreadsheet-like manipulation of triangles — analysts work in a familiar modality
- Drag-and-drop upload for claims data (Excel / CSV)
- Parameter adjustment with immediate visual feedback — every change is a new, labeled run, not a destructive edit
- Multi-tab analysis views for comparing scenarios side-by-side
Data pipeline
- Robust Excel / CSV ingestion tolerant of the formatting sins real insurance data carries — merged cells, inconsistent date formats, stray headers, mixed dtypes
- Claims triangle construction with explicit type contracts at the boundary so malformed input fails loudly rather than corrupts silently
- Pipeline stages (ingest → validate → triangulate → fit → project → export) that each produce an inspectable artifact so an analyst can audit where a number came from
- Export to formatted Excel workbooks for regulatory reporting and stakeholder presentations, matching the templates actuaries already use
Architecture & Engineering Discipline
Reproducibility as a product requirement
Every analysis run is a versioned, immutable artifact: the input dataset hash, the parameter set, the code version, and the full set of outputs are all persisted together. An analyst (or an auditor) can re-open a six-month-old run and see exactly which numbers came from exactly which inputs under exactly which assumptions. Running "the same" analysis twice produces byte-identical results — random seeds are pinned where models use them; Pandas operations are expressed order-deterministically.
Validation against ground truth
The actuarial module is tested against hand-calculated benchmarks from senior actuaries. Unit tests cover every stage of the chain ladder pipeline; regression tests lock in results for a library of reference triangles so a dependency bump that silently changes a factor selection is caught before it reaches production. Output-layer tests compare Excel export byte-patterns against regulator-facing templates.
Audit trail
Every mutating action writes to an audit log with user, run ID, input hash, and timestamp. Parameter overrides are captured with a free-text justification field so the why of a senior analyst's judgment call is preserved alongside the what. The trail is the answer to "who changed the reserve estimate, when, and based on what?" — which is the question that eventually gets asked.
Multi-user concurrency
Runs are scoped to users and teams; concurrent edits don't clobber each other because edits produce new runs rather than mutating existing ones. Shared runs are read-only by default; collaboration happens through explicit forking.
Performance engineering
Triangles and bootstrapped uncertainty runs can get large. The pipeline leans on Pandas and NumPy vectorization, avoids Python-level loops in hot paths, and caches intermediate results keyed by the input/parameter hash so a re-render of the same run is near-instant.
Deployment & operations
- Gunicorn WSGI workers behind a reverse proxy for production serving
- Structured logs with run IDs as correlation keys so a single user's investigation is traceable end-to-end
- Database migrations version-controlled alongside code
- Excel export artifacts stored durably so regulators and auditors can retrieve specific historical runs on demand
Tech Stack
| Layer | Technology |
|---|---|
| Backend | Flask, SQLAlchemy, Gunicorn |
| Database | MySQL (PyMySQL) |
| Actuarial core | chainladder 0.8.11 |
| Data Science | Pandas, NumPy, SciPy, Scikit-learn, Statsmodels |
| Visualization | Plotly Dash, Matplotlib, dash-ag-grid |
| File handling | openpyxl, xlsxwriter, dash_uploader |
| Reproducibility | Content-hashed input fingerprints, pinned random seeds, immutable run records |
| Audit | Per-action audit log with user, run, input hash, parameter diff |
Why this stack
The chainladder library is the reference implementation for the method and is maintained by practicing actuaries; re-implementing it would have been both unnecessary and dangerous. Plotly Dash gave us interactive visualization without a separate frontend codebase — analysts manipulate data and see results in real time from a single Python application, which matters because the runtime is dominated by numerical Python anyway. Flask + SQLAlchemy + MySQL kept the serving tier boring and reliable, where boring and reliable is exactly what you want under a regulated workload.
Outcome
- Automated loss reserving workflows that previously took days of manual spreadsheet work now run on demand
- Interactive dashboards let actuaries explore scenarios and adjust parameters with immediate feedback — and without destroying existing analyses
- Uncertainty quantification (Mack + bootstrap) gives reserves a confidence range rather than a single point
- Every run is reproducible and auditable — the same inputs produce the same outputs, and the trail of who-did-what is always preserved
- Excel exports match the templates regulators and executives already use, so the platform's outputs drop directly into existing reporting flows
- The system deliberately preserves senior-actuary judgment calls as first-class inputs rather than hiding them behind black-box automation
Key Takeaway
This project sits at the intersection of domain-specific expertise and production software engineering. Building an actuarial platform is not just "wrap a model in a web UI" — it's figuring out how to make the mathematics reproducible, the judgment auditable, the UI honest about uncertainty, and the exports regulator-ready. The engineering disciplines that earn trust here (reproducibility, audit, input validation, versioned runs) are indistinguishable from what serious financial software requires. Delivering that kind of rigor, for a domain most software teams wouldn't touch, is where this engagement earned its keep.
More recent work
Healthcare · Patient management
Multi-stakeholder healthcare platform
A six-app healthcare ecosystem — the product our client took to Shark Tank
Patient app, resident web, staff portal, admin dashboard, shared SDK, and an AI emergency dispatcher — all sharing a single backend with role-isolated access. Built for a healthcare startup that was later featured on Shark Tank with the product we delivered.
Read the case study
Transportation · Smart city
TransitPal
Multi-modal routing and cashless ticketing for public transit
Proprietary IP we built and productised — launched on the App Store and Play Store. 150+ APIs, dynamic fare engine, real-time vehicle tracking, ONDC-certified, and a voice AI for 250+ metro stations.
Read the case study
Have a project like this?
Tell us what you're trying to build. Discovery calls this week, scope within 3 business days.