diff --git a/ifrs17/DataModel/DataStructure.ipynb b/ifrs17/DataModel/DataStructure.ipynb index cdbd7f16..864b87cd 100644 --- a/ifrs17/DataModel/DataStructure.ipynb +++ b/ifrs17/DataModel/DataStructure.ipynb @@ -1412,6 +1412,8 @@ "\n", "\nA Group of Contract is a set of contracts with the same Annual Cohort, Liability Type, Profitability and Partner (in case the contracts are done with a re-insurer).", "\n", + "\nContractTerm : defines the term that the given Contract is valid for in whole number of months. It can be used to compute the deferrable or amortized positions in the Balance Sheet. It is not a mandatory input, even if column header 'ContractTerm' is present. The default value is 0.", + "\n", "\nVarious Group of Contracts are put together into portfolios." ], "metadata": {}, @@ -1448,6 +1450,10 @@ "\n public string YieldCurveName { get; init; }", "\n ", "\n public virtual string Partner { get; init; }", + "\n ", + "\n [NotVisible]", + "\n [Dimension(typeof(int), nameof(ContractTerm))]", + "\n public int ContractTerm { get; init; }", "\n}" ], "metadata": {}, @@ -1700,7 +1706,10 @@ "\n public State PreviousState { get; init; }", "\n ", "\n public bool IsReinsurance { get; init; }", + "\n public int ContractTerm { get; init; }", + "\n", "\n public DataNodeData(){}", + "\n", "\n}" ], "metadata": {}, diff --git a/ifrs17/Import/3ImportScope-Actuals.ipynb b/ifrs17/Import/3ImportScope-Actuals.ipynb index 10cb341b..6f3a8573 100644 --- a/ifrs17/Import/3ImportScope-Actuals.ipynb +++ b/ifrs17/Import/3ImportScope-Actuals.ipynb @@ -376,7 +376,7 @@ { "cell_type": "markdown", "source": [ - "# Deferrable as cumulated discounted cash flow", + "## Deferrable as cumulated discounted cash flow", "\nThe cumulated discounted cash flow (CDC) or Present Value of deferral amount types is considered within this approach. ", "\nThe AoC Chain coincides with the one defined for Present Values. In addition, an Amortization step is computed using a release pattern defined in input (in the [DataNodeParameter](../DataModel/DataStructure#data-node-parameters) or as cash flow). ", "\n", @@ -456,7 +456,7 @@ { "cell_type": "markdown", "source": [ - "# Deferrable undiscounted", + "## Deferrable undiscounted", "\nThe nominal cash flow of deferral amount types is considered within this approach. ", "\nAs Present Values are not used here, this methodology allows to amortize and release expenses occurring in different months within the reporting period. ", "\nThis is achieved by applying a shift to the release pattern. For this reason, this approach is to be used with a release pattern defined in the [DataNodeParameter](../DataModel/DataStructure#data-node-parameters).", @@ -547,7 +547,7 @@ "\n}", "\n", "\npublic interface AmDeferrable : NominalDeferrable{", - "\n private AocStep referenceAocStep => GetScope(Identity.Id).Value;//CL,C", + "\n private AocStep referenceAocStep => GetScope(Identity.Id).Value; //CL,C", "\n private double referenceCashflow => GetScope((Identity.Id with {AocType = referenceAocStep.AocType, Novelty = referenceAocStep.Novelty}, Identity.MonthlyShift)).Value;", "\n", "\n double NominalDeferrable.Value => -1d * referenceCashflow * GetScope((Identity.Id, AmountTypes.DAE, Identity.MonthlyShift), o => o.WithContext(EconomicBasis)).Value;", diff --git a/ifrs17/Import/5ImportScope-ToIfrsVar.ipynb b/ifrs17/Import/5ImportScope-ToIfrsVar.ipynb index 1213f860..4e3540d1 100644 --- a/ifrs17/Import/5ImportScope-ToIfrsVar.ipynb +++ b/ifrs17/Import/5ImportScope-ToIfrsVar.ipynb @@ -74,6 +74,15 @@ "execution_count": 0, "outputs": [] }, + { + "cell_type": "markdown", + "source": [ + "## Pv" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, { "cell_type": "code", "source": [ @@ -106,6 +115,15 @@ "execution_count": 0, "outputs": [] }, + { + "cell_type": "markdown", + "source": [ + "## Nominal" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, { "cell_type": "code", "source": [ @@ -128,6 +146,15 @@ "execution_count": 0, "outputs": [] }, + { + "cell_type": "markdown", + "source": [ + "## RiskAdjustment" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, { "cell_type": "code", "source": [ @@ -160,6 +187,15 @@ "execution_count": 0, "outputs": [] }, + { + "cell_type": "markdown", + "source": [ + "## Actuals" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, { "cell_type": "code", "source": [ @@ -200,6 +236,16 @@ "execution_count": 0, "outputs": [] }, + { + "cell_type": "markdown", + "source": [ + "## Deferrable", + "\n### Actual" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, { "cell_type": "code", "source": [ @@ -221,6 +267,15 @@ "execution_count": 0, "outputs": [] }, + { + "cell_type": "markdown", + "source": [ + "### Cashflow" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, { "cell_type": "code", "source": [ @@ -256,6 +311,15 @@ "execution_count": 0, "outputs": [] }, + { + "cell_type": "markdown", + "source": [ + "### Deferrable" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, { "cell_type": "code", "source": [ @@ -270,6 +334,15 @@ "execution_count": 0, "outputs": [] }, + { + "cell_type": "markdown", + "source": [ + "### Amortzation Factor" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, { "cell_type": "code", "source": [ @@ -310,6 +383,15 @@ "execution_count": 0, "outputs": [] }, + { + "cell_type": "markdown", + "source": [ + "## Experience Adj. for Premium" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, { "cell_type": "code", "source": [ @@ -350,6 +432,15 @@ "execution_count": 0, "outputs": [] }, + { + "cell_type": "markdown", + "source": [ + "## Tm" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, { "cell_type": "code", "source": [ @@ -405,15 +496,6 @@ "metadata": {}, "execution_count": 0, "outputs": [] - }, - { - "cell_type": "code", - "source": [ - "" - ], - "metadata": {}, - "execution_count": 0, - "outputs": [] } ] } \ No newline at end of file diff --git a/ifrs17/Import/ImportStorage.ipynb b/ifrs17/Import/ImportStorage.ipynb index 588c1ce3..7c6c79fb 100644 --- a/ifrs17/Import/ImportStorage.ipynb +++ b/ifrs17/Import/ImportStorage.ipynb @@ -306,6 +306,8 @@ "\n public IEnumerable GetAllAocSteps(InputSource source) => aocStepByInputSource[source];", "\n public IEnumerable GetCalculatedTelescopicAocSteps() => AocConfigurationByAocStep.Where(kvp => kvp.Value.DataType == DataType.CalculatedTelescopic).Select(kvp => kvp.Key);", "\n", + "\n public DataNodeData GetDataNodeData(ImportIdentity id) => DataNodeDataBySystemName[id.DataNode];", + "\n", "\n //YieldCurve", "\n public double[] GetYearlyYieldCurve(ImportIdentity id, string economicBasis) {", "\n var yc = GetYieldCurve(id, economicBasis);", diff --git a/ifrs17/Import/Importers.ipynb b/ifrs17/Import/Importers.ipynb index 36210b9b..bef9081f 100644 --- a/ifrs17/Import/Importers.ipynb +++ b/ifrs17/Import/Importers.ipynb @@ -1017,6 +1017,8 @@ "\n", "\n var yieldCurveColumnGroupOfInsuranceContract = dataSet.Tables.Contains(nameof(GroupOfInsuranceContract)) && dataSet.Tables[nameof(GroupOfInsuranceContract)].Columns.Any(x => x.ColumnName == nameof(GroupOfInsuranceContract.YieldCurveName));", "\n var yieldCurveColumnGroupOfReinsuranceContract = dataSet.Tables.Contains(nameof(GroupOfReinsuranceContract)) && dataSet.Tables[nameof(GroupOfReinsuranceContract)].Columns.Any(x => x.ColumnName == nameof(GroupOfReinsuranceContract.YieldCurveName));", + "\n var contractTermColumnGroupOfInsuranceContract = dataSet.Tables.Contains(nameof(GroupOfInsuranceContract)) && dataSet.Tables[nameof(GroupOfInsuranceContract)].Columns.Any(x => x.ColumnName == nameof(GroupOfInsuranceContract.ContractTerm));", + "\n var contractTermColumnGroupOfReinsuranceContract = dataSet.Tables.Contains(nameof(GroupOfReinsuranceContract)) && dataSet.Tables[nameof(GroupOfReinsuranceContract)].Columns.Any(x => x.ColumnName == nameof(GroupOfReinsuranceContract.ContractTerm));", "\n", "\n var importLogGroupOfContracts = await Import.FromDataSet(dataSet)", "\n .WithType((dataset, datarow) => {", @@ -1040,7 +1042,10 @@ "\n Portfolio = pf,", "\n YieldCurveName = yieldCurveColumnGroupOfInsuranceContract", "\n ? datarow.Field(nameof(GroupOfContract.YieldCurveName)) ", - "\n : (string)null };", + "\n : (string)null,", + "\n ContractTerm = contractTermColumnGroupOfInsuranceContract", + "\n ? Convert.ToInt32(datarow.Field(nameof(GroupOfContract.ContractTerm))) ", + "\n : default };", "\n return ExtendGroupOfContract(gic, datarow);", "\n })", "\n .WithType((dataset, datarow) => {", @@ -1065,7 +1070,10 @@ "\n Partner = datarow.Field(nameof(GroupOfContract.Partner)),", "\n YieldCurveName = yieldCurveColumnGroupOfReinsuranceContract", "\n ? datarow.Field(nameof(GroupOfContract.YieldCurveName)) ", - "\n : (string)null };", + "\n : (string)null,", + "\n ContractTerm = contractTermColumnGroupOfReinsuranceContract", + "\n ? Convert.ToInt32(datarow.Field(nameof(GroupOfContract.ContractTerm))) ", + "\n : default };", "\n return ExtendGroupOfContract(gric, datarow);", "\n })", "\n .WithTarget(workspace)", diff --git a/ifrs17/Utils/Queries.ipynb b/ifrs17/Utils/Queries.ipynb index 47410222..a5ffa581 100644 --- a/ifrs17/Utils/Queries.ipynb +++ b/ifrs17/Utils/Queries.ipynb @@ -318,7 +318,8 @@ "\n Profitability = dn.Profitability,", "\n Partner = dn.Partner,", "\n IsReinsurance = dn.GetType() == typeof(GroupOfReinsuranceContract),", - "\n YieldCurveName = dn.YieldCurveName", + "\n YieldCurveName = dn.YieldCurveName,", + "\n ContractTerm = dn.ContractTerm", "\n };", "\n }", "\n );",