cas-schedule-p
The CAS / NAIC Schedule P loss reserving data, cleaned into a governed gold mart and
shipped inside the wheel. One version of this package carries exactly one immutable data
publish: sixteen parquet tables plus the manifest.json that pins every one of them by
sha256.
pip install cas-schedule-p
No GitHub access. No gh CLI. No download on first use. No API key. The data is already
on your disk once pip finishes.
import cas_schedule_p as csp
csp.PUBLISH_ID # '20260613_041006'
csp.tables() # the 16 table names
csp.path("mart_reserving_model_training") # a pathlib.Path to the parquet
csp.read("mart_reserving_model_training") # a pyarrow.Table (needs pyarrow)
path() is the important one: hand it to duckdb, polars, pandas, pyarrow, R, or anything
else that reads a parquet file. The package itself has zero runtime dependencies.
import duckdb
duckdb.sql(f"""
select accident_year, development_age, sum(cum_paid_loss) as paid
from read_parquet('{csp.path("mart_reserving_model_training").as_posix()}')
where line_of_business = 'workers_compensation'
group by 1, 2 order by 1, 2
""")
What is in it
Schedule P is the loss reserving exhibit of the US statutory annual statement. The CAS publishes a research extract of it - ten accident years by ten development ages of paid and incurred losses, case reserves, bulk+IBNR and earned premium, per company per line of business. This package carries a warehouse build of that extract: a Data Vault refined into a star schema and six marts.
| Table | What it is |
|---|---|
mart_reserving_model_training |
The mart of record. One row per company x line x accident year x development age x statement year, with cum_paid_loss, incurred_loss, bulk_loss, case_reserve, earned_prem_net, earned_prem_direct and derived ratios. |
mart_paid_loss_triangle, mart_incurred_loss_triangle |
Wide triangles, for eyeballing. |
mart_development_factors |
Age-to-age factor bases. |
mart_loss_ratio, mart_company_benchmark |
Ratio and peer views. |
fact_loss_observation, fact_premium_observation |
Star schema facts. |
dim_company, dim_line_of_business, dim_accident_year, dim_development_age, dim_statement_year, dim_loss_component, dim_premium_type, dim_source_file |
Conformed dimensions. |
Monetary values are USD thousands, as filed. Lines of business are
commercial_auto, private_passenger_auto, workers_compensation, other_liability,
products_liability and medical_malpractice.
Versions are data vintages
The version number is the publish date, and nothing else:
| package version | gold publish |
|---|---|
2026.6.13 |
20260613_041006 |
cas_schedule_p.__version__ and cas_schedule_p.PUBLISH_ID always agree - a test in the
package asserts it. A new gold promote gets a new publish id and a new package version;
the data inside an already-released version never changes. So cas-schedule-p==2026.6.13
is a complete, reproducible citation of a dataset, and pip install cas-schedule-p with
no pin is the newest vintage.
The Meyers screens
Glenn Meyers' CAS monograph Stochastic Loss Reserving Using Bayesian MCMC Models validates reserving models on a mechanically selected panel of stable insurers - up to 50 per line, chosen by the criteria in his appendix Table A.1. That selection ships here, so a study on this data can use the same panel without re-deriving it:
pip install "cas-schedule-p[screens]" # adds duckdb + pandas
from cas_schedule_p.screens import MEYERS_LINES, select_companies
select_companies(line="workers_compensation", per_line=50)
# company_code cv1 cv2
# 0 ... ... ...
The screens keep companies whose book was stable over accident years 1988-1997: a low
coefficient of variation of net earned premium (CV1), a low CV of the net/direct premium
ratio (CV2), a complete 10x10 triangle, premium and loss floors, and Meyers' one excluded
group. Rows come back ordered by CV1, so per_line takes his "top 50" deterministically.
Pass a large per_line to see everyone who passed.
select_companies reads the bundled mart when mart_path is None, and the path you
give it otherwise - the signature matches the version in the
ibnr reserving package's validation script, which is
where it came from.
Other publishes
Every gold promote is a GitHub release tagged with its publish id, and the repository is public, so pulling a different vintage needs no credentials:
from cas_schedule_p import releases
releases.list_publishes() # [{'publish_id': '20260613_041006', ...}]
releases.fetch("20260613_041006") # -> ~/.cache/cas-schedule-p/20260613_041006
fetch downloads the manifest first, refuses one whose publish id disagrees with the tag,
then verifies every asset's sha256 and byte count and writes each through a temp file, so
an interrupted download can never be mistaken for a complete one. Set
CAS_SCHEDULE_P_CACHE to move the cache. This module is stdlib-only.
Data provenance
The source is the National Association of Insurance Commissioners' Schedule P, as published for research by the Casualty Actuarial Society:
The CAS extract was assembled by Glenn Meyers and Peng Shi, and is public research data. Please credit them and the CAS in any work built on it.
The pipeline that turns those CSVs into this mart - bronze, a canonical transition layer, a Data Vault, a Business Vault, a star schema and the marts, with data quality gates on each promote - lives at https://github.com/EKtheSage/cas-schedule-p-data-model. This package is only its consumer-facing distribution.
License
Code: MPL-2.0. The underlying Schedule P data is public research data from the CAS/NAIC and is not covered by that license.
Metadata
Release files for cas-schedule-p 2026.6.13
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| cas_schedule_p-2026.6.13.tar.gz | 17.6 MB | With provenance | Details for cas_schedule_p-2026.6.13.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cas_schedule_p-2026.6.13-py3-none-any.whl | Python 3 | none | any | Details for cas_schedule_p-2026.6.13-py3-none-any.whl |
Total release size: 35.2 MB
Release files / cas_schedule_p-2026.6.13.tar.gz
| Download URL | cas_schedule_p-2026.6.13.tar.gz |
|---|---|
| Size | 17.6 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a021e8274fd8f7c9ded74e09a4226f9f6008cb19b96ce5fcabe5cd8b5ee07aac
|
|
BLAKE2b-256 checksum How to use checksums |
c701b4f87242ad1626c74dac557b592a19545b9351a540e02e7ed362c8577c86
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 4, 2026.
Transparency logRelease files / cas_schedule_p-2026.6.13-py3-none-any.whl
| Download URL | cas_schedule_p-2026.6.13-py3-none-any.whl |
|---|---|
| Size | 17.6 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cbd41cc175ff28966063f8fd0751317469df9aebed9ef95d90adf89e287622fd
|
|
BLAKE2b-256 checksum How to use checksums |
c9bc718a4c61dae2f7edd9cf4b093fddf0fbd38cb71aa21b2d76c0d662e238b4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 4, 2026.
Transparency logSecurity for cas-schedule-p 2026.6.13
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for cas_schedule_p-2026.6.13.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 4, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.