Skip to main content

Forward projection (budgeting) for a book of business: premium roll-forward and credibility-blended, trended, seasonalized claims. Part of the OpenActuarial ecosystem.

Project description

projectionmodels

CI PyPI

Forward projection (budgeting) for a book of business — part of the OpenActuarial ecosystem.

ratingmodels builds a price from experience. projectionmodels does the opposite direction: it takes the book as it is — stored premiums, historical claims, and membership assumptions — and rolls it forward for planning and budgeting. It sits beside ratingmodels and lossmodels on top of the actuarialpy primitives layer, and depends only downward on actuarialpy — never sideways on another workflow package.

Install

pip install projectionmodels

Layers

object role
PMPMProjection credibility-blended, trended, plan-adjusted claims PMPM with a pooling load
PremiumRollforward stored premium rolled forward by rate action and plan change
GroupProjection one group: premium + claims + renewal weighting — the unit you loop over the book
BookProjection aggregate in-force renewals + new business into the book budget

Each class computes on construction and exposes a frozen *Result dataclass via .result; a lowercase functional form (project_group, project_book, …) returns the result directly.

What it computes

Premium is a stored value rolled forward (not rebuilt from experience), level per member-month:

prem_pmpm* = (current_premium / current_member_months) · (1 + rate_action) · (1 + plan_change)

Claims are the actuarial piece — a credibility blend of the group's own PMPM and the book PMPM, trended, plan-adjusted, and seasonalised onto the given membership:

Z         = limited-fluctuation credibility from the group's claim count
blended   = Z · group_pmpm + (1 − Z) · book_pmpm
projected = blended · trend · plan_factor + pooling_pmpm · trend
claims_m  = projected · membership_m · seasonal_m

Renewal probability is supplied per group (e.g. from underwriting) via renewal_prob — it is an input, not something this package models. It weights premium and claims equally (a lapsed group books neither), so the projected loss ratio is unaffected. New business is the same GroupProjection with group_pmpm = book_pmpm, credibility = 0, and renewal_prob = close_ratio.

Quick start

import numpy as np, pandas as pd
from projectionmodels import GroupProjection, BookProjection

g = GroupProjection(
    prospective_membership=np.full(12, 1900.0), seasonal_factors=season_factors,
    current_premium=4_500_000, current_member_months=21_600,
    rate_action=0.06, plan_change=-0.02,
    book_pmpm=180.0, claim_trend=0.06,
    exp_midpoint=pd.Timestamp("2025-07-01"), prosp_midpoint=pd.Timestamp("2027-07-01"),
    group_claims=3_800_000, group_member_months=21_600, group_claim_count=6_000,
    pooling_pmpm=8.0, renewal_prob=0.90)   # renewal likelihood from underwriting

book = BookProjection([g, ...], labels=["GroupA", ...])
book.loss_ratio          # expected book loss ratio
book.by_group            # per-group expected premium / claims / LR
book.monthly             # book premium & claims by month

Built on actuarialpy

This package adds no primitives of its own — it composes existing actuarialpy primitives and depends only downward:

  • credibility_weighted_estimate — the credibility blend, Z·group + (1−Z)·book
  • midpoint_trend_factor — trend to the prospective midpoint
  • seasonality_factors / apply_seasonality — monthly seasonality
  • pure_premium — PMPM

pool_losses / excess_over_threshold in actuarialpy cap large claims when you derive the pooling PMPM upstream.

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.1.0.tar.gz (10.8 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.1.0-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: projectionmodels-0.1.0.tar.gz
  • Upload date:
  • Size: 10.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for projectionmodels-0.1.0.tar.gz
Algorithm Hash digest
SHA256 abbe168f8ac15fe3ac424a17d35c4e578960d5f48d70066195611101c485415e
MD5 bb8785e40c492aecd2a03d869057ce57
BLAKE2b-256 4073c88c343eee6a39d8105e2900fd7892e92e9521c7a3d96e4184dcd8cda5fb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for projectionmodels-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ff5c380003a29f0149946976d7f0cc1231a17e91f4995c716a4439c7eb8129d9
MD5 54b480dbdc00ee2d410fba8aebf66886
BLAKE2b-256 73d79a6165d706c954f588b787c60bc8f1774f94ea76955cb48b23c8ffaf29b0

See more details on using hashes here.

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