Loss by Business Line
Behavioral & Control KRIs
| KRI | Value | Status |
|---|
Management Actions
| Indicator | Status | Required Action | Owner | SLA |
|---|
Push a Loss Event (in-browser, demonstrates the ingest flow)
In the real system this is POST /api/v1/loss-events. Here it just appends to the in-memory dataset — click Recalculate afterward to see the dashboard respond.
Batch Upload (CSV or Excel)
In the real system this is POST /api/v1/loss-events/upload; here it's parsed entirely
in your browser. Accepts .csv, .xlsx, .xls. Headers can be snake_case (loss_date,
gross_loss_amount, ...) or the companion Excel model's column names (Loss_Date,
Gross_Loss, ...) — case-insensitive either way.
Download a blank template.
CSV parsing has no dependencies. Excel parsing loads a small parser library
(SheetJS) from a CDN the first time you pick an .xlsx file — the only network
request this page ever makes, and only if you use that feature; CSV works fully offline.
Configuration
Edit and click Recalculate — every threshold below drives the RAG colors and actions above, live.
How this demo differs from the real API
This file: JS Monte Carlo engine + embedded 300-event sample, runs on page load.
Full SaaS system: Flask REST API + SQLite + real push/pull endpoints + webhooks + auth.
Same math in both: Poisson(lambda) frequency, Lognormal(mu,sigma) severity, per business line,
fit by method of moments; exact per-event compound simulation (no
Fenton-Wilkinson approximation) — this demo runs the same algorithm as
engine.py in the SaaS package, just ported to JavaScript.
To see the real, callable version with authentication, webhooks, and a persistent database,
run the SaaS package: python3 seed.py && python3 app.py (see its README.md).