Experience reporting and analysis on tidy tables: experience summaries and views, actual-versus-expected, claimant and cohort studies, driver and frequency-severity decomposition, rolling monitors, banded summaries. Study functions over the canonical actuarialpy.Experience.
Project description
experiencestudies
Experience reporting and monitoring workflows on tidy data.
Overview
experiencestudies turns tidy period-by-cell tables into the reports an
experience team actually ships: experience summaries, actual-versus-expected
against a plan, claimant and concentration analysis, cohort and duration
studies, driver decomposition, rolling monitors, and a one-call Excel packet.
Every workflow is available both as a free function on a DataFrame and
over the canonical actuarialpy.Experience, which carries column roles (revenue,
expense, exposure, date) so views compose without repeating configuration.
Installation
pip install experiencestudies
Requires Python 3.10 or newer.
Quick start
import pandas as pd
import experiencestudies as es
df = pd.DataFrame({
"month": pd.date_range("2024-01-01", periods=12, freq="MS"),
"lob": ["med"] * 12,
"claims": [820, 910, 875, 1010, 990, 1105, 1080, 1240, 1180, 1035, 995, 1150.0],
"premium": [1500.0] * 12,
"member_months": [1000.0] * 12,
})
# free-function form
summary = es.summarize_experience(
df, groupby="lob",
expense_cols="claims", revenue_cols="premium", exposure_cols="member_months",
)
print(summary)
# Experience form — same result, plus composable views
from actuarialpy import Experience
exp = Experience(df, expense="claims", revenue="premium",
exposure="member_months", date="month")
print(es.summary(exp, "lob"))
print(es.rolling(exp, 3).tail(3))
What's inside
- Experience summaries — grouped ratios, per-exposure rates, and rollups
via
summarize_experienceor study functions over theExperience. - Actual versus expected — plan merge, A/E summaries, and forecast comparison.
- Claimant analysis — top claimants, large-claimant flags, and
claim_concentrationthreshold statements. - Cohorts and durations — cohort assembly and duration-based studies.
- Decomposition — frequency/severity/mix drivers that reconcile exactly to the total change.
- Rolling monitors — trailing windows for emerging-experience review.
- Reporting —
underwriting_summaryandto_excel_reportfor a multi-sheet packet.
The full API reference and end-to-end worked examples live at openactuarial.org/experiencestudies.html.
The OpenActuarial ecosystem
experiencestudies is one of seven packages that share conventions — tidy tables,
explicit distribution parameterizations, reproducible random-number handling —
and compose across package seams:
| Package | Role |
|---|---|
| actuarialpy | Calculation primitives the workflow packages build on |
| experiencestudies | Experience reporting, actual-vs-expected, claimant and concentration analysis |
| projectionmodels | Claim, premium, and expense projection over a renewal horizon |
| ratingmodels | Manual and experience rating, credibility, indication, GLM relativities |
| lossmodels | Severity and frequency fitting, aggregate loss distributions |
| extremeloss | Extreme-value tails: POT/GPD, GEV, return levels, splicing |
| risksim | Portfolio Monte Carlo, dependence, reinsurance contracts, risk measures |
Install everything at once with pip install openactuarial.
Development
git clone https://github.com/OpenActuarial/experiencestudies
cd experiencestudies
python -m pip install -e ".[dev]"
pytest
ruff check src tests
CI runs the same gate on Python 3.10–3.14 across Linux and Windows.
Versioning and stability
All ecosystem packages are pre-1.0: minor releases may change APIs, and every release is documented in CHANGELOG.md. Current per-package API stability is tracked at openactuarial.org/stability.html.
License
MIT — see LICENSE.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file experiencestudies-0.5.1.tar.gz.
File metadata
- Download URL: experiencestudies-0.5.1.tar.gz
- Upload date:
- Size: 60.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d830933cdb63267f1c61720a97e43c3a2c4999b94705d5e21b44bcff9770e0c1
|
|
| MD5 |
62e0c0b5751ca096aabc7ef453a9a298
|
|
| BLAKE2b-256 |
d0c45cfaaa84f3d4e56c0360c9641077723cd4565a524b74b60ccac835a41d18
|
Provenance
The following attestation bundles were made for experiencestudies-0.5.1.tar.gz:
Publisher:
release.yml on OpenActuarial/experiencestudies
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
experiencestudies-0.5.1.tar.gz -
Subject digest:
d830933cdb63267f1c61720a97e43c3a2c4999b94705d5e21b44bcff9770e0c1 - Sigstore transparency entry: 2158192849
- Sigstore integration time:
-
Permalink:
OpenActuarial/experiencestudies@258a33bb0459600f4b319d3b2f4e712b1fc0947c -
Branch / Tag:
refs/tags/v0.5.1 - Owner: https://github.com/OpenActuarial
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@258a33bb0459600f4b319d3b2f4e712b1fc0947c -
Trigger Event:
push
-
Statement type:
File details
Details for the file experiencestudies-0.5.1-py3-none-any.whl.
File metadata
- Download URL: experiencestudies-0.5.1-py3-none-any.whl
- Upload date:
- Size: 34.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e5e844256846466763b5a7dca6cbc644001ef92ec8782b382402cb5e87647ccc
|
|
| MD5 |
0991b03ddfa645af6c2ee739c11ff844
|
|
| BLAKE2b-256 |
99b48bee0936868259156338187fcff4407576bc303a75b7096b66b2717c23cd
|
Provenance
The following attestation bundles were made for experiencestudies-0.5.1-py3-none-any.whl:
Publisher:
release.yml on OpenActuarial/experiencestudies
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
experiencestudies-0.5.1-py3-none-any.whl -
Subject digest:
e5e844256846466763b5a7dca6cbc644001ef92ec8782b382402cb5e87647ccc - Sigstore transparency entry: 2158192902
- Sigstore integration time:
-
Permalink:
OpenActuarial/experiencestudies@258a33bb0459600f4b319d3b2f4e712b1fc0947c -
Branch / Tag:
refs/tags/v0.5.1 - Owner: https://github.com/OpenActuarial
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@258a33bb0459600f4b319d3b2f4e712b1fc0947c -
Trigger Event:
push
-
Statement type: