Abstract
Danish insurance and pension companies are required by financial
regulations to report certain financial quantities to prove that they
are solvent and managed responsibly. Parts of these quantities are
computed the same way for all companies, whereas so-called management actions, describing, e.g., surplus sharing, vary between
companies. Hence it is desirable to have a flexible calculation platform that allows actuaries to easily create company-specific models,
which are also computationally efficient. In this paper, we present
our work with implementing a code generator for a DSL called
the Management Action Language (MAL) as a form of variability
management. While one of the goals of MAL is to generate efficient
code from an actuary’s specification, it is non-trivial how to produce such code. We identify four reoccurring patterns in the models
created by actuaries as subjects to optimisations. We describe our
process for implementing a code-generator by a) identifying four
specification patterns (inheritance, union types, type filtering, and
numerical maps) that are pervasive in these calculations, and b) describing how to generate efficient C# from MAL for these patterns.
We evaluate the code-generator by benchmarking it against handwritten production code and show an approximate 1.3× speedup
in a production environment. This evaluation demonstrates that,
with MAL, an individual pension company may reuse the general
calculation platform and all of the optimisations built into MAL’s
code generator when modelling the company’s business rules.
regulations to report certain financial quantities to prove that they
are solvent and managed responsibly. Parts of these quantities are
computed the same way for all companies, whereas so-called management actions, describing, e.g., surplus sharing, vary between
companies. Hence it is desirable to have a flexible calculation platform that allows actuaries to easily create company-specific models,
which are also computationally efficient. In this paper, we present
our work with implementing a code generator for a DSL called
the Management Action Language (MAL) as a form of variability
management. While one of the goals of MAL is to generate efficient
code from an actuary’s specification, it is non-trivial how to produce such code. We identify four reoccurring patterns in the models
created by actuaries as subjects to optimisations. We describe our
process for implementing a code-generator by a) identifying four
specification patterns (inheritance, union types, type filtering, and
numerical maps) that are pervasive in these calculations, and b) describing how to generate efficient C# from MAL for these patterns.
We evaluate the code-generator by benchmarking it against handwritten production code and show an approximate 1.3× speedup
in a production environment. This evaluation demonstrates that,
with MAL, an individual pension company may reuse the general
calculation platform and all of the optimisations built into MAL’s
code generator when modelling the company’s business rules.
Original language | English |
---|---|
Title of host publication | ACM/IEEE 25th International Conference on Model Driven Engineering Languages and Systems: Companion Proceedings |
Publication date | 2022 |
DOIs | |
Publication status | Published - 2022 |
Event | Modeling Language Engineering - Duration: 24 Oct 2022 → … https://mleworkshop.github.io/ |
Workshop
Workshop | Modeling Language Engineering |
---|---|
Period | 24/10/2022 → … |
Internet address |
Keywords
- financial regulations
- solvency reporting
- management actions
- code generation
- Domain-Specific Language (DSL)
- actuarial modeling
- computational efficiency
- specification patterns
- C# optimization
- benchmarking