Ported from the open-source IFRS 17 Calculation Engine —
ifrs17/OverviewCalculationEngine.ipynb —
originally written for Systemorph Cloud.
Overview — how the IFRS 17 engine works
The IFRS 17 Calculation Engine is a toolkit for the data imports, transformations, calculations and reports of an IFRS 17 solution. The basic inputs are modelled future cash flows, actual amounts for groups of insurance contracts, and parameters such as yield curves and FX rates. Pre-computed figures can be supplied instead. The output is a set of results — contractual service margin, loss component, financial performance and more — for IFRS 17 reporting, analysis, accounting and steering.
This page is the map. The detail, with formulas, is on the pages it links.
IFRS 17 in brief
IFRS 17 is the accounting standard for insurance contracts, effective from 1 January 2023. It replaced IFRS 4, which is based on nominal accounting, with an economic measurement.
- IFRS 17 deals with insurance contracts, which sit on the liability side of the balance sheet. Other standards cover the rest of the business — chiefly IFRS 9 for invested assets.
- Policies are allocated to homogeneous groups of insurance contracts (GICs; GRICs for reinsurance held) by principles the standard sets: contract type, line of business, annual cohort and so on. Insurers have some freedom in forming the groups as long as they respect those principles. Here a group is a GroupOfContract node.
- Contracts generate different kinds of cash flows. The amount type dimension (AmountType) names them: premiums, claims, expenses of different kinds. The engine expects the projected cash flows of every group for each accounting period, and the actual amounts observed in that period.
- Each cash flow carries its attributes — reporting node (typically a legal entity), amount type, novelty of business and so on — and its projected amounts on a monthly grid until the final run-off of the contracts.
- Nominal cash flows (the usual case) are discounted with the appropriate yield curve to a present value.
- The central element is the analysis of change (AoC): the present value moves from the beginning to the end of the period through a series of effects, each modelled as an AoC step.
- The value of future profitable business carries a contractual service margin (CSM), defined per group. It is recognised in profit slowly, as the service is delivered. An onerous group carries a loss component (LC) instead, recognised immediately.
The original engine produces reports on several aspects of this:
- present value of future cash flows,
- contractual service margin and loss component,
- actuals, deferrals and accruals,
- liability for remaining coverage (LRC) and liability for incurred claims (LIC),
- financial performance,
- accounting events.
In the MeshWeaver port the report that exists is the analysis-of-change movement report of best-estimate present values, translated and consolidated. The other report families are described on Reports and financial performance and are not built here yet.
Data model and data input
The calculations rest on a well-defined data model: reporting nodes, the dimensions, the groups of contracts and the parameters. Input data follow it, and every calculation up to the report respects its conventions.
Many abbreviations used in the documentation and the code are system names: short, immutable
identifiers such as BOP, CSM or NIC. The display name is the full name shown to users; it
can change, so nothing refers to it. In the MeshWeaver port the system name is the node's id
(Ifrs17/AocType/BOP) and the display name is the node's name ("Opening Balance").
Calculations happen in two places:
- At import. The complex calculations need fine granularity (per AoC step, novelty, amount type and month) and are pre-computed when the cash flows arrive: present values, the technical margin, CSM and loss component. These are the original's import scopes, and their results are stored as IFRS variables.
- At report time. Simpler calculations that need no fine granularity — currency translation, for example — happen when a report is requested. These are the original's report scopes.
So the original's workflow is: import the parameters and the cash flows, pre-compute and store the measurement, then report on it.
The port has no import step and persists nothing. The measurement scopes under
Ifrs17/Engine/Source/evaluate on demand from the RawVariable nodes, andIfrs17Reporting.Measurereturns in-memory report rows; no scope writes an IfrsVariable. Stored IFRS variables are only read — for an opening balance, or when a run is not a cash-flow run. The report scopes are underIfrs17/Report/Source/. How inputs reach the engine here is on Input data.
The model calculations
The centrepiece is the analysis of change of the business over one period. Its parts, each with its own page:
- The AoC structure — which steps exist for the period, in which order, and which step each one is measured against.
- Discounting of projected cash flows with the current or the locked-in yield curve.
- Nominal cash flows per AoC step.
- Present values for every AoC step: cumulated discounted cash flows, the telescoping difference between a step and its parent (the total change over the period is the telescoping sum of these differences), the value read at the point the step's configuration names, and interest accretion.
- Risk adjustment, valued through the same chain from its own input.
- Amortization — the AoC step for the release of the remaining exposure, driven by coverage units. Not ported.
- Actuals — written, advance, overdue and deferrable actuals. Not ported.
- CSM, loss component and loss-recovery component — the technical margin, the switch between CSM and LC, and the loss-recovery boundary for reinsurance held. The margin and the switch are ported; the loss-recovery component is not.
Reports
The original produces its reports with DataCube, a Systemorph concept for retrieving slices of a large multi-dimensional dataset at the granularity and aggregation a report asks for. Some reports only present what the import computed; the financial performance needs further calculation and splits the result into insurance revenue, insurance service expense, insurance finance income/expense and other comprehensive income. See Reports and financial performance.
The port has its own cube abstraction (Ifrs17/Source/DataCube.cs) and uses it in the report
scopes; the financial performance is not built.
What the engine does — and what the port does
The original lists these features. The right-hand column is the state of the MeshWeaver port.
| Feature of the open-source engine | In the MeshWeaver port |
|---|---|
| Import of nominal cash flows, actuals, openings and pre-calculated values | Cash flows as RawVariable nodes; openings and pre-calculated values read back as IfrsVariable. No actuals calculation. No file import. |
| Discounting on current or locked-in assumptions | Yes — EconomicBasis C, L and N |
| BBA for gross and reinsurance | Yes, plus the basis rules for VFA and PAA |
| LRC and LIC | The LiabilityType dimension and its basis rule; no LRC/LIC reports |
| Effective actuals (payables and receivables as advance or overdue actuals) | No |
| Credit default risk for reinsurance held | Yes — see Present values |
| Financial performance and OCI | No |
| Scenario and sensitivity analysis | The Scenario dimension exists; the fallback to best-estimate inputs is not ported |
| Run-off projections | ProjectionConfiguration (Shift, TimeStep) is ported |
For the latest developments of the open-source engine itself — releases, requests, issues — see its GitHub project.