Ported from the open-source IFRS 17 Calculation Engine —
ifrs17/Import/1ImportScope-Identities.ipynb —
originally written for Systemorph Cloud.
The analysis-of-change structure
The calculations that run when data arrive — the original calls this data loading — are written as scopes. A scope is a C# interface keyed by an identity; its members are the business logic, and it can ask for other scopes. Scopes make the logic structured and easy to read through.
The original splits its import scopes into six notebooks: identities (this page), present values, actuals, the technical margin, and two that create and compute the stored IFRS variables. This page covers the identities and the structure of the AoC steps.
In the port these scopes are in
Ifrs17/Engine/Source/AocStructure.csandIfrs17/Engine/Source/Identities.cs. The step rules, with the reference steps the port hard-codes, are summarised under Step structure on The IFRS 17 formulas.
Identities
An identity is the set of identifiers for one slice of data: an AoC type, a novelty, a data node (a group of contracts), an accident year, and whether the data are reinsurance.
In the port the identity is the record ImportIdentity. It carries the group, the AoC type and the
novelty, and — copied from the group so that rules need not look them up — whether it is
reinsurance, its valuation approach and its liability type, plus the projection period. The
accident year is not on the import identity; it is on the valuation identity
(ValuationIdentity in PresentValue.cs) together with the amount type and estimate type.
Generating the identities
Given a data node, GetIdentities returns every identity to compute for it.
In the port:
- For a cash-flow import (
GetCashflowIdentities) the identities are the steps the inputs actually supplied, plus the calculated steps for every novelty that has data (and always for the combined novelty, where the chains merge), plus the opening steps. The reinsurance-only steps (CRU,RCU) are added only for reinsurance groups. - For any other import it is every configured step.
The original also has a scope ValidAmountType, returning the amount types present in the
imported data of a data node. The port has no scope of that name; the scopes that need it read the
amount types straight from the group's raw variables.
The AoC step structure
The step structure is derived from the input. It is assumed to depend only on the group of contracts, not on the amount type or the accident year.
Previous AoC steps
PreviousAocSteps gives, for an identity, every step before it back to BOP. A step of the
combined novelty branches into the in-force and new-business steps (and those of any other
novelty).
The original defines it through the parent step: if PAS is the parent AoC step,
PreviousAocSteps(step) = { PAS₁, PAS₂, … }
where PAS₁ = ParentAocStep(step)
PAS₂ = ParentAocStep(PAS₁)
… until there is no parent
It depends on the input source (actuals or cash flows) because the actuals chain differs from the others, and on the order of the steps, which the AocConfiguration sets.
The port defines it by order, not recursively.
PreviousAocStepsreturns every step of the group with a lowerOrder, of the same novelty — or of every novelty when the identity's novelty is combined (C) — in order. A step that is not configured for the requested input source has no previous steps.
Previous steps are what the margin is aggregated over and what the parent and reference steps are chosen from.
Parent AoC step
ParentAocStep gives the step immediately before this one — the step whose value this step's
telescoping difference is taken against. It is more than one step only for the first combined
step, CL, which has a parent in each novelty.
ParentAocStep(step) =
empty if the AoC type is BOP, or the step is Calculated
the last previous step of EACH novelty if it is the first combined step
the last previous step of the SAME novelty otherwise
"Last" means last in the order the configuration gives.
In the port the candidates are the previous steps minus every
Calculatedstep, and minus the credit-risk updateCRUunless the amount type is credit default risk (CDR) — for every other amount typeCRUmust not enter the chain, or it would double-count into its successor. The consequence for the yield-curve update is worked through on The IFRS 17 formulas: it telescopes against the opening balance, not against interest accretion.
Reference AoC step
ReferenceAocStep gives the step whose data a step reads in order to compute its value. A
calculated step has no input of its own: the experience adjustment EA reads the cash flows of
CF, the yield-curve update reads the nominal cash flows of the last supplied step.
ReferenceAocStep(step) =
the last previous step whose data type is not Calculated if the step is Calculated or CalculatedTelescopic
the step a custom setting names otherwise, if a custom setting exists
the step itself in every other case
The original keeps the custom settings in its helper variables, to be overwritten by projects.
In the port the custom settings are
ComputationHelper.ReferenceAocSteps:EA/CreadsCF/C, andAM/CandEOP/CreadCL/C. They take precedence over the general rule for calculated steps as well. For a calculated step the port takes the last non-calculated previous step of each novelty and prefers the combined novelty's when there is one. In projection periods (Shift ≥ 12), in-force steps readCL/C(ReferenceAocStepForProjections).