Skip to main content
PAL Logo

Proteus Actuarial Library

CI Status Coverage Status Documentation Status PyPI version Python versions CodeFactor Ruff


An open-source stochastic actuarial modelling library in Python.

Status: PAL is in beta. The library is available on PyPI and its public API continues to be tested and refined.

Introduction

The Proteus Actuarial Library (PAL) is a Python framework for building and running stochastic actuarial and financial models, including insurance capital models. It combines statistical modelling, simulation and reinsurance calculations in a consistent, inspectable API.

Key features:

  • Probability distributions and maximum-likelihood fitting, including censored and truncated losses, with optional parameter uncertainty and model averaging
  • Frequency-severity models, reinsurance contracts and multidimensional portfolios
  • Copulas, automatic stochastic dependency tracking, and correlation matrix repair, completion and clustering
  • Randomised quasi-Monte Carlo sampling across distributions and copulas to reduce simulation error
  • NumPy/SciPy computation and optional CuPy GPU acceleration
  • CSV, Parquet and pandas interchange, PAL object snapshots, and cloud file storage
  • Documentation, executable recipes and agent tooling for AI-assisted modelling

Quick Start

from pal.copulas import GumbelCopula
from pal.distributions import Gamma, LogNormal

# Create stochastic variables
losses = Gamma(alpha=2.5, theta=2).generate()
expenses = LogNormal(mu=1, sigma=0.5).generate()

# Apply statistical dependencies
GumbelCopula(theta=1.2).apply([losses, expenses])

# Variables are now correlated
total = losses + expenses

Installation

# Basic installation
pip install proteusllp-actuarial-library

# With GPU support
pip install proteusllp-actuarial-library[gpu]

Documentation

Read the full documentation on Read the Docs

AI and coding assistants

PAL provides dedicated entry points for AI tools as well as human-readable documentation:

  • PAL quick reference for coding assistants maps common modelling intentions to the public Python API.
  • Executable actuarial recipes are available through the generated llms-full.txt documentation and the installed pal.api.recipes() / pal.api.recipe(id) helpers.
  • PAL modelling agent skill can be installed in compatible assistants working on actuarial projects; evaluation prompts measure assistant success using PAL.
  • AGENTS.md contains canonical repository instructions for coding agents, with more-specific guidance under src/pal/, tests/ and docs/.
  • The documentation build publishes llms.txt and llms-full.txt at the documentation root for model-friendly retrieval.

To install the PAL modelling skill in a project that supports directory-based agent skills, clone the repository and run python scripts/install_pal_skill.py --target .agents/skills. Use --force to replace an earlier installation. Skill locations differ between coding assistants.

AI-generated PAL code should prefer documented public APIs and inspect signatures/docstrings rather than guessing parameterisations or relying on internal helpers.

Project Status

PAL is available now and remains in beta while the API and numerical test coverage continue to develop. Distribution fitting, randomised quasi-Monte Carlo, GPU simulation, correlation matrix repair, and CSV/Parquet interchange are implemented today.

For outstanding work and feature requests, see the issue tracker. A maintained release checklist records the validation required before publication.

Issues

Please log issues on our github page.

Contributing

You are welcome to contribute pull requests. Please see the Contributor License Agreement

📚 Development Guide - Get started with development setup and testing

Metadata

Release files for proteusllp-actuarial-library 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for proteusllp-actuarial-library 0.4.0
File Size Uploaded Provenance Actions
proteusllp_actuarial_library-0.4.0.tar.gz 6.0 MB With provenance Details for proteusllp_actuarial_library-0.4.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for proteusllp-actuarial-library 0.4.0
File Interpreter ABI Platform Actions
proteusllp_actuarial_library-0.4.0-py3-none-any.whl Python 3 none any Details for proteusllp_actuarial_library-0.4.0-py3-none-any.whl

Total release size: 7.0 MB

Release files / proteusllp_actuarial_library-0.4.0.tar.gz

Download URL proteusllp_actuarial_library-0.4.0.tar.gz
Size 6.0 MB
Tags Source
SHA-256 checksum
How to use checksums
b78261717b592364c0c77bce7115b31a96703b97f3b4ed4a90e38952d97c936e
BLAKE2b-256 checksum
How to use checksums
f871c6de82682c2c67884c1b7346250324379637e58a642a7ad88104d9b010d8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 22, 2026.

Transparency log

Release files / proteusllp_actuarial_library-0.4.0-py3-none-any.whl

Download URL proteusllp_actuarial_library-0.4.0-py3-none-any.whl
Size 980.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
54b5368194183a578d0579d1bb77699ca10c787d66040b874226a1ac93ee398d
BLAKE2b-256 checksum
How to use checksums
ffe5186ced165d1cd48f4375048b23e1ca286058061c03e72ce2648f4b30622e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 22, 2026.

Transparency log

Security for proteusllp-actuarial-library 0.4.0

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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for proteusllp_actuarial_library-0.4.0.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 Nov 22, 2026.

Transparency log

A 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.

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