diff --git a/ifrs17/DataModel/DataStructure.ipynb b/ifrs17/DataModel/DataStructure.ipynb index 3e6144ff..d6fd7173 100644 --- a/ifrs17/DataModel/DataStructure.ipynb +++ b/ifrs17/DataModel/DataStructure.ipynb @@ -356,8 +356,7 @@ { "cell_type": "code", "source": [ - "//TODO: Should this be abstract or have a reference to the type?", - "\npublic record HierarchicalDimensionWithLevel(string SystemName, string DisplayName, string Parent, int Level) : IHierarchicalDimension;" + "public record HierarchicalDimensionWithLevel(string SystemName, string DisplayName, string Parent, int Level) : IHierarchicalDimension;" ], "metadata": {}, "execution_count": 0, @@ -1136,7 +1135,7 @@ "source": [ "", "\n## Yield Curve", - "\nThe record below holds the Yield Curves across time for each [Currency](#currency) and [Scenario](#scenario).", + "\nThe record below holds the forward rate Yield Curves across time for each [Currency](#currency) and [Scenario](#scenario).", "\nYield curves can be updated every month as part of the close preparation. In general, the last month of the reporting period should be used to import the new data for the period. ", "\n", "\nThe Yield Curve values must be entered with **yearly** granularity, i.e. every value corresponds to the rate of the whole year starting from the year entered in column Year. The last value is considered valid also for the following years (for which no value has been provided). ", @@ -1192,7 +1191,7 @@ "source": [ "", "\n## Partner Rating", - "\nThe record below holds the [Credit Risk Rating](#credit-risk-partner) for each [Partner](#partner) across time. Partner Rating can be updated every month as part of the close preparation. In general, the last month of the reporting period should be use to import the new data for the period. " + "\nThe record below holds the [Credit Risk Rating](#credit-risk-partner) for each [Partner](#partner) across time. Partner Rating can be updated every month as part of the close preparation. In general, the last month of the reporting period should be use to import the new data for the period. The Credit Default Rates for each rating is defined through the import of [Credit Default Rates](#credit-default-rate)." ], "metadata": {}, "execution_count": 0, @@ -1240,7 +1239,7 @@ "source": [ "", "\n# Partitions", - "\nThe notion of Partition is used to define small but meaningful sets of data, called partitions. Partitions are then used to optimize the extraction of data from the database, i.e. only the data for a certain partition is retrieved." + "\nThe notion of Partition is used internally to the calculation engine to define small but meaningful sets of data, called partitions. Partitions are then used to optimize the extraction of data from the database, i.e. only the data for a certain partition is retrieved. For example, a specific combination of Year and Month defines a partition." ], "metadata": {}, "execution_count": 0, @@ -1508,7 +1507,7 @@ "", "\n## Data Node State", "\n", - "\nThe Data State is used to track whether a GOC is Active or Inactive across time (year and month). ", + "\nThe Data State is used to track whether a Group of Contract is Active or Inactive across time (year and month). ", "\nIt is only possible to update the state of a Group of Contract from Active to Inactive." ], "metadata": {}, @@ -1647,8 +1646,8 @@ { "cell_type": "markdown", "source": [ - "## DataNodeData PocoType", - "\nThe DataNodeData type is not persisted (i.e. not stored in the database) and is used in order to hold Data Node data during data manipulations." + "## DataNodeData", + "\nThe DataNodeData type is not persisted (i.e. not stored in the database) and is used in order to hold Data Node data (i.e information from the dimension [data node](#data-node) and the data node [State](#data-node-state)) during data manipulations e.g import and report computations." ], "metadata": {}, "execution_count": 0, @@ -2061,7 +2060,10 @@ { "cell_type": "markdown", "source": [ - "# Args" + "# Args", + "\n", + "\nArgs are used to hold data related to the partition and additional information required to performe calculation at import and report. ", + "\nThey are not persisted, i.e. they are not saved on the database." ], "metadata": {}, "execution_count": 0, diff --git a/ifrs17/Import/ImportScopeCalculation.ipynb b/ifrs17/Import/ImportScopeCalculation.ipynb index 097661f1..3d155e93 100644 --- a/ifrs17/Import/ImportScopeCalculation.ipynb +++ b/ifrs17/Import/ImportScopeCalculation.ipynb @@ -526,7 +526,7 @@ "\nThe nominal cash flow values correspond to the cash flows provided in the cash flow input file. ", "\n
These values are stored in the database as [RawVariable](../DataModel/DataStructure#raw-variables).", "\n
Refer to the ReferenceAocStep of the AocStructure calculation to identify the correct AoC Type and Novelty to retrieve.", - "\n
Due to the Credit Default Risk of a reinsurance partner, the logic to compute the Nominal Cash flows for this Amount Type must be defined separately. " + "\n
Due to the Credit Default Risk of a reinsurance partner, the logic to compute the Nominal Cash flows for this Amount Type must be defined separately." ], "metadata": {}, "execution_count": 0, @@ -607,15 +607,28 @@ "\n$$", "\n\\text{CDC}_i(\\text{AoC step}) = \\left\\{", "\n\\begin{array}{cl}", - "\n\\text{Nominal}_i + \\text{CDC}_{i+1} \\cdot {\\text{Valid Discount}_{\\frac{i}{12}}} ~, & \\text{if AoC Type's Period Type is Beginning Of Period} \\\\", - "\n\\big( \\text{Nominal}_i + \\text{CDC}_{i+1} \\big) \\cdot {\\text{Valid Discount}_{\\frac{i}{12}}} ~, & \\text{if AoC Type's Period Type is End Of Period}", + "\n\\text{Nominal}_i + \\text{CDC}_{i+1} \\cdot {\\text{Valid Discount}_{\\frac{i}{12}}} ~, & \\text{if Amount Type's Period Type is Beginning Of Period} \\\\", + "\n\\big( \\text{Nominal}_i + \\text{CDC}_{i+1} \\big) \\cdot {\\text{Valid Discount}_{\\frac{i}{12}}} ~, & \\text{if Amount Type's Period Type is End Of Period}", "\n\\end{array}", "\n\\right.", "\n$$", "\n", "\nwhere Transaction Period depends on which Best Estimate value is being computed, in particular on what its [Amount Type](../DataModel/DataStructure#amount-type) is (each Amount Type has its own [Period Type](../Constants/Enums)); and $\\text{Valid Discount}$ stands for the fact that in case the Discount Curves are shorter than the required index, then their last element is returned. We also need to flip the sign of the discounted and cumulated values, to create a reserve view and be consistent with the usual [Cash flow Sign Convention](https://en.wikipedia.org/wiki/Cash_flow_sign_convention). ", "\n", - "\n
Also here, the Credit Default Risk contribution is calculated separately. Since it is based on Claims, the Period Type is implicitly defined." + "\n
Also here, the Credit Default Risk contribution is calculated separately. Since it is based on Claims, the Period Type is implicitly defined.", + "\nThe risk of default is included in the discounting formula as follows. First, we notice that one can explicitly write the discounting recursive relation above as:", + "\n$$", + "\n\\begin{array}{l}", + "\n\\text{CDC}_i = \\big( \\text{Nominal}_i + \\text{CDC}_{i+1} \\big) \\cdot {\\text{Valid Discount}_{\\frac{i}{12}}} ", + "\n\\Rightarrow \\text{CDC}_i = \\sum_{\\tau=i} \\big( \\text{Valid Discount}_{\\frac{i}{12}} \\big)^{\\tau-i+1} \\cdot \\text{Nominal}_\\tau ", + "\n\\end{array}", + "\n$$", + "\n", + "\nThus, the cumulated and discounted cashflow correction for default risk is assigned to the Amount Type Credit Default Risk (CDR) and it is obtained from the Amount Type Claims multiplying the right hand side of the previous formula by the corresponding risk factor", + "\n", + "\n$$", + "\n\\text{CDC}_i^{\\text{CDR}} = \\sum_{\\tau=i} \\big( \\text{Valid Discount}_{\\frac{i}{12}} \\big)^{\\tau-i+1} \\cdot \\text{Nominal}_\\tau^{\\text{Claim}} \\cdot \\big( e^{-\\gamma(\\tau-i)} -1 \\big)", + "\n$$" ], "metadata": {}, "execution_count": 0, @@ -1627,7 +1640,7 @@ "\n\\big(PV_{\\text{Novelty = I}} + PV_{\\text{Novelty = N}} \\big) - \\text{Actual}_{\\text{Novelty=C}} ~,", "\n$$", "\n", - "\nwhere the AoC Step **CF** is implicit for all formulas, $PV$ is the [present value](#present-value) with Estimate Type **BE**, and Actuals have Estimate Types **A** (see details [here](#actual-values))." + "\nwhere the AoC Step **CF** is implicit for all formulas, $PV$ is the [present value](#present-value) with Estimate Type **BE** (Best Estimate), and Actuals have Estimate Types **A** (see details [here](#actual-values)). Note that according to the applied sign convention, the sign of the CF AoC Step of Best Estimate Present Value and Actual is the same, accounting for the minus sign in the formula. " ], "metadata": {}, "execution_count": 0,