Hostname: page-component-77f85d65b8-7lfxl Total loading time: 0 Render date: 2026-04-18T14:41:37.448Z Has data issue: false hasContentIssue false

Aggregate: fast, accurate, and flexible approximation of compound probability distributions

Published online by Cambridge University Press:  15 November 2024

Stephen Mildenhall*
Affiliation:
Independent Scholar, London, UK
Rights & Permissions [Opens in a new window]

Abstract

Aggregate implements an efficient fast Fourier transform (FFT)-based algorithm to approximate compound probability distributions. Leveraging FFT-based methods offers advantages over recursion and simulation-based approaches, providing speed and accuracy to otherwise time-consuming calculations. Combining user-friendly features and an expressive domain-specific language called DecL, Aggregate enables practitioners and nonprogrammers to work with complex distributions effortlessly. The software verifies the accuracy of its FFT-based numerical approximations by comparing their first three moments to those calculated analytically from the specified frequency and severity. This moment-based validation, combined with carefully chosen default parameters, allows users without in-depth knowledge of the underlying algorithm to be confident in the results. Aggregate supports a wide range of frequency and severity distributions, policy limits and deductibles, and reinsurance structures and has applications in pricing, reserving, risk management, teaching, and research. It is written in Python.

Information

Type
Actuarial Software
Creative Commons
Creative Common License - CCCreative Common License - BY
This is an Open Access article, distributed under the terms of the Creative Commons Attribution licence (https://creativecommons.org/licenses/by/4.0/), which permits unrestricted re-use, distribution and reproduction, provided the original article is properly cited.
Copyright
© The Author(s), 2024. Published by Cambridge University Press on behalf of Institute and Faculty of Actuaries
Figure 0

Figure 1 An apparent failure of the FFT-based method caused by aliasing (left). The middle plot shows the parts of the underlying distribution that are added by aliasing. The right plot shows these translated back to the range 0–32. This figure can be recreated by running import aggregate.extensions and aggregate.extensions.fft_wrapping_illustration(ez = 1, en = 128, small2 = 5, cmap=’Greys_r’).

Figure 1

Figure 2 Exploiting aliasing to compute a Poisson distribution with a very high mean using substantially fewer buckets than is normally recommended. The actual distribution (right) can be re-assembled from the aliased output (left) by shifting. This figure can be recreated by running aggregate.extensions.poisson_example(10**8, 17).