Skip to main content

Focused actuarial claim, premium, membership, and expense projections.

Project description

projectionmodels

The renewal cycle end to end: premium, claims, and expenses projected over a horizon.

CI PyPI Python

Overview

projectionmodels projects premium, claims, and expenses over a monthly horizon on exposure you supply — by group, by claim type, and at cost levels that make the pipeline order (completion, then trend, then adjustments) explicit rather than implicit.

Assumptions are first-class objects: estimate them from history with actuarialpy through the built-in adapter, or state them directly and keep the projection fully reproducible either way.

Installation

pip install projectionmodels

Requires Python 3.10 or newer.

Quick start

import pandas as pd
import projectionmodels as pm

premium_data = pd.DataFrame({
    "group_id": ["A", "B"],
    "renewal_date": pd.to_datetime(["2027-03-01", "2027-07-01"]),
    "current_premium_rate": [100.0, 100.0],
    "rate_action": [0.10, 0.20],
})

periods = pd.period_range("2027-01", periods=12, freq="M").astype(str)
exposure = pd.DataFrame(
    {"group_id": g, "projection_period": p, "member_months": 1_000.0}
    for g in ("A", "B") for p in periods
)

results = pm.PremiumProjection(
    premium_data=premium_data,
    projection_keys=["group_id"],
    exposure=exposure,
    exposure_col="member_months",
    horizon=pm.ProjectionHorizon("2027-01-01", periods=12),
    recurring_rate_action_col="rate_action",
).project()

print(results.to_frame().head())

What's inside

  • Premium — renewal-date-aware rate projection with recurring rate actions.
  • Claims — projection by claim type with explicit cost levels and pipeline order (complete, trend, adjust).
  • Expenses — fixed and variable expense projection alongside the claim stream.
  • Assumptions — assumption objects estimated from history via the actuarialpy adapter or supplied directly.
  • Book and group — the same machinery at single-group and whole-book level, with results tables by period, group, and component.
  • Advanced — extension points for custom models and integrations.

The full API reference and end-to-end worked examples live at openactuarial.org/projectionmodels.html.

The OpenActuarial ecosystem

projectionmodels 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/projectionmodels
cd projectionmodels
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

projectionmodels-0.6.4.tar.gz (70.1 kB view details)

Uploaded Source

Built Distribution

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

projectionmodels-0.6.4-py3-none-any.whl (45.4 kB view details)

Uploaded Python 3

File details

Details for the file projectionmodels-0.6.4.tar.gz.

File metadata

  • Download URL: projectionmodels-0.6.4.tar.gz
  • Upload date:
  • Size: 70.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for projectionmodels-0.6.4.tar.gz
Algorithm Hash digest
SHA256 06be57b5b6e15e671ef02443e32e8c978e6193d49c11a72c94f69933aefc5e7e
MD5 c52a92b9bf56acfdab57c17a3e28c044
BLAKE2b-256 f4e6ef80e57059ef186dd7224d804f04da1ac5ed8a41cbf2fcf3c2599d703477

See more details on using hashes here.

Provenance

The following attestation bundles were made for projectionmodels-0.6.4.tar.gz:

Publisher: release.yml on OpenActuarial/projectionmodels

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

File details

Details for the file projectionmodels-0.6.4-py3-none-any.whl.

File metadata

File hashes

Hashes for projectionmodels-0.6.4-py3-none-any.whl
Algorithm Hash digest
SHA256 09d6422edbf1fe3bad4ebf26b698e57dd3bed3847678627a79f9dc50f20e4b24
MD5 4d0a0b32de1e6be21f39dca48c0777b9
BLAKE2b-256 13b94c052e6b88e50b5ee9919f7d99cba542af0a7eed1676fb0378075064f546

See more details on using hashes here.

Provenance

The following attestation bundles were made for projectionmodels-0.6.4-py3-none-any.whl:

Publisher: release.yml on OpenActuarial/projectionmodels

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

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page