You are here

Actuarial Calculations in Excel and Python – A Flexible, Practice-Oriented Solution

Quick, intuitive, and powerful implementation of actuarial calculations? In practice, complex requirements and technical effort often make this difficult. A streamlined solution can offer relief: direct use of actuarial functions in Excel and Python, modular expandability, and high-performance computation even for large datasets. This article outlines the key characteristics a modern solution should have and how these requirements can be implemented in a practical, user-friendly way.
Written on 05/15/25

This article has been contributed by Dirk Nötzel, Head of Insurance Technology/Migration and Principal at Cominia Aktuarielle Services 

Typical Challenges in Actuarial Projects

In actuarial projects, a wide range of requirements must be met when calculating insurance values. Tasks range from calculating tariff parameters such as premiums or reserves to validating actuarial tests and performing specific analyses such as determining life expectancy based on selected mortality tables. It is also essential to transparently model the effects of changing product parameters – such as interest rates, table selection, or gender mix assumptions. Moreover, generating large volumes of training data for data-driven models is becoming increasingly important.

Traditionally, insurers and actuaries use large reference computing frameworks based on technologies like Java or APL. These systems are powerful and integrated into comprehensive testing environments. However, they are often oversized for many actuarial tasks and come with high installation, operation, and maintenance effort – leading to a mismatch between benefit and complexity.

In day-to-day testing or quick prototyping, more flexible and streamlined tools are needed – ones that don't require a steep technical learning curve.

What Should a Good Solution Offer?

Our experience in actuarial practice and software development has shown us what users need: a practical solution should provide actuarial functions directly, without complex setup or external dependencies.
Function names and parameters should be intuitive and consistent, enabling immediate use. All relevant actuarial elements – such as survival probabilities, decrements, commutation values, and present values – should be flexibly parameterized. Runtime customization without code changes is a key success factor, along with balancing flexibility and ease of use.

Integration with standard work environments is also essential. Excel, widely used by actuaries, should support extended functionality in a familiar interface. The same applies to Python, which is gaining importance, especially in data science.

Clear and transparent documentation is another critical factor. It fosters trust in the solution’s accuracy and helps users apply it effectively in their work.

A Practical Approach: PyXAL – Simple, Flexible, Efficient

Based on these requirements, Cominia developed the "PyXAL" (Python Excel Actuarial Library) solution. Its goal is to create a practical, high-performance alternative to complex systems that integrates seamlessly into modern workflows.

Its core is a powerful C-based calculation engine that includes all essential actuarial computations in a modular structure.

  • Mortality probabilities are derived from base tables and can be adjusted using parameters like gender mix or loadings. 
  • Based on these, decrement tables and commutation functions are calculated. 
  • Finally, present values for various product types (e.g., disability, long-term care, life insurance or annuities) are computed.

Optimized caching mechanisms allow efficient processing of large data volumes. The architecture also supports easy extensions with new tables or functions.

Another key feature is flexible runtime control: changes to rounding rules, table modifications, or calculation logic can be made directly via parameters and properties – without modifying the code. New tables can also be added dynamically without increasing application complexity.

Seamless Integration into Excel and Python

A core benefit of PyXAL is that it enables calculations in both Excel and Python.

In Excel, PyXAL is available as a COM add-in and integrates seamlessly into the familiar interface. Actuaries benefit from features like IntelliSense support, a function assistant, and linked documentation – all directly accessible from within Excel. Updates and enhancements are simple to apply: updating a DLL is sufficient to activate new features or tables, with no action required by the user.

 

 

 

At the same time, PyXAL is offered as a Python module via a specifically developed wrapper. This gives actuaries access to a powerful, flexible Python library that includes the full functionality of the core engine. This is particularly valuable in data-driven use cases, such as generating machine-learning datasets or conducting complex analyses.

 

 

Trust Through Professional Documentation

Comprehensive documentation is essential for the acceptance of any actuarial tool. Users need to understand how functions work and how parameters affect outcomes. PyXAL offers established formats like HTML help and PDFs, enriched with practical examples from real-life projects.

 

 

 

 

 

 

 

Outlook: Expansion to Health and Pension Insurance

PyXAL currently focuses on life insurance mathematics. However, its modular design allows straightforward expansion into other domains:

  • Health insurance, with specialized calculation bases and present value profiles
  • Pension insurance, including commonly used tables such as the Heubeck guidelines

Conclusion – Principles of a Modern Actuarial Solution

Modern actuarial tools must be technically sound, flexible, and easy to maintain. Seamless integration into Excel and Python, transparent configuration, and solid documentation are critical for successful adoption in practice.

Solutions like PyXAL demonstrate that lean tools can be a true alternative to complex systems.

Leverage our experience – and discover why less complexity and more practical focus often lead to better results.

Factsheet

Technology

  • Calculation Engine: C, C++
  • COM Add-in: C#
  • Python Support

Statistics

  • 130 implemented tables (mortality, disability, long-term care)
  • 60 available actuarial functions (exit probabilities, decrements, commutation functions, present values)

Contacts

Dirk Nötzel
Head of Insurance Technology/Migration, Principal

With extensive experience in product development, actuarial modeling, and migration, Dirk Nötzel supports insurers in developing efficient, future-proof, and mathematically-precise product landscapes.

Email: dirk.noetzel@cominia.de
LinkedIn

Dr Björn Medeke
Managing Director

Email: bjoern.medeke@cominia.de
LinkedIn