Using the aggregate Package

Introduction

aggregate is a Python package providing fast, accurate, and expressive data structures that make working with aggregate (also called compound) probability distributions easy and intuitive. It allows students and practitioners to work with realistic real-world distributions that reflect the underlying frequency and severity generating processes. It has applications in insurance, risk management, actuarial science, and related areas.

I have produced a series of short videos that show how to use aggregate to solve actuarial and risk management problems. There are two types of videos:

  • Quick-start (QS) guides explain the basic functionality.
  • Vignettes (V) give step-by-step instructions for solving real-world problems.

Everyone should read the first quick-start, QS1. Users should then work through the vignettes related to their use cases, referring back to later QS videos as needed. Programmers may find the QS videos more engaging.

The videos are supplemented by background material available on-line and in textbooks:

  • Standard software documentation for users and programmers.
  • References on the background math, actuarial science, and risk management include:
    • KPW (STAM): Klugman, Stuart A., Harry H. Panjer, and Gordon E. Willmot. Loss models: from data to decisions. Vol. 715. John Wiley & Sons, 2012.
    • Tsi (CAS 8): Tse, Yiu-Kuen. Nonlife actuarial models: theory, methods and evaluation. Cambridge University Press, 2009.
    • Fisher (CAS 8): Fisher, Ginda Kaplan, et al. Individual Risk Rating. (2019).
    • Reinsurance Pricing (CAS 8): Clark, David, Basics of Reinsurance Pricing, Actuarial Study Note, 2014.
    • Distributions monograph (CAS 8): Bahnemann, David. Distributions for actuaries. CAS monograph series 2 (2015): 1-200.
    • Loss Data Analytics, WEB
    • PIR and associated PIR website
    • Bernegger, Stefan. The Swiss Re Exposure Curves and the MBBEFD Distribution Class. ASTIN Bulletin: The Journal of the IAA 27.1 (1997): 99-111.

Prerequisites

The course is designed for working actuaries and student actuaries. It assumes:

  • Knowledge of basic concepts of aggregate distributions, as covered in CAS MAS I or SOA STAM.
  • The ability to program in Python.

Some videos assume familiarity with individual risk rating and reinsurance pricing. These topics are covered in Fisher (2019) and Clark (2014).

Series Outline

Background Quick-Start Reference Vignettes
Introduction QS1: Quick-Start V1: Large account pricing
QS2: build and agg language V2: Reinsurance pricing
?Math QS3: Common design elements V3: A&H pricing
QS4: Aggregate class V4: Reserving
?IRR QS5: Portfolio class V5: Capital modeling
QS6: Distortion class V6: Strategy & allocation
?Re pricing QS7: Pricing V7: Agency management
QS8: PIR case studies V8: Actuarial students
?Capital modeling QS9: Databases V9: Academics

Part I: Background

  • Introduction describes aggregate distributions and gives several motivating applications.
    • insurance losses in the collective risk model
    • call minutes in call center
    • passengers past a point
    • population growth
    • losses from bond portfolio It explains how aggregates include frequency and severity distributions as special cases.

Part I: Quick-Start Reference

  • [QS1] Quick-Start
    • installation
    • first steps [HUMMMM]
    Just enough for you to make sense of a Vignette.
  • [QS2] Creating a simple aggregate distribution using the agg language (1, 2, or 3 outcomes; simple discrete severity) [cdf, pmf, sf, q, plot, describe, statistics]
  • [QS3] Common design elements: More properties of Aggregate objects [audit_df, density_df, log2, bs, recommend_bucket, snap, update, tvar, var_dict]

BREAK

  • [B1] Specifying a general aggregate loss distribution: exposure, severity, frequency; generalizes freq if sev fixed, sev if freq fixed; continuous examples lognorm with cv

  • [B2] Options for frequency (fixed severity): fixed, binomial, … mixed

  • [B3] Options for severity (fixed frequency): shape, loc, and scale, examples

  • [B4] Defining exposure: counts, loss, or premium & loss ratio

  • [V3] The Tweedie family of distributions

  • [B5] Defining exposure: limits profiles

  • [B6] Mixed severity distributions

  • [B7] Per occurrence reinsurance

  • [B8] Aggregate reinsurance

  • [R2] The general form of an aggregate program

  • [B4] Distortions, examples, plotting

  • [B5] Pricing: applying limited expected values and distortions

Part II: Vignettes

  1. [QS6] Creating a simple Portfolio using agg (2 line example); [cdf, pmf, sf, q, plot, describe, statistics]
  2. [B7] Advanced properties of portfolios [density_df, calibrate distortions…]
  3. [B9] Creating a Portfolio from …
  • [B1] About aggregate or compound loss distributions math and empirical examples; equal bucket size empirical distributions

Technical Appendix

  1. Quantiles (VaR, Value at Risk): definition and computation
  2. TVaR (Tail Value at Risk): definition and computation
  3. Cat model PMLs
  4. Numerical integration using cumsum
  5. Fast Fourier Transforms (FFTs)

Video(s)

References

posted 2022-10-15 | tags: aggregate, compound distribution, insurance modeling, Python

Share on