Skip to main content

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:

https://www.casact.org/publications-research/research/research-resources/loss-reserving-data-pulled-naic-schedule-p

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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cas_schedule_p-2026.6.13.tar.gz (17.6 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cas_schedule_p-2026.6.13-py3-none-any.whl (17.6 MB view details)

Uploaded Python 3

File details

Details for the file cas_schedule_p-2026.6.13.tar.gz.

File metadata

  • Download URL: cas_schedule_p-2026.6.13.tar.gz
  • Upload date:
  • Size: 17.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for cas_schedule_p-2026.6.13.tar.gz
Algorithm Hash digest
SHA256 a021e8274fd8f7c9ded74e09a4226f9f6008cb19b96ce5fcabe5cd8b5ee07aac
MD5 b03f87cc16893fc55f4ac1410a5198f5
BLAKE2b-256 c701b4f87242ad1626c74dac557b592a19545b9351a540e02e7ed362c8577c86

See more details on using hashes here.

Provenance

The following attestation bundles were made for cas_schedule_p-2026.6.13.tar.gz:

Publisher: release-package.yml on EKtheSage/cas-schedule-p-data-model

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cas_schedule_p-2026.6.13-py3-none-any.whl.

File metadata

File hashes

Hashes for cas_schedule_p-2026.6.13-py3-none-any.whl
Algorithm Hash digest
SHA256 cbd41cc175ff28966063f8fd0751317469df9aebed9ef95d90adf89e287622fd
MD5 29789e65ed5fb4440cec2cb807740249
BLAKE2b-256 c9bc718a4c61dae2f7edd9cf4b093fddf0fbd38cb71aa21b2d76c0d662e238b4

See more details on using hashes here.

Provenance

The following attestation bundles were made for cas_schedule_p-2026.6.13-py3-none-any.whl:

Publisher: release-package.yml on EKtheSage/cas-schedule-p-data-model

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

2026.6.13 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page