diff --git a/ifrs17-template/Files/DataNodes/DataNodes_CH.csv b/ifrs17-template/Files/DataNodes/DataNodes_CH.csv index 7142e21a..7988eafa 100644 --- a/ifrs17-template/Files/DataNodes/DataNodes_CH.csv +++ b/ifrs17-template/Files/DataNodes/DataNodes_CH.csv @@ -13,7 +13,7 @@ DT5,DT5 Simple Import,USD,ANN,BBA,Default, DT10,DT10 PPA,USD,ANN,PAA,Default, ,,,,,, @@GroupOfInsuranceContract,,,,,, -SystemName,DisplayName,InsurancePortfolio,AnnualCohort,LiabilityType,Profitability, +SystemName,DisplayName,InsurancePortfolio,AnnualCohort,LiabilityType,Profitability,YieldCurveName GicComplex,Gic test discounting,DT,2020,LRC,P, DT1.1,DT1.1 OCI LRC PA 0.8,DT1,2020,LRC,P, DT1.2,DT1.2 OCI LIC,DT1,2020,LIC,P, @@ -25,9 +25,9 @@ DT2.2,DT2.2 NOCI LIC,DT2,2020,LIC,P, DT3.1,DT3.1 Runoff - PA 0.8,DT3,2020,LRC,P, DT4.1,DT4.1 CSM PA 0.8,DT4,2020,LRC,P, DT5.1,DT5.1 Simple Import on DT 4.1,DT5,2020,LRC,P, -DTP1.1,DTP1.1 Projection,DT1,2020,LRC,P, -DT10.1,DT10.1 PAA,DT10,2020,LIC,P -DT10.2,DT10.1 PAA,DT10,2020,LRC,P +DTP1.1,DTP1.1 Projection,DT1,2020,LRC,P,NoDiscount +DT10.1,DT10.1 PAA,DT10,2020,LIC,P, +DT10.2,DT10.1 PAA,DT10,2020,LRC,P, ,,,,,, @@ReinsurancePortfolio,,,,,, SystemName,DisplayName,ContractualCurrency,LineOfBusiness,ValuationApproach,OciType, diff --git a/ifrs17-template/Files/Parameters/YieldCurve_2020_1.csv b/ifrs17-template/Files/Parameters/YieldCurve_2020_1.csv index c97a6549..0d3d4748 100644 --- a/ifrs17-template/Files/Parameters/YieldCurve_2020_1.csv +++ b/ifrs17-template/Files/Parameters/YieldCurve_2020_1.csv @@ -1,7 +1,7 @@ -@@Main -Year,Month -2020,1 -@@YieldCurve -Currency,Values0,Values1,Values2,Values3 -USD,0.002,0.002,0.002,0.002 - +@@Main,,,,, +Year,Month,,,, +2020,1,,,, +@@YieldCurve,,,,, +Currency,Name,Values0,Values1,Values2,Values3 +USD,,0.002,0.002,0.002,0.002 +USD,NoDiscount,0,,, diff --git a/ifrs17-template/Files/TransactionalData/NominalCashflows_CH_2020_12_Projection.csv b/ifrs17-template/Files/TransactionalData/NominalCashflows_CH_2020_12_Projection.csv index 59d27636..0e378838 100644 --- a/ifrs17-template/Files/TransactionalData/NominalCashflows_CH_2020_12_Projection.csv +++ b/ifrs17-template/Files/TransactionalData/NominalCashflows_CH_2020_12_Projection.csv @@ -7,7 +7,7 @@ DTP1.1,PR,BE,BOP,N,,100,0,0,100,0,0,100,0,0,100,0,0,0,100,0,0,100,0,0,100,0,0,10 DTP1.1,NIC,BE,BOP,N,,-25,-25,-25,-25,-25,-25,-25,-25,-25,-25,-25,-25,-25,-25,-25,-25,-25,-25,-25,-25,-25,-25,-25,-25 DTP1.1,CU,P,BOP,N,,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-3 DTP1.1,,RA,BOP,N,,-2.5,-2.5,-2.5,-2.5,-2.5,-2.5,-2.5,-2.5,-2.5,-2.5,-2.5,-2.5,-2.5,-2.5,-2.5,-2.5,-2.5,-2.5,-2.5,-2.5,-2.5,-2.5,-2.5,-2.5 -DTP1.1,PR,BE,CL,C,,100,0,0,100,0,0,100,0,0,100,0,0,0,100,0,0,100,0,0,100,0,0,100,0 -DTP1.1,NIC,BE,CL,C,,-25,-25,-25,-25,-25,-25,-25,-25,-25,-25,-25,-25,-25,-25,-25,-25,-25,-25,-25,-25,-25,-25,-25,-25 -DTP1.1,CU,P,CL,C,,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-3 -DTP1.1,,RA,CL,C,,-2.5,-2.5,-2.5,-2.5,-2.5,-2.5,-2.5,-2.5,-2.5,-2.5,-2.5,-2.5,-2.5,-2.5,-2.5,-2.5,-2.5,-2.5,-2.5,-2.5,-2.5,-2.5,-2.5,-2.5 +DTP1.1,PR,BE,CL,C,,0,0,0,0,0,0,0,0,0,0,0,0,0,100,0,0,100,0,0,100,0,0,100,0 +DTP1.1,NIC,BE,CL,C,,0,0,0,0,0,0,0,0,0,0,0,0,-25,-25,-25,-25,-25,-25,-25,-25,-25,-25,-25,-25 +DTP1.1,CU,P,CL,C,,0,0,0,0,0,0,0,0,0,0,0,0,-10,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-3 +DTP1.1,,RA,CL,C,,0,0,0,0,0,0,0,0,0,0,0,0,-2.5,-2.5,-2.5,-2.5,-2.5,-2.5,-2.5,-2.5,-2.5,-2.5,-2.5,-2.5 diff --git a/ifrs17-template/Files/TransactionalData/NominalCashflows_CH_2021_3_Projection.csv b/ifrs17-template/Files/TransactionalData/NominalCashflows_CH_2021_3_Projection.csv index 05e41d33..fd044b81 100644 --- a/ifrs17-template/Files/TransactionalData/NominalCashflows_CH_2021_3_Projection.csv +++ b/ifrs17-template/Files/TransactionalData/NominalCashflows_CH_2021_3_Projection.csv @@ -1,19 +1,30 @@ -@@Main,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, -ReportingNode,Year,Month,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, -CH,2021,3,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, -@@Cashflow,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, -DataNode,AmountType,EstimateType,AocType,Novelty,AccidentYear,Values0,Values1,Values2,Values3,Values4,Values5,Values6,Values7,Values8,Values9,Values10,Values11,Values12,Values13,Values14,Values15,Values16,Values17,Values18,Values19,Values20,Values21,Values22,Values23,Values24,Values25,Values26,Values27,Values28,Values29,Values30,Values31,Values32,Values33,Values34,Values35,Values36,Values37,Values38,Values39,Values40,Values41,Values42,Values43,Values44,Values45,Values46,Values47,Values48,Values49,Values50,Values51,Values52,Values53,Values54,Values55,Values56,Values57,Values58,Values59,Values60,Values61,Values62,Values63,Values64,Values65,Values66,Values67,Values68,Values69,Values70,Values71,Values72,Values73,Values74,Values75,Values76,Values77,Values78,Values79,Values80,Values81,Values82,Values83,Values84,Values85,Values86,Values87,Values88,Values89,Values90,Values91,Values92,Values93,Values94,Values95,Values96,Values97,Values98,Values99,Values100,Values101,Values102,Values103,Values104,Values105,Values106,Values107,Values108,Values109,Values110,Values111,Values112,Values113,Values114,Values115,Values116,Values117,Values118,Values119,Values120,Values121,Values122,Values123,Values124,Values125,Values126,Values127,Values128,Values129,Values130,Values131,Values132,Values133,Values134,Values135,Values136,Values137,Values138,Values139,Values140,Values141,Values142,Values143,Values144,Values145,Values146,Values147,Values148,Values149,Values150,Values151,Values152,Values153,Values154,Values155,Values156,Values157,Values158,Values159,Values160,Values161,Values162,Values163,Values164,Values165,Values166,Values167,Values168,Values169,Values170,Values171,Values172,Values173,Values174,Values175,Values176,Values177,Values178,Values179,Values180,Values181,Values182,Values183,Values184,Values185,Values186,Values187,Values188,Values189,Values190,Values191,Values192,Values193,Values194,Values195,Values196,Values197,Values198,Values199,Values200,Values201,Values202,Values203,Values204,Values205,Values206,Values207,Values208,Values209,Values210,Values211,Values212,Values213,Values214,Values215,Values216,Values217,Values218,Values219,Values220,Values221,Values222,Values223,Values224,Values225,Values226,Values227 -DTP1.1,PR,BE,MC,I,,0,110,0,0,110,0,0,110,0,0,110,0,0,110,0,0,110,0,0,110,0,0,110,0,0,110,0,0,110,0,0,110,0,0,110,0,0,110,0,0,110,0,0,110,0,0,110,0,0,110,0,0,110,0,0,110,0,0,110,0,0,110,0,0,110,0,0,110,0,0,110,0,0,110,0,0,110,0,0,110,0,0,110,0,0,110,0,0,110,0,0,110,0,0,110,0,0,110,0,0,110,0,0,110,0,0,110,0,0,110,0,0,110,0,0,110,0,0,110,0,0,110,0,0,110,0,0,110,0,0,110,0,0,110,0,0,110,0,0,110,0,0,110,0,0,110,0,0,110,0,0,110,0,0,110,0,0,110,0,0,110,0,0,110,0,0,110,0,0,110,0,0,110,0,0,110,0,0,110,0,0,110,0,0,110,0,0,110,0,0,110,0,0,110,0,0,110,0,0,110,0,0,110,0,0,110,0,0,110,0,0,110,0,0,110,0,0,110,0,0,110,0,0,110,0,0,110,0 -DTP1.1,NIC,BE,MC,I,,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20 -DTP1.1,CU,P,MC,I,,-10,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-3,-10,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-3,-10,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-3,-10,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-3,-10,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-3,-10,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-3,-10,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-3,-10,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-3,-10,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-3,-10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-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5 -DTP1.1,PR,BE,CL,C,,0,115,0,0,115,0,0,115,0,0,115,0,0,115,0,0,115,0,0,115,0,0,115,0,0,115,0,0,115,0,0,115,0,0,115,0,0,115,0,0,115,0,0,115,0,0,115,0,0,115,0,0,115,0,0,115,0,0,115,0,0,115,0,0,115,0,0,115,0,0,115,0,0,115,0,0,115,0,0,115,0,0,115,0,0,115,0,0,115,0,0,115,0,0,115,0,0,115,0,0,115,0,0,115,0,0,115,0,0,115,0,0,115,0,0,115,0,0,115,0,0,115,0,0,115,0,0,115,0,0,115,0,0,115,0,0,115,0,0,115,0,0,115,0,0,115,0,0,115,0,0,115,0,0,115,0,0,115,0,0,115,0,0,115,0,0,115,0,0,115,0,0,115,0,0,115,0,0,115,0,0,115,0,0,115,0,0,115,0,0,115,0,0,115,0,0,115,0,0,115,0,0,115,0,0,115,0,0,115,0,0,115,0,0,115,0,0,115,0,0,115,0,0,115,0,0,115,0 -DTP1.1,NIC,BE,CL,C,,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29 -DTP1.1,CU,P,CL,C,,-15,-7,-7,-7,-7,-7,-7,-7,-7,-7,-7,-5,-15,-7,-7,-7,-7,-7,-7,-7,-7,-7,-7,-5,-15,-7,-7,-7,-7,-7,-7,-7,-7,-7,-7,-5,-15,-7,-7,-7,-7,-7,-7,-7,-7,-7,-7,-5,-15,-7,-7,-7,-7,-7,-7,-7,-7,-7,-7,-5,-15,-7,-7,-7,-7,-7,-7,-7,-7,-7,-7,-5,-15,-7,-7,-7,-7,-7,-7,-7,-7,-7,-7,-5,-15,-7,-7,-7,-7,-7,-7,-7,-7,-7,-7,-5,-15,-7,-7,-7,-7,-7,-7,-7,-7,-7,-7,-5,-15,-7,-7,-7,-7,-7,-7,-7,-7,-7,-7,-5,-15,-7,-7,-7,-7,-7,-7,-7,-7,-7,-7,-5,-15,-7,-7,-7,-7,-7,-7,-7,-7,-7,-7,-5,-15,-7,-7,-7,-7,-7,-7,-7,-7,-7,-7,-5,-15,-7,-7,-7,-7,-7,-7,-7,-7,-7,-7,-5,-15,-7,-7,-7,-7,-7,-7,-7,-7,-7,-7,-5,-15,-7,-7,-7,-7,-7,-7,-7,-7,-7,-7,-5,-15,-7,-7,-7,-7,-7,-7,-7,-7,-7,-7,-5,-15,-7,-7,-7,-7,-7,-7,-7,-7,-7,-7,-5,-15,-7,-7,-7,-7,-7,-7,-7,-7,-7,-7,-5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-2.5,-2.5,-2.5,-2.5,-2.5,-2.5,-2.5,-2.5,-2.5,-2.5,-2.5,-2.5,-2.5,-2.5,-2.5,-2.5,-2.5,-2.5,-2.5,-2.5,-2.5,-2.5,-2.5,-2.5,-2.5,-2.5,-2.5 +@@Main,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +ReportingNode,Year,Month,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +CH,2021,3,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +@@Cashflow,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +DataNode,AmountType,EstimateType,AocType,Novelty,AccidentYear,Values0,Values1,Values2,Values3,Values4,Values5,Values6,Values7,Values8,Values9,Values10,Values11,Values12,Values13,Values14,Values15,Values16,Values17,Values18,Values19,Values20,Values21,Values22,Values23,Values24,Values25,Values26,Values27,Values28,Values29,Values30,Values31,Values32,Values33,Values34,Values35 +DTP1.1,PR,BE,MC,I,,0,110,0,0,110,0,0,110,0,0,110,0,0,110,0,0,110,0,0,110,0,0,110,0,0,110,0,0,110,0,0,110,0,0,110,0 +DTP1.1,NIC,BE,MC,I,,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20,-20 +DTP1.1,,RA,MC,I,,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2 +DTP1.1,PR,BE,AU,I,,0,110,0,0,110,0,0,110,0,0,110,0,0,111,0,0,111,0,0,111,0,0,111,0,0,111,0,0,111,0,0,111,0,0,111,0 +DTP1.1,NIC,BE,AU,I,,-21,-21,-21,-21,-21,-21,-21,-21,-21,-21,-21,-21,-21,-21,-21,-21,-21,-21,-21,-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5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5,-0.5 +DTP1.1,PR,BE,CL,C,,0,0,0,0,115,0,0,115,0,0,115,0,0,115,0,0,115,0,0,115,0,0,115,0,0,115,0,0,115,0,0,115,0,0,115,0 +DTP1.1,NIC,BE,CL,C,,0,0,0,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29,-29 +DTP1.1,CU,P,CL,C,,0,0,0,-15,-15,-15,-15,-15,-15,-15,-15,-15,-15,-7,-7,-7,-7,-7,-7,-7,-7,-7,-7,-5,-15,-7,-7,-7,-7,-7,-7,-7,-7,-7,-7,-5 +DTP1.1,,RA,CL,C,,0,0,0,-2.5,-2.5,-2.5,-2.5,-2.5,-2.5,-2.5,-2.5,-2.5,-2.5,-2.5,-2.5,-2.5,-2.5,-2.5,-2.5,-2.5,-2.5,-2.5,-2.5,-2.5,-2.5,-2.5,-2.5,-2.5,-2.5,-2.5,-2.5,-2.5,-2.5,-2.5,-2.5,-2.5 diff --git a/ifrs17-template/Test/Data/ExportIfrsVariable.ipynb b/ifrs17-template/Test/Data/ExportIfrsVariable.ipynb index bd80d583..25d3daad 100644 --- a/ifrs17-template/Test/Data/ExportIfrsVariable.ipynb +++ b/ifrs17-template/Test/Data/ExportIfrsVariable.ipynb @@ -53,6 +53,35 @@ "execution_count": 0, "outputs": [] }, + { + "cell_type": "markdown", + "source": [ + "## Extra Imports" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "ProjectionCount = 5;", + "\nvar activity1 = await Import.FromFile(\"../../Files/TransactionalData/NominalCashflows_CH_2020_12_Projection.csv\")", + "\n .WithFormat(ImportFormats.Cashflow)", + "\n .WithTarget(DataSource)", + "\n .WithActivityLog()", + "\n .ExecuteAsync();", + "\nvar activity2 = await Import.FromFile(\"../../Files/TransactionalData/NominalCashflows_CH_2021_3_Projection.csv\")", + "\n .WithFormat(ImportFormats.Cashflow)", + "\n .WithTarget(DataSource)", + "\n .WithActivityLog()", + "\n .ExecuteAsync();", + "\nProjectionCount = 1;" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, { "cell_type": "markdown", "source": [ @@ -123,7 +152,7 @@ { "cell_type": "code", "source": [ - "var args = exportScope[2];", + "var args = new ImportArgs (\"CH\", 2021, 3, (Periodicity)default, null, null);", "\nargs" ], "metadata": {}, @@ -135,8 +164,9 @@ "source": [ "await DataSource.Partition.SetAsync(new {ReportingNode = args.ReportingNode, Year = args.Year, Month = args.Month, Scenario = args.Scenario});", "\nvar ifrsVariables = (await DataSource.Query().ToArrayAsync())", + "\n .Where(x => x.DataNode == \"DTP1.1\") //Extra Filter", "\n .Select(v => v with {Values = v.Values.Select(x => Math.Round(x, roundingDigits)).ToArray()})", - "\n .OrderBy(v => v.DataNode).ThenBy(v => v.AccidentYear).ThenBy(v => v.EstimateType).ThenBy(v => v.EconomicBasis).ThenBy(v => v.AmountType).ThenBy(v => v.Novelty)", + "\n .OrderBy(v => v.DataNode).ThenBy(v => v.AccidentYear).ThenBy(v => v.EstimateType).ThenBy(v => v.EconomicBasis).ThenBy(v => v.AmountType).ThenBy(v => (v.AocType, v.Novelty))", "\n .ThenBy(v => v.AocType)", "\n .ToArray();" ], @@ -165,7 +195,7 @@ { "cell_type": "code", "source": [ - "const string fileNamePrefix = \"SimpleValue\";" + "string fileNamePrefix = \"SimpleValue\";" ], "metadata": {}, "execution_count": 0, @@ -174,22 +204,22 @@ { "cell_type": "code", "source": [ - "await Export.ToCsv(fileNamePrefix + \"_\" + args.ReportingNode + \"_\" + args.Year.ToString() + \"_\" + args.Month.ToString() + \"_\" + args.Scenario)", - "\n .WithTable(tableConfig => tableConfig", - "\n .AtBeginning()", - "\n .WithName(Main)", - "\n .WithSource(source => args.RepeatOnce().AsQueryable())", - "\n .WithColumn(x => x.Periodicity, x => x.Delete())", - "\n .WithColumn(x => x.ImportFormat, x => x.Delete())", - "\n )", - "\n .WithTable(tableConfig => tableConfig", - "\n .WithSource(source => ifrsVariables.AsQueryable())", - "\n .WithName(fileNamePrefix)", - "\n .WithColumn(x => x.Partition, x => x.Delete())", - "\n .WithColumn(x => x.Id, x => x.Delete())", - "\n )", - "\n .WithSource(DataSource)", - "\n .ExecuteAsync() " + "// await Export.ToCsv(fileNamePrefix + \"_\" + args.ReportingNode + \"_\" + args.Year.ToString() + \"_\" + args.Month.ToString() + \"_\" + args.Scenario)", + "\n// .WithTable(tableConfig => tableConfig", + "\n// .AtBeginning()", + "\n// .WithName(Main)", + "\n// .WithSource(source => args.RepeatOnce().AsQueryable())", + "\n// .WithColumn(x => x.Periodicity, x => x.Delete())", + "\n// .WithColumn(x => x.ImportFormat, x => x.Delete())", + "\n// )", + "\n// .WithTable(tableConfig => tableConfig", + "\n// .WithSource(source => ifrsVariables.AsQueryable())", + "\n// .WithName(fileNamePrefix)", + "\n// .WithColumn(x => x.Partition, x => x.Delete())", + "\n// .WithColumn(x => x.Id, x => x.Delete())", + "\n// )", + "\n// .WithSource(DataSource)", + "\n// .ExecuteAsync() " ], "metadata": {}, "execution_count": 0, @@ -207,7 +237,16 @@ { "cell_type": "code", "source": [ - "const string benchmarkFileNamePrefix = \"BM\";" + "string benchmarkFileNamePrefix = \"BM\";" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "string benchmarkFileNameSuffix = \"Projection_DTP\";" ], "metadata": {}, "execution_count": 0, @@ -216,7 +255,7 @@ { "cell_type": "code", "source": [ - "var estimateType = \"RA\";" + "var estimateType = EstimateTypes.BE;" ], "metadata": {}, "execution_count": 0, @@ -225,22 +264,23 @@ { "cell_type": "code", "source": [ - "await Export.ToCsv(benchmarkFileNamePrefix + \"_\" + args.ReportingNode +\"_\" + args.Year.ToString() + \"_\" + args.Month.ToString() + \"_\" + args.Scenario + \"_\" + estimateType)", - "\n .WithTable(tableConfig => tableConfig", - "\n .AtBeginning()", - "\n .WithName(Main)", - "\n .WithSource(source => args.RepeatOnce().AsQueryable())", - "\n .WithColumn(x => x.Periodicity, x => x.Delete())", - "\n .WithColumn(x => x.ImportFormat, x => x.Delete())", - "\n )", - "\n .WithTable(tableConfig => tableConfig", - "\n .WithSource(source => ifrsVariables.Where(x => x.EstimateType == estimateType).AsQueryable())", - "\n .WithName(estimateType)", - "\n .WithColumn(x => x.Partition, x => x.Delete())", - "\n .WithColumn(x => x.Id, x => x.Delete())", - "\n )", - "\n .WithSource(DataSource)", - "\n .ExecuteAsync() " + "var filename = benchmarkFileNamePrefix + \"_\" + args.ReportingNode +\"_\" + args.Year.ToString() + \"_\" + args.Month.ToString() + \"_\" + args.Scenario + \"_\" + estimateType + (string.IsNullOrWhiteSpace(benchmarkFileNameSuffix) ? string.Empty : \"_\" + benchmarkFileNameSuffix);", + "\nawait Export.ToCsv(filename)", + "\n .WithTable(tableConfig => tableConfig", + "\n .AtBeginning()", + "\n .WithName(Main)", + "\n .WithSource(source => args.RepeatOnce().AsQueryable())", + "\n .WithColumn(x => x.Periodicity, x => x.Delete())", + "\n .WithColumn(x => x.ImportFormat, x => x.Delete())", + "\n )", + "\n .WithTable(tableConfig => tableConfig", + "\n .WithSource(source => ifrsVariables.Where(x => x.EstimateType == estimateType).AsQueryable())", + "\n .WithName(estimateType)", + "\n .WithColumn(x => x.Partition, x => x.Delete())", + "\n .WithColumn(x => x.Id, x => x.Delete())", + "\n )", + "\n .WithSource(DataSource)", + "\n .ExecuteAsync() " ], "metadata": {}, "execution_count": 0, @@ -249,7 +289,7 @@ { "cell_type": "code", "source": [ - "" + "ifrsVariables" ], "metadata": {}, "execution_count": 0, diff --git a/ifrs17-template/Test/Data/IfrsVariableBenchmarks/BM_CH_2021_3__BE_Projection_DTP.csv b/ifrs17-template/Test/Data/IfrsVariableBenchmarks/BM_CH_2021_3__BE_Projection_DTP.csv index d47412e9..23b5c2eb 100644 --- a/ifrs17-template/Test/Data/IfrsVariableBenchmarks/BM_CH_2021_3__BE_Projection_DTP.csv +++ b/ifrs17-template/Test/Data/IfrsVariableBenchmarks/BM_CH_2021_3__BE_Projection_DTP.csv @@ -1,57 +1,77 @@ -@@Main,,,,,,,,,,,,,,,,,,, -Month,ReportingNode,Scenario,Year,,,,,,,,,,,,,,,, -3,CH,,2021,,,,,,,,,,,,,,,, -@@BE,,,,,,,,,,,,,,,,,,, -AccidentYear,AmountType,AocType,DataNode,EconomicBasis,EstimateType,Novelty,Values0,Values1,Values2,Values3,Values4,Values5,Values6,Values7,Values8,Values9,Values10,Values11,Values12 -,NIC,EOP,DTP1.1,C,BE,C,6227.90059,6148.63474,6069.26999,5989.80622,5670.95847,0,0,0,0,0,0,0,0 -,NIC,BOP,DTP1.1,C,BE,I,299.67555,299.67555,299.67555,299.67555,5989.80622,0,0,0,0,0,0,0,0 -,NIC,CF,DTP1.1,C,BE,I,-60,-120,-180,-240,-240,0,0,0,0,0,0,0,0 -,NIC,IA,DTP1.1,C,BE,I,2.22541,4.42196,6.58963,8.7284,20.105,0,0,0,0,0,0,0,0 -,NIC,MC,DTP1.1,C,BE,I,4174.48341,4174.48341,4174.48341,4174.48341,-1858.90538,0,0,0,0,0,0,0,0 -,NIC,YCU,DTP1.1,C,BE,I,-121.28052,-118.14317,-115.04515,-111.98652,0,0,0,0,0,0,0,0,0 -,NIC,BOP,DTP1.1,C,BE,N,869.94037,869.94037,869.94037,869.94037,826.18017,0,0,0,0,0,0,0,0 -,NIC,CF,DTP1.1,C,BE,N,-12,-24,-36,-48,-48,0,0,0,0,0,0,0,0 -,NIC,EV,DTP1.1,C,BE,N,1073.77596,1060.10944,1046.42586,1032.72521,977.75146,0,0,0,0,0,0,0,0 -,NIC,IA,DTP1.1,C,BE,N,1.0804,2.14718,3.20032,4.2398,4.021,0,0,0,0,0,0,0,0 -,PR,EOP,DTP1.1,C,BE,C,-8235.70419,-8130.88394,-8025.93291,-7920.85094,-7499.21034,0,0,0,0,0,0,0,0 -,PR,BOP,DTP1.1,C,BE,I,-399.63393,-399.63393,-399.63393,-399.63393,-7920.85094,0,0,0,0,0,0,0,0 -,PR,CF,DTP1.1,C,BE,I,110,220,330,440,440,0,0,0,0,0,0,0,0 -,PR,IA,DTP1.1,C,BE,I,-4.06229,-8.07164,-12.02804,-15.93146,-36.6916,0,0,0,0,0,0,0,0 -,PR,MC,DTP1.1,C,BE,I,-7804.35661,-7804.35661,-7804.35661,-7804.35661,344.38482,0,0,0,0,0,0,0,0 -,PR,YCU,DTP1.1,C,BE,I,220.42273,214.69493,209.03928,203.45589,0,0,0,0,0,0,0,0,0 -,PR,BOP,DTP1.1,C,BE,N,-725.25164,-725.25164,-725.25164,-725.25164,-688.76965,0,0,0,0,0,0,0,0 -,PR,CF,DTP1.1,C,BE,N,10,20,30,40,40,0,0,0,0,0,0,0,0 -,PR,EV,DTP1.1,C,BE,N,358.0741,353.51669,348.9536,344.38482,326.05262,0,0,0,0,0,0,0,0 -,PR,IA,DTP1.1,C,BE,N,-0.89655,-1.78175,-2.65557,-3.51801,-3.3356,0,0,0,0,0,0,0,0 -,NIC,EOP,DTP1.1,L,BE,C,6403.75734,6319.94234,6236.08545,6152.18667,5816.17216,0,0,0,0,0,0,0,0 -,NIC,BOP,DTP1.1,L,BE,I,299.67555,299.67555,299.67555,299.67555,6152.18667,0,0,0,0,0,0,0,0 -,NIC,CF,DTP1.1,L,BE,I,-60,-120,-180,-240,-240,0,0,0,0,0,0,0,0 -,NIC,IA,DTP1.1,L,BE,I,2.22541,4.42196,6.58963,8.7284,8.26585,0,0,0,0,0,0,0,0 -,NIC,MC,DTP1.1,L,BE,I,4174.48341,4174.48341,4174.48341,4174.48341,-1909.29931,0,0,0,0,0,0,0,0 -,NIC,BOP,DTP1.1,L,BE,N,894.83179,894.83179,894.83179,894.83179,848.57747,0,0,0,0,0,0,0,0 -,NIC,CF,DTP1.1,L,BE,N,-12,-24,-36,-48,-48,0,0,0,0,0,0,0,0 -,NIC,EV,DTP1.1,L,BE,N,1104.09609,1089.64523,1075.18715,1060.72184,1002.7883,0,0,0,0,0,0,0,0 -,NIC,IA,DTP1.1,L,BE,N,0.44508,0.88439,1.31793,1.74568,1.65317,0,0,0,0,0,0,0,0 -,PR,EOP,DTP1.1,L,BE,C,-8466.14614,-8355.33774,-8244.47398,-8133.55482,-7689.32376,0,0,0,0,0,0,0,0 -,PR,BOP,DTP1.1,L,BE,I,-399.63393,-399.63393,-399.63393,-399.63393,-8133.55482,0,0,0,0,0,0,0,0 -,PR,CF,DTP1.1,L,BE,I,110,220,330,440,440,0,0,0,0,0,0,0,0 -,PR,IA,DTP1.1,L,BE,I,-4.06229,-8.07164,-12.02804,-15.93146,-15.08333,0,0,0,0,0,0,0,0 -,PR,MC,DTP1.1,L,BE,I,-7804.35661,-7804.35661,-7804.35661,-7804.35661,353.63282,0,0,0,0,0,0,0,0 -,PR,BOP,DTP1.1,L,BE,N,-745.81732,-745.81732,-745.81732,-745.81732,-707.26564,0,0,0,0,0,0,0,0 -,PR,CF,DTP1.1,L,BE,N,10,20,30,40,40,0,0,0,0,0,0,0,0 -,PR,EV,DTP1.1,L,BE,N,368.09331,363.27555,358.45539,353.63282,334.31842,0,0,0,0,0,0,0,0 -,PR,IA,DTP1.1,L,BE,N,-0.3693,-0.73379,-1.09346,-1.44831,-1.37121,0,0,0,0,0,0,0,0 -,NIC,EOP,DTP1.1,N,BE,C,6525,6438,6351,6264,5916,0,0,0,0,0,0,0,0 -,NIC,BOP,DTP1.1,N,BE,I,300,300,300,300,6264,0,0,0,0,0,0,0,0 -,NIC,CF,DTP1.1,N,BE,I,-60,-120,-180,-240,-240,0,0,0,0,0,0,0,0 -,NIC,MC,DTP1.1,N,BE,I,4260,4260,4260,4260,-1944,0,0,0,0,0,0,0,0 -,NIC,BOP,DTP1.1,N,BE,N,912,912,912,912,864,0,0,0,0,0,0,0,0 -,NIC,CF,DTP1.1,N,BE,N,-12,-24,-36,-48,-48,0,0,0,0,0,0,0,0 -,NIC,EV,DTP1.1,N,BE,N,1125,1110,1095,1080,1020,0,0,0,0,0,0,0,0 -,PR,EOP,DTP1.1,N,BE,C,-8625,-8510,-8395,-8280,-7820,0,0,0,0,0,0,0,0 -,PR,BOP,DTP1.1,N,BE,I,-400,-400,-400,-400,-8280,0,0,0,0,0,0,0,0 -,PR,CF,DTP1.1,N,BE,I,110,220,330,440,440,0,0,0,0,0,0,0,0 -,PR,MC,DTP1.1,N,BE,I,-7960,-7960,-7960,-7960,360,0,0,0,0,0,0,0,0 -,PR,BOP,DTP1.1,N,BE,N,-760,-760,-760,-760,-720,0,0,0,0,0,0,0,0 -,PR,CF,DTP1.1,N,BE,N,10,20,30,40,40,0,0,0,0,0,0,0,0 -,PR,EV,DTP1.1,N,BE,N,375,370,365,360,340,0,0,0,0,0,0,0,0 +@@Main,,,,,,,,,,, +Month,ReportingNode,Scenario,Year,,,,,,,, +3,CH,,2021,,,,,,,, +@@BE,,,,,,,,,,, +AccidentYear,AmountType,AocType,DataNode,EconomicBasis,EstimateType,Novelty,Values0,Values1,Values2,Values3,Values4 +,NIC,AU,DTP1.1,C,BE,I,32.90677,29.92271,26.93716,23.95012,0 +,NIC,AU,DTP1.1,C,BE,N,-180.22351,-163.94151,-147.63919,-131.31653,0 +,NIC,BOP,DTP1.1,C,BE,I,299.67555,299.67555,299.67555,299.67555,692.39627 +,NIC,BOP,DTP1.1,C,BE,N,142.89834,142.89834,142.89834,142.89834,0 +,NIC,CF,DTP1.1,C,BE,I,-60,-120,-180,-240,-348 +,NIC,CF,DTP1.1,C,BE,N,-9.5,-38,-66.5,-95,0 +,NIC,EOP,DTP1.1,C,BE,C,950.26941,864.41886,778.46119,692.39627,347.06147 +,NIC,EV,DTP1.1,C,BE,I,-32.76791,-29.80755,-26.84349,-23.87573,0 +,NIC,EV,DTP1.1,C,BE,N,163.83955,149.03773,134.21745,119.37867,0 +,NIC,IA,DTP1.1,C,BE,I,0.34863,0.66746,0.95647,1.21565,2.6652 +,NIC,IA,DTP1.1,C,BE,N,0.3958,0.77234,1.1138,1.42012,0 +,NIC,MC,DTP1.1,C,BE,I,418.11115,418.11115,418.11115,418.11115,0 +,NIC,MC,DTP1.1,C,BE,N,177.50101,177.50101,177.50101,177.50101,0 +,NIC,YCU,DTP1.1,C,BE,I,-2.91597,-2.41839,-1.96706,-1.56207,0 +,PR,AU,DTP1.1,C,BE,I,-7.97275,-7.97673,-7.98071,-7.9847,0 +,PR,AU,DTP1.1,C,BE,N,-43.70871,-39.75992,-35.8062,-31.84754,0 +,PR,BOP,DTP1.1,C,BE,I,-399.63393,-399.63393,-399.63393,-399.63393,-915.61688 +,PR,BOP,DTP1.1,C,BE,N,-119.13145,-119.13145,-119.13145,-119.13145,0 +,PR,CF,DTP1.1,C,BE,I,110,220,330,440,460 +,PR,CF,DTP1.1,C,BE,N,6,12,18,24,0 +,PR,EOP,DTP1.1,C,BE,C,-1256.62536,-1143.09757,-1029.42813,-915.61688,-458.95011 +,PR,EV,DTP1.1,C,BE,I,7.93216,7.94206,7.95196,7.96189,0 +,PR,EV,DTP1.1,C,BE,N,54.63589,49.69989,44.75774,39.80943,0 +,PR,IA,DTP1.1,C,BE,I,-0.62095,-1.18725,-1.69888,-2.15581,-3.33323 +,PR,IA,DTP1.1,C,BE,N,-0.08419,-0.161,-0.23042,-0.29245,0 +,PR,MC,DTP1.1,C,BE,I,-916.52747,-916.52747,-916.52747,-916.52747,0 +,PR,MC,DTP1.1,C,BE,N,47.65258,47.65258,47.65258,47.65258,0 +,PR,YCU,DTP1.1,C,BE,I,4.83347,3.98565,3.21864,2.53257,0 +,NIC,AU,DTP1.1,L,BE,I,33,30,27,24,0 +,NIC,AU,DTP1.1,L,BE,N,-181.5,-165,-148.5,-132,0 +,NIC,BOP,DTP1.1,L,BE,I,300,300,300,300,696 +,NIC,BOP,DTP1.1,L,BE,N,144,144,144,144,0 +,NIC,CF,DTP1.1,L,BE,I,-60,-120,-180,-240,-348 +,NIC,CF,DTP1.1,L,BE,N,-9.5,-38,-66.5,-95,0 +,NIC,EOP,DTP1.1,L,BE,C,957,870,783,696,348 +,NIC,EV,DTP1.1,L,BE,I,-33,-30,-27,-24,0 +,NIC,EV,DTP1.1,L,BE,N,165,150,135,120,0 +,NIC,MC,DTP1.1,L,BE,I,420,420,420,420,0 +,NIC,MC,DTP1.1,L,BE,N,179,179,179,179,0 +,PR,AU,DTP1.1,L,BE,I,-8,-8,-8,-8,0 +,PR,AU,DTP1.1,L,BE,N,-44,-40,-36,-32,0 +,PR,BOP,DTP1.1,L,BE,I,-400,-400,-400,-400,-920 +,PR,BOP,DTP1.1,L,BE,N,-120,-120,-120,-120,0 +,PR,CF,DTP1.1,L,BE,I,110,220,330,440,460 +,PR,CF,DTP1.1,L,BE,N,6,12,18,24,0 +,PR,EOP,DTP1.1,L,BE,C,-1265,-1150,-1035,-920,-460 +,PR,EV,DTP1.1,L,BE,I,8,8,8,8,0 +,PR,EV,DTP1.1,L,BE,N,55,50,45,40,0 +,PR,MC,DTP1.1,L,BE,I,-920,-920,-920,-920,0 +,PR,MC,DTP1.1,L,BE,N,48,48,48,48,0 +,NIC,AU,DTP1.1,N,BE,I,33,30,27,24,0 +,NIC,AU,DTP1.1,N,BE,N,-181.5,-165,-148.5,-132,0 +,NIC,BOP,DTP1.1,N,BE,I,300,300,300,300,696 +,NIC,BOP,DTP1.1,N,BE,N,144,144,144,144,0 +,NIC,CF,DTP1.1,N,BE,I,-60,-120,-180,-240,-348 +,NIC,CF,DTP1.1,N,BE,N,-9.5,-38,-66.5,-95,0 +,NIC,EOP,DTP1.1,N,BE,C,957,870,783,696,348 +,NIC,EV,DTP1.1,N,BE,I,-33,-30,-27,-24,0 +,NIC,EV,DTP1.1,N,BE,N,165,150,135,120,0 +,NIC,MC,DTP1.1,N,BE,I,420,420,420,420,0 +,NIC,MC,DTP1.1,N,BE,N,179,179,179,179,0 +,PR,AU,DTP1.1,N,BE,I,-8,-8,-8,-8,0 +,PR,AU,DTP1.1,N,BE,N,-44,-40,-36,-32,0 +,PR,BOP,DTP1.1,N,BE,I,-400,-400,-400,-400,-920 +,PR,BOP,DTP1.1,N,BE,N,-120,-120,-120,-120,0 +,PR,CF,DTP1.1,N,BE,I,110,220,330,440,460 +,PR,CF,DTP1.1,N,BE,N,6,12,18,24,0 +,PR,EOP,DTP1.1,N,BE,C,-1265,-1150,-1035,-920,-460 +,PR,EV,DTP1.1,N,BE,I,8,8,8,8,0 +,PR,EV,DTP1.1,N,BE,N,55,50,45,40,0 +,PR,MC,DTP1.1,N,BE,I,-920,-920,-920,-920,0 +,PR,MC,DTP1.1,N,BE,N,48,48,48,48,0 diff --git a/ifrs17-template/Test/Data/IfrsVariableBenchmarks/BM_CH_2021_3__C_Projection_DTP.csv b/ifrs17-template/Test/Data/IfrsVariableBenchmarks/BM_CH_2021_3__C_Projection_DTP.csv new file mode 100644 index 00000000..f19cd9ac --- /dev/null +++ b/ifrs17-template/Test/Data/IfrsVariableBenchmarks/BM_CH_2021_3__C_Projection_DTP.csv @@ -0,0 +1,12 @@ +@@Main,,,,,,,,,,, +Month,ReportingNode,Scenario,Year,,,,,,,, +3,CH,,2021,,,,,,,, +@@C,,,,,,,,,,, +AccidentYear,AmountType,AocType,DataNode,EconomicBasis,EstimateType,Novelty,Values0,Values1,Values2,Values3,Values4 +,,AM,DTP1.1,L,C,C,0,-1.89286,-58.31633,-144.55321,-96.3688 +,,AU,DTP1.1,L,C,I,-25,-22,-19,-16,0 +,,BOP,DTP1.1,L,C,I,0,0,11.35714,145.79082,192.73761 +,,CL,DTP1.1,L,C,C,-198,-264,-265.25,-266.5,0 +,,EOP,DTP1.1,L,C,C,0,11.35714,145.79082,192.73761,96.3688 +,,EV,DTP1.1,L,C,I,25,22,19,16,0 +,,MC,DTP1.1,L,C,I,198,277.25,458,458,0 diff --git a/ifrs17-template/Test/Data/IfrsVariableBenchmarks/BM_CH_2021_3__L_Projection_DTP.csv b/ifrs17-template/Test/Data/IfrsVariableBenchmarks/BM_CH_2021_3__L_Projection_DTP.csv new file mode 100644 index 00000000..282ec3f9 --- /dev/null +++ b/ifrs17-template/Test/Data/IfrsVariableBenchmarks/BM_CH_2021_3__L_Projection_DTP.csv @@ -0,0 +1,14 @@ +@@Main,,,,,,,,,, +Month,ReportingNode,Scenario,Year,,,,,,, +3,CH,,2021,,,,,,, +@@L,,,,,,,,,, +AccidentYear,AmountType,AocType,DataNode,EconomicBasis,EstimateType,Novelty,Values0,Values1,Values2,Values3 +,,AU,DTP1.1,L,L,N,-217.25,-197.5,-177.75,-158 +,,BOP,DTP1.1,L,L,I,260,180.75,0,0 +,,BOP,DTP1.1,L,L,N,60,60,60,60 +,,CL,DTP1.1,L,L,C,-198,-264,-265.25,-266.5 +,,EA,DTP1.1,L,L,C,116,0,0,0 +,,EOP,DTP1.1,L,L,C,180.75,0,0,0 +,,EV,DTP1.1,L,L,N,203.5,185,166.5,148 +,,MC,DTP1.1,L,L,I,-260,-180.75,0,0 +,,MC,DTP1.1,L,L,N,216.5,216.5,216.5,216.5 diff --git a/ifrs17-template/Test/Data/IfrsVariableBenchmarks/BM_CH_2021_3__RA_Projection_DTP.csv b/ifrs17-template/Test/Data/IfrsVariableBenchmarks/BM_CH_2021_3__RA_Projection_DTP.csv new file mode 100644 index 00000000..bd955aa1 --- /dev/null +++ b/ifrs17-template/Test/Data/IfrsVariableBenchmarks/BM_CH_2021_3__RA_Projection_DTP.csv @@ -0,0 +1,35 @@ +@@Main,,,,,,,,,,, +Month,ReportingNode,Scenario,Year,,,,,,,, +3,CH,,2021,,,,,,,, +@@RA,,,,,,,,,,, +AccidentYear,AmountType,AocType,DataNode,EconomicBasis,EstimateType,Novelty,Values0,Values1,Values2,Values3,Values4 +,,AU,DTP1.1,C,RA,N,8.19198,7.45189,6.71087,5.96893,0 +,,BOP,DTP1.1,C,RA,I,29.96755,29.96755,29.96755,29.96755,59.68933 +,,BOP,DTP1.1,C,RA,N,35.72459,35.72459,35.72459,35.72459,0 +,,CF,DTP1.1,C,RA,I,-6,-12,-18,-24,-30 +,,CF,DTP1.1,C,RA,N,-0.75,-3,-5.25,-7.5,0 +,,EOP,DTP1.1,C,RA,C,81.91978,74.51887,67.10872,59.68933,29.91909 +,,EV,DTP1.1,C,RA,N,-16.38396,-14.90377,-13.42174,-11.93787,0 +,,IA,DTP1.1,C,RA,I,0.03486,0.06675,0.09565,0.12157,0.22976 +,,IA,DTP1.1,C,RA,N,0.03125,0.06097,0.08793,0.11211,0 +,,MC,DTP1.1,C,RA,I,41.81112,41.81112,41.81112,41.81112,0 +,,MC,DTP1.1,C,RA,N,-10.4299,-10.4299,-10.4299,-10.4299,0 +,,YCU,DTP1.1,C,RA,I,-0.27771,-0.23032,-0.18734,-0.14877,0 +,,AU,DTP1.1,L,RA,N,8.25,7.5,6.75,6,0 +,,BOP,DTP1.1,L,RA,I,30,30,30,30,60 +,,BOP,DTP1.1,L,RA,N,36,36,36,36,0 +,,CF,DTP1.1,L,RA,I,-6,-12,-18,-24,-30 +,,CF,DTP1.1,L,RA,N,-0.75,-3,-5.25,-7.5,0 +,,EOP,DTP1.1,L,RA,C,82.5,75,67.5,60,30 +,,EV,DTP1.1,L,RA,N,-16.5,-15,-13.5,-12,0 +,,MC,DTP1.1,L,RA,I,42,42,42,42,0 +,,MC,DTP1.1,L,RA,N,-10.5,-10.5,-10.5,-10.5,0 +,,AU,DTP1.1,N,RA,N,8.25,7.5,6.75,6,0 +,,BOP,DTP1.1,N,RA,I,30,30,30,30,60 +,,BOP,DTP1.1,N,RA,N,36,36,36,36,0 +,,CF,DTP1.1,N,RA,I,-6,-12,-18,-24,-30 +,,CF,DTP1.1,N,RA,N,-0.75,-3,-5.25,-7.5,0 +,,EOP,DTP1.1,N,RA,C,82.5,75,67.5,60,30 +,,EV,DTP1.1,N,RA,N,-16.5,-15,-13.5,-12,0 +,,MC,DTP1.1,N,RA,I,42,42,42,42,0 +,,MC,DTP1.1,N,RA,N,-10.5,-10.5,-10.5,-10.5,0 diff --git a/ifrs17-template/Test/IfrsVariablesTest.ipynb b/ifrs17-template/Test/IfrsVariablesTest.ipynb index 2aa378b8..c31cbbbf 100644 --- a/ifrs17-template/Test/IfrsVariablesTest.ipynb +++ b/ifrs17-template/Test/IfrsVariablesTest.ipynb @@ -408,7 +408,10 @@ "source": [ "var bmFilesTestProjection = new BenchmarkMetadata[]{", "\n // 2021 Q1", - "\n new BenchmarkMetadata(pathToBm+\"BM_CH_2021_3__BE_Projection_DTP.csv\" , \"CH\", 2021, 3)", + "\n new BenchmarkMetadata(pathToBm+\"BM_CH_2021_3__BE_Projection_DTP.csv\" , \"CH\", 2021, 3),", + "\n new BenchmarkMetadata(pathToBm+\"BM_CH_2021_3__RA_Projection_DTP.csv\" , \"CH\", 2021, 3),", + "\n new BenchmarkMetadata(pathToBm+\"BM_CH_2021_3__C_Projection_DTP.csv\" , \"CH\", 2021, 3),", + "\n new BenchmarkMetadata(pathToBm+\"BM_CH_2021_3__L_Projection_DTP.csv\" , \"CH\", 2021, 3)", "\n};" ], "metadata": {}, @@ -438,6 +441,7 @@ "\n .WithTarget(DataSource)", "\n .WithActivityLog()", "\n .ExecuteAsync();", + "\nProjectionCount = 1;", "\n(Activity1: activity1.Status, Errors1:activity1.Errors, Activity2:activity2.Status, Errors2:activity2.Errors)" ], "metadata": {}, @@ -464,19 +468,10 @@ "execution_count": 0, "outputs": [] }, - { - "cell_type": "markdown", - "source": [ - "### Reset" - ], - "metadata": {}, - "execution_count": 0, - "outputs": [] - }, { "cell_type": "code", "source": [ - "ProjectionCount = 1;" + "" ], "metadata": {}, "execution_count": 0, diff --git a/ifrs17/Import/1ImportScope-Identities.ipynb b/ifrs17/Import/1ImportScope-Identities.ipynb index d42e71cb..c20a14d0 100644 --- a/ifrs17/Import/1ImportScope-Identities.ipynb +++ b/ifrs17/Import/1ImportScope-Identities.ipynb @@ -155,11 +155,13 @@ "\n private IEnumerable ParsedIdentities => GetScope(Identity).Values.Select(aocStep => new ImportIdentity {AocType = aocStep.AocType, Novelty = aocStep.Novelty, DataNode = Identity});", "\n private IEnumerable rawVariableNovelties => GetStorage().GetRawVariables(Identity).Select(rv => rv.Novelty).Concat(Novelties.C.RepeatOnce()).ToHashSet();", "\n private IEnumerable calculatedAocSteps => GetStorage().AocConfigurationByAocStep.Values.Where(x => (x.DataType.Contains(DataType.Calculated) || x.DataType.Contains(DataType.CalculatedTelescopic) ) &&", - "\n (!isReinsurance ? !ComputationHelper.ReinsuranceAocType.Contains(x.AocType) : true) && rawVariableNovelties.Contains(x.Novelty) ).Select(x => new AocStep(x.AocType, x.Novelty));", - "\n private IEnumerable SpecialIdentities => calculatedAocSteps.Select(x => new ImportIdentity {AocType = x.AocType, Novelty = x.Novelty, DataNode = Identity })", - "\n .Concat(GetStorage().GetAllAocSteps(InputSource.Opening).Select(aocStep => new ImportIdentity {AocType = aocStep.AocType, Novelty = aocStep.Novelty, DataNode = Identity}));", + "\n (!isReinsurance ? !ComputationHelper.ReinsuranceAocType.Contains(x.AocType) : true) &&", + "\n rawVariableNovelties.Contains(x.Novelty)).Select(x => new AocStep(x.AocType, x.Novelty));", + "\n private IEnumerable specialIdentities => calculatedAocSteps.Select(x => new ImportIdentity {AocType = x.AocType, Novelty = x.Novelty, DataNode = Identity })", + "\n .Concat(GetStorage().GetAllAocSteps(InputSource.Opening).Select(aocStep => new ImportIdentity {AocType = aocStep.AocType, Novelty = aocStep.Novelty, DataNode = Identity}))", + "\n .Concat(GetStorage().AocConfigurationByAocStep.Values.Where(x => (!isReinsurance ? !ComputationHelper.ReinsuranceAocType.Contains(x.AocType) : true) && x.DataType.Contains(DataType.Calculated) && x.Novelty == Novelties.I).Select(aocStep => new ImportIdentity{AocType = aocStep.AocType, Novelty = aocStep.Novelty, DataNode = Identity}));", "\n", - "\n IEnumerable GetIdentities.allIdentities => ParsedIdentities.Concat(SpecialIdentities).Distinct(); ", + "\n IEnumerable GetIdentities.allIdentities => ParsedIdentities.Concat(specialIdentities).Distinct(); ", "\n}" ], "metadata": {}, @@ -360,20 +362,40 @@ "// The Reference AocStep from which the data (Nominal or PV) is retrieved to to compute the current AoC Step", "\npublic interface ReferenceAocStep : IScope", "\n{", - "\n private AocStep identityAocStep => new AocStep(Identity.AocType, Identity.Novelty);", + "\n static ApplicabilityBuilder ScopeApplicabilityBuilder(ApplicabilityBuilder builder) =>", + "\n builder.ForScope(s => s.WithApplicability(x => x.GetStorage().GetShift(x.Identity.ProjectionPeriod) >= MonthInAYear));", + "\n", + "\n protected AocStep identityAocStep => new AocStep(Identity.AocType, Identity.Novelty);", "\n", - "\n private IEnumerable referenceForCalculated => GetScope((Identity, InputSource.Cashflow)).Values", + "\n protected IEnumerable referenceForCalculated => GetScope((Identity, InputSource.Cashflow)).Values", "\n .GroupBy(g => g.Novelty, (g, val) => val.Last(aocStep => GetStorage().AocConfigurationByAocStep[aocStep].DataType != DataType.Calculated", "\n && GetStorage().AocConfigurationByAocStep[aocStep].DataType != DataType.CalculatedTelescopic));", - "\n private bool IsCalculatedAocStep => GetStorage().AocConfigurationByAocStep[identityAocStep].DataType == DataType.Calculated || GetStorage().AocConfigurationByAocStep[identityAocStep].DataType == DataType.CalculatedTelescopic;", - "\n private bool IsProjectionBopI => Identity.AocType == AocTypes.BOP && Identity.Novelty == Novelties.I && GetStorage().GetShift(Identity.ProjectionPeriod) >= MonthInAYear;", - "\n ", - "\n IEnumerable Values => ( IsCalculatedAocStep, ", - "\n ComputationHelper.ReferenceAocSteps.TryGetValue(identityAocStep, out IEnumerable CustomDefinedReferenceAocStep), //IsCustomDefined", - "\n IsProjectionBopI ) switch {", - "\n (true, false, _) => referenceForCalculated.Any(x => x.Novelty == Novelties.C) ? referenceForCalculated.Where(x => x.Novelty == Novelties.C) : referenceForCalculated,", - "\n (true, true, _) or (_, true, true)=> CustomDefinedReferenceAocStep,", - "\n (false, _, _) => identityAocStep.RepeatOnce(),", + "\n ", + "\n protected bool IsCalculatedAocStep => GetStorage().AocConfigurationByAocStep[identityAocStep].DataType == DataType.Calculated || GetStorage().AocConfigurationByAocStep[identityAocStep].DataType == DataType.CalculatedTelescopic;", + "\n", + "\n IEnumerable Values => (", + "\n IsCalculatedAocStep, ", + "\n ComputationHelper.ReferenceAocSteps.TryGetValue(identityAocStep, out var CustomDefinedReferenceAocStep) //IsCustomDefined", + "\n ) switch {", + "\n (true, false) => referenceForCalculated.Any(x => x.Novelty == Novelties.C) ? referenceForCalculated.Where(x => x.Novelty == Novelties.C) : referenceForCalculated,", + "\n (true, true) => CustomDefinedReferenceAocStep,", + "\n (false, _) => identityAocStep.RepeatOnce(),", + "\n };", + "\n}", + "\n", + "\npublic interface ReferenceAocStepForProjections : ReferenceAocStep", + "\n{", + "\n private bool IsInforce => Identity.Novelty == Novelties.I;", + "\n", + "\n IEnumerable ReferenceAocStep.Values => (", + "\n IsCalculatedAocStep, ", + "\n ComputationHelper.ReferenceAocSteps.TryGetValue(identityAocStep, out var CustomDefinedReferenceAocStep), //IsCustomDefined", + "\n IsInforce", + "\n ) switch {", + "\n (true, false, false) => referenceForCalculated.Any(x => x.Novelty == Novelties.C) ? referenceForCalculated.Where(x => x.Novelty == Novelties.C) : referenceForCalculated,", + "\n (true, false, true) or (false, false, true) => new []{new AocStep(AocTypes.CL, Novelties.C)},", + "\n (true, true, _) or (false, true, true) => CustomDefinedReferenceAocStep,", + "\n (false, true, false) or (false, false, false) => identityAocStep.RepeatOnce(),", "\n };", "\n}" ], diff --git a/ifrs17/Import/2ImportScope-PresentValue.ipynb b/ifrs17/Import/2ImportScope-PresentValue.ipynb index 7858b533..a0dbd8b7 100644 --- a/ifrs17/Import/2ImportScope-PresentValue.ipynb +++ b/ifrs17/Import/2ImportScope-PresentValue.ipynb @@ -164,15 +164,32 @@ "public interface NominalCashflow : IScope<(ImportIdentity Id, string AmountType, string EstimateType, int? AccidentYear), ImportStorage>", "\n{", "\n static ApplicabilityBuilder ScopeApplicabilityBuilder(ApplicabilityBuilder builder) =>", - "\n builder.ForScope(s => s.WithApplicability(x => x.GetStorage().GetCdr().Contains(x.Identity.AmountType) && x.Identity.Id.AocType == AocTypes.CF)", - "\n .WithApplicability(x => x.GetStorage().GetCdr().Contains(x.Identity.AmountType))", - "\n );", + "\n builder.ForScope(s => s", + "\n .WithApplicability(x =>", + "\n (x.Identity.Id.AocType != AocTypes.CL && x.Identity.Id.AocType != AocTypes.EOP) && // if it is NOT CL AND NOT EOP AND", + "\n x.Identity.Id.Novelty != Novelties.I && // if it is NOT inforce", + "\n x.GetStorage().GetShift(x.Identity.Id.ProjectionPeriod) >= MonthInAYear && // if it is projection > 1 Year AND", + "\n !(x.Identity.AccidentYear.HasValue && MonthInAYear * x.Identity.AccidentYear >= (MonthInAYear * x.GetStorage().CurrentReportingPeriod.Year + x.GetStorage().GetShift(x.Identity.Id.ProjectionPeriod))) // if it is (LRC OR LIC with AY < than projected FY)", + "\n )", + "\n .WithApplicability(x =>", + "\n x.Identity.Id.AocType == AocTypes.BOP && x.Identity.Id.Novelty == Novelties.I && // if it is BOP inforce AND", + "\n x.GetStorage().GetShift(x.Identity.Id.ProjectionPeriod) >= MonthInAYear && // if it is projection > 1 Year AND", + "\n (x.Identity.AccidentYear.HasValue && MonthInAYear * x.Identity.AccidentYear >= (MonthInAYear * x.GetStorage().CurrentReportingPeriod.Year + x.GetStorage().GetShift(x.Identity.Id.ProjectionPeriod))) // if it is (LIC AND AY is >= than projected FY)", + "\n )", + "\n .WithApplicability(x => x.GetStorage().GetCdr().Contains(x.Identity.AmountType) && x.Identity.Id.AocType == AocTypes.CF)", + "\n .WithApplicability(x => x.GetStorage().GetCdr().Contains(x.Identity.AmountType))", + "\n );", "\n", "\n IEnumerable referenceAocSteps => GetScope(Identity.Id).Values;", "\n double[] Values => referenceAocSteps.Select(refAocStep => GetStorage().GetValues(Identity.Id with {AocType = refAocStep.AocType, Novelty = refAocStep.Novelty}, Identity.AmountType, Identity.EstimateType, Identity.AccidentYear))", "\n .AggregateDoubleArray();", "\n}", "\n", + "\npublic interface EmptyNominalCashflow : NominalCashflow", + "\n{", + "\n double[] NominalCashflow.Values => Enumerable.Empty().ToArray();", + "\n}", + "\n", "\npublic interface CreditDefaultRiskNominalCashflow : NominalCashflow", "\n{", "\n private double[] NominalClaimsCashflow => referenceAocSteps.SelectMany(refAocStep =>", @@ -389,9 +406,10 @@ "\n private int shift => GetStorage().GetShift(Identity.Id.ProjectionPeriod);", "\n private int timeStep => GetStorage().GetTimeStep(Identity.Id.ProjectionPeriod);", "\n ", - "\n public double GetValueFromValues(double[] Values)", + "\n public double GetValueFromValues(double[] Values, string overrideValuationPeriod = null)", "\n {", - "\n return GetStorage().GetValuationPeriod(Identity.Id) switch {", + "\n var valuationPeriod = Enum.TryParse(overrideValuationPeriod, out ValuationPeriod ret) ? ret : GetStorage().GetValuationPeriod(Identity.Id);", + "\n return valuationPeriod switch {", "\n ValuationPeriod.BeginningOfPeriod => Values.ElementAtOrDefault(shift),", "\n ValuationPeriod.MidOfPeriod => Values.ElementAtOrDefault(shift + Convert.ToInt32(Math.Round(timeStep / 2d, MidpointRounding.AwayFromZero)) - 1),", "\n ValuationPeriod.Delta => Values.Skip(shift).Take(timeStep).Sum(),", @@ -613,7 +631,7 @@ "\n [IdentityProperty][NotVisible][Dimension(typeof(EstimateType))]", "\n string EstimateType => EstimateTypes.BE;", "\n ", - "\n private int?[] accidentYears => GetStorage().GetAccidentYears(Identity.DataNode).ToArray(); ", + "\n private int?[] accidentYears => GetStorage().GetAccidentYears(Identity.DataNode, Identity.ProjectionPeriod).ToArray(); ", "\n ", "\n [NotVisible]", "\n PresentValue[] PresentValues => GetScope(Identity.DataNode).BeAmountTypes", @@ -638,7 +656,7 @@ "\n [IdentityProperty][NotVisible][Dimension(typeof(EstimateType))]", "\n string EstimateType => EstimateTypes.BE;", "\n ", - "\n private int?[] accidentYears => GetStorage().GetAccidentYears(Identity.DataNode).ToArray();", + "\n private int?[] accidentYears => GetStorage().GetAccidentYears(Identity.DataNode, Identity.ProjectionPeriod).ToArray();", "\n ", "\n [NotVisible]", "\n PresentValue[] PresentValues => GetScope(Identity.DataNode).BeAmountTypes", @@ -672,7 +690,7 @@ "\n [IdentityProperty][NotVisible][Dimension(typeof(EstimateType))]", "\n string EstimateType => EstimateTypes.BE;", "\n ", - "\n private int?[] accidentYears => GetStorage().GetAccidentYears(Identity.DataNode).ToArray();", + "\n private int?[] accidentYears => GetStorage().GetAccidentYears(Identity.DataNode, Identity.ProjectionPeriod).ToArray();", "\n ", "\n [NotVisible]", "\n PresentValue[] PresentValues => GetScope(Identity.DataNode).BeAmountTypes", @@ -719,7 +737,7 @@ "\n [IdentityProperty][NotVisible][Dimension(typeof(EstimateType))]", "\n string EstimateType => EstimateTypes.RA;", "\n ", - "\n private int?[] accidentYears => GetStorage().GetAccidentYears(Identity.DataNode).ToArray(); ", + "\n private int?[] accidentYears => GetStorage().GetAccidentYears(Identity.DataNode, Identity.ProjectionPeriod).ToArray(); ", "\n ", "\n PresentValue[] PresentValues => accidentYears.Select(ay => GetScope((Identity, (string)null, EstimateType, ay), o => o.WithContext(EconomicBasis))).ToArray();", "\n ", @@ -741,7 +759,7 @@ "\n [IdentityProperty][NotVisible][Dimension(typeof(EstimateType))]", "\n string EstimateType => EstimateTypes.RA;", "\n ", - "\n private int?[] accidentYears => GetStorage().GetAccidentYears(Identity.DataNode).ToArray(); ", + "\n private int?[] accidentYears => GetStorage().GetAccidentYears(Identity.DataNode, Identity.ProjectionPeriod).ToArray(); ", "\n ", "\n PresentValue[] PresentValues => accidentYears.Select(ay => GetScope((Identity, (string)null, EstimateType, ay), o => o.WithContext(EconomicBasis))).ToArray(); ", "\n ", @@ -762,7 +780,7 @@ "\n [IdentityProperty][NotVisible][Dimension(typeof(EstimateType))]", "\n string EstimateType => EstimateTypes.RA;", "\n ", - "\n private int?[] accidentYears => GetStorage().GetAccidentYears(Identity.DataNode).ToArray();", + "\n private int?[] accidentYears => GetStorage().GetAccidentYears(Identity.DataNode, Identity.ProjectionPeriod).ToArray();", "\n ", "\n [NotVisible]", "\n PresentValue[] PresentValues => accidentYears.Select(ay => GetScope((Identity, (string)null, EstimateType, ay), o => o.WithContext(EconomicBasis))).ToArray();", diff --git a/ifrs17/Import/3ImportScope-Actuals.ipynb b/ifrs17/Import/3ImportScope-Actuals.ipynb index ed072c6a..893f184f 100644 --- a/ifrs17/Import/3ImportScope-Actuals.ipynb +++ b/ifrs17/Import/3ImportScope-Actuals.ipynb @@ -124,14 +124,10 @@ "public interface ActualBase : IScope<(ImportIdentity Id, string AmountType, string EstimateType, int? AccidentYear), ImportStorage>", "\n{", "\n static ApplicabilityBuilder ScopeApplicabilityBuilder(ApplicabilityBuilder builder) =>", - "\n builder.ForScope(s => s.WithApplicability(x => x.GetStorage().ImportFormat == ImportFormats.Actual ", - "\n && !x.GetStorage().IsSecondaryScope(x.Identity.Id.DataNode)", - "\n && x.Identity.Id.AocType == AocTypes.AM)", - "\n .WithApplicability(x => x.GetStorage().ImportFormat != ImportFormats.Cashflow ", - "\n && !x.GetStorage().IsSecondaryScope(x.Identity.Id.DataNode)", - "\n && x.Identity.Id.AocType == AocTypes.EOP ", - "\n && x.Identity.EstimateType != EstimateTypes.A)", - "\n );", + "\n builder.ForScope(s => s.WithApplicability(x => x.GetStorage().ImportFormat == ImportFormats.Actual && !x.GetStorage().IsSecondaryScope(x.Identity.Id.DataNode) && x.Identity.Id.AocType == AocTypes.AM)", + "\n .WithApplicability(x => x.GetStorage().ImportFormat != ImportFormats.Cashflow && !x.GetStorage().IsSecondaryScope(x.Identity.Id.DataNode) && x.Identity.Id.AocType == AocTypes.EOP && x.Identity.EstimateType != EstimateTypes.A)", + "\n .WithApplicability(x => !x.GetStorage().IsSecondaryScope(x.Identity.Id.DataNode) && x.Identity.Id.AocType == AocTypes.CF && x.Identity.Id.Novelty == Novelties.C && x.Identity.Id.ProjectionPeriod > 0 ));", + "\n", "\n public double Value => GetStorage().GetValue(Identity.Id, Identity.AmountType, Identity.EstimateType, Identity.AccidentYear, Identity.Id.ProjectionPeriod); ", "\n}", "\n", @@ -144,7 +140,22 @@ "\npublic interface EmptyValuesActual : ActualBase", "\n{", "\n double ActualBase.Value => 0;", - "\n}" + "\n}", + "\n", + "\n// Use if you want to have actuals equals to the expected Best Estimate cash flow releases", + "\npublic interface ActualEqualsExpected : ActualBase", + "\n{", + "\n double ActualBase.Value => GetStorage().GetNovelties(Identity.Id.AocType, InputSource.Cashflow).Sum(novelty => ", + "\n GetScope((Identity.Id with {AocType = AocTypes.CF, Novelty = novelty}, Identity.AmountType, EstimateTypes.BE, Identity.AccidentYear), o => o.WithContext(EconomicBases.C)).Value);", + "\n}", + "\n", + "\n// Use if you want to have actuals calculated according to an expected paid pattern (PCE - Paid Cash Estimate - estimate type needs to be added)", + "\n// public interface ActualsFromPaymentPattern : ActualBase, IWithGetValueFromValues", + "\n// {", + "\n// double ActualBase.Value => GetValueFromValues(", + "\n// GetStorage().GetValues(Identity.Id with {AocType = AocTypes.CL, Novelty = Novelties.C}, Identity.AmountType, EstimateTypes.PCE, Identity.AccidentYear),", + "\n// ValuationPeriod.Delta.ToString());", + "\n// }" ], "metadata": {}, "execution_count": 0, @@ -173,7 +184,7 @@ "\n [IdentityProperty][NotVisible][Dimension(typeof(EstimateType))]", "\n string EstimateType => EstimateTypes.A;", "\n ", - "\n private int?[] accidentYears => GetStorage().GetAccidentYears(Identity.DataNode).ToArray();", + "\n private int?[] accidentYears => GetStorage().GetAccidentYears(Identity.DataNode, Identity.ProjectionPeriod).ToArray();", "\n ", "\n [NotVisible]", "\n ActualBase[] Actuals => GetScope(Identity.DataNode).ActualAmountTypes", @@ -213,7 +224,7 @@ "\n [IdentityProperty][NotVisible][Dimension(typeof(EstimateType))]", "\n string EstimateType => EstimateTypes.AA;", "\n ", - "\n private int?[] accidentYears => GetStorage().GetAccidentYears(Identity.DataNode).ToArray();", + "\n private int?[] accidentYears => GetStorage().GetAccidentYears(Identity.DataNode, Identity.ProjectionPeriod).ToArray();", "\n ", "\n [NotVisible]", "\n ActualBase[] Actuals => GetScope(Identity.DataNode).ActualAmountTypes", @@ -255,7 +266,7 @@ "\n [IdentityProperty][NotVisible][Dimension(typeof(EstimateType))]", "\n string EstimateType => EstimateTypes.OA;", "\n ", - "\n private int?[] accidentYears => GetStorage().GetAccidentYears(Identity.DataNode).ToArray();", + "\n private int?[] accidentYears => GetStorage().GetAccidentYears(Identity.DataNode, Identity.ProjectionPeriod).ToArray();", "\n ", "\n [NotVisible]", "\n ActualBase[] Actuals => GetScope(Identity.DataNode).ActualAmountTypes", @@ -413,12 +424,12 @@ "\n{", "\n static ApplicabilityBuilder ScopeApplicabilityBuilder(ApplicabilityBuilder builder) =>", "\n builder.ForScope(s => s //compute with IfrsVariable?", - "\n //.WithApplicability(x => x.Identity.AocType == AocTypes.BOP && x.Identity.Novelty == Novelties.I && x.Identity.ProjectionPeriod > 0)", - "\n .WithApplicability(x => x.Identity.AocType == AocTypes.BOP && x.Identity.Novelty == Novelties.I)", + "\n .WithApplicability(x => x.Identity.AocType == AocTypes.BOP && x.Identity.Novelty == Novelties.I && x.Identity.ProjectionPeriod > 0)", + "\n .WithApplicability(x => x.Identity.AocType == AocTypes.BOP && x.Identity.Novelty == Novelties.I)", "\n .WithApplicability(x => x.Identity.AocType == AocTypes.CF)", "\n .WithApplicability(x => x.Identity.AocType == AocTypes.EA)", "\n .WithApplicability(x => x.Identity.AocType == AocTypes.AM)", - "\n .WithApplicability(x => x.Identity.AocType == AocTypes.EOP)", + "\n .WithApplicability(x => x.Identity.AocType == AocTypes.EOP)", "\n );", "\n [IdentityProperty][NotVisible][Dimension(typeof(EstimateType))]", "\n string EstimateType => EstimateTypes.DA;", @@ -430,7 +441,11 @@ "\n GetScope((Identity, at, EstimateTypes.BE, (int?)null), o => o.WithContext(EconomicBasis)).Value);", "\n}", "\n", - "\npublic interface DeferrableForBOP : DiscountedDeferrable {", + "\npublic interface DeferrableForBopProjection : DiscountedDeferrable {", + "\n double DiscountedDeferrable.Value => GetScope(Identity with {AocType = AocTypes.EOP, Novelty = Novelties.C, ProjectionPeriod = Identity.ProjectionPeriod - 1}).Value; ", + "\n}", + "\n", + "\npublic interface DeferrableForBop : DiscountedDeferrable {", "\n double DiscountedDeferrable.Value => GetStorage().GetValue(Identity, null, EstimateTypes.DA, EconomicBasis, (int?)null, Identity.ProjectionPeriod);", "\n}", "\n", @@ -453,7 +468,7 @@ "\n double DiscountedDeferrable.Value => Math.Abs(AggregatedValue) > Precision ? -1d * AggregatedValue * AmortizationFactor : default;", "\n}", "\n", - "\npublic interface DeferrableEoP : DiscountedDeferrable {", + "\npublic interface DeferrableEop : DiscountedDeferrable {", "\n double DiscountedDeferrable.Value => GetScope((Identity, InputSource.Cashflow)).Values", "\n .Sum(aocStep => GetScope(Identity with {AocType = aocStep.AocType, Novelty = aocStep.Novelty}).Value);", "\n}" diff --git a/ifrs17/Import/ImportStorage.ipynb b/ifrs17/Import/ImportStorage.ipynb index 6077aeed..822e0ce0 100644 --- a/ifrs17/Import/ImportStorage.ipynb +++ b/ifrs17/Import/ImportStorage.ipynb @@ -257,7 +257,7 @@ "\n PreviousPeriodPartition = (await querySource.Query()", "\n .Where(p => p.ReportingNode == args.ReportingNode && p.Year == PreviousReportingPeriod.Year ", "\n && p.Month == PreviousReportingPeriod.Month && p.Scenario == null).ToArrayAsync()).SingleOrDefault()?.Id ?? ", - "\n (Guid)ApplicationMessage.Log(Error.MissingPreviousPeriodData, PreviousReportingPeriod.Year.ToString(), PreviousReportingPeriod.Month.ToString(), string.Join(\"\",allImportScopesNotAtInceptionYear));", + "\n (Guid)ApplicationMessage.Log(Error.MissingPreviousPeriodData, PreviousReportingPeriod.Year.ToString(), PreviousReportingPeriod.Month.ToString(), string.Join(string.Empty, allImportScopesNotAtInceptionYear));", "\n ", "\n await querySource.Partition.SetAsync(PreviousPeriodPartition);", "\n ", @@ -372,7 +372,7 @@ "\n public IEnumerable GetNovelties(string aocType, InputSource inputSource) => GetNoveltiesForAocType(aocType, aocStepByInputSource[inputSource]);", "\n ", "\n //Accident years", - "\n public IEnumerable GetAccidentYears(string dataNode) => AccidentYearsByDataNode.TryGetValue(dataNode, out var accidentYear) ? accidentYear : new int?[] { null };", + "\n public IEnumerable GetAccidentYears(string dataNode, int projectionPeriod) => AccidentYearsByDataNode.TryGetValue(dataNode, out var accidentYear) ? accidentYear.Where(ay => MonthInAYear * ay <= (MonthInAYear * args.Year + GetShift(projectionPeriod)) || ay == default).ToHashSet() : new int?[] { default };", "\n ", "\n //Parameters", "\n public double GetNonPerformanceRiskRate (ImportIdentity identity, string cdrBasis)", diff --git a/ifrs17/Test/AocStructureTest.ipynb b/ifrs17/Test/AocStructureTest.ipynb index dd4af5a9..eede1333 100644 --- a/ifrs17/Test/AocStructureTest.ipynb +++ b/ifrs17/Test/AocStructureTest.ipynb @@ -1355,35 +1355,37 @@ "\n {new AocStep(\"AM\",\"C\"), new AocStep[]{new AocStep(\"CL\",\"C\") }},", "\n {new AocStep(\"EOP\",\"C\"), new AocStep[]{new AocStep(\"CL\",\"C\") }},", "\n {new AocStep(\"CF\",\"C\") , new AocStep[]{new AocStep(\"CF\",\"C\") }},", + "\n {new AocStep(\"CF\",\"I\") , new AocStep[]{new AocStep(\"BOP\",\"I\") }},", "\n {new AocStep(\"IA\",\"I\") , new AocStep[]{new AocStep(\"BOP\",\"I\") }},", "\n {new AocStep(\"BOP\",\"I\"), new AocStep[]{new AocStep(\"BOP\",\"I\") }},", "\n };", "\nvar fullAocBm = new Dictionary>()", "\n {", "\n //{new AocStep(\"BOP\",\"N\"), Enumerable.Empty()},", - "\n {new AocStep(\"IA\",\"I\"), new AocStep[]{new AocStep(\"BOP\",\"I\"),}},", + "\n {new AocStep(\"CF\",\"I\"), new AocStep[]{new AocStep(\"BOP\",\"I\"),}},", + "\n {new AocStep(\"IA\",\"I\"), new AocStep[]{new AocStep(\"BOP\",\"I\"),new AocStep(\"CF\",\"I\")}},", "\n {new AocStep(\"CF\",\"N\"), new AocStep[]{new AocStep(\"BOP\",\"N\")}},", "\n {new AocStep(\"IA\",\"N\"), new AocStep[]{new AocStep(\"BOP\",\"N\"), new AocStep(\"CF\",\"N\")}},", "\n ", - "\n {new AocStep(\"YCU\",\"C\"), new AocStep[]{new AocStep(\"BOP\",\"I\"),new AocStep(\"IA\",\"I\"),", + "\n {new AocStep(\"YCU\",\"C\"), new AocStep[]{new AocStep(\"BOP\",\"I\"),new AocStep(\"CF\",\"I\"),new AocStep(\"IA\",\"I\"),", "\n new AocStep(\"BOP\",\"N\"), new AocStep(\"CF\",\"N\"), new AocStep(\"IA\",\"N\"),", "\n }},", - "\n {new AocStep(\"EV\",\"C\"), new AocStep[]{new AocStep(\"BOP\",\"I\"),new AocStep(\"IA\",\"I\"),", + "\n {new AocStep(\"EV\",\"C\"), new AocStep[]{new AocStep(\"BOP\",\"I\"),new AocStep(\"CF\",\"I\"),new AocStep(\"IA\",\"I\"),", "\n new AocStep(\"BOP\",\"N\"), new AocStep(\"CF\",\"N\"), new AocStep(\"IA\",\"N\"), ", "\n new AocStep(\"YCU\",\"C\"),", "\n }},", - "\n {new AocStep(\"CL\",\"C\"), new AocStep[]{new AocStep(\"BOP\",\"I\"),new AocStep(\"IA\",\"I\"),", + "\n {new AocStep(\"CL\",\"C\"), new AocStep[]{new AocStep(\"BOP\",\"I\"),new AocStep(\"CF\",\"I\"),new AocStep(\"IA\",\"I\"),", "\n new AocStep(\"BOP\",\"N\"), new AocStep(\"CF\",\"N\"), new AocStep(\"IA\",\"N\"), ", "\n new AocStep(\"YCU\",\"C\"), new AocStep(\"EV\",\"C\")", "\n }}, ", - "\n {new AocStep(\"CF\",\"C\"), new AocStep[]{new AocStep(\"BOP\",\"I\"),new AocStep(\"IA\",\"I\"),", + "\n {new AocStep(\"CF\",\"C\"), new AocStep[]{new AocStep(\"BOP\",\"I\"),new AocStep(\"CF\",\"I\"),new AocStep(\"IA\",\"I\"),", "\n new AocStep(\"BOP\",\"N\"), new AocStep(\"CF\",\"N\"), new AocStep(\"IA\",\"N\"),", "\n new AocStep(\"YCU\",\"C\"), new AocStep(\"EV\",\"C\"), new AocStep(\"CL\",\"C\") }},", - "\n {new AocStep(\"AM\",\"C\"), new AocStep[]{new AocStep(\"BOP\",\"I\"),new AocStep(\"IA\",\"I\"),", + "\n {new AocStep(\"AM\",\"C\"), new AocStep[]{new AocStep(\"BOP\",\"I\"),new AocStep(\"CF\",\"I\"),new AocStep(\"IA\",\"I\"),", "\n new AocStep(\"BOP\",\"N\"), new AocStep(\"CF\",\"N\"), new AocStep(\"IA\",\"N\"), ", "\n new AocStep(\"CF\",\"C\"), new AocStep(\"YCU\",\"C\"), new AocStep(\"EV\",\"C\"), new AocStep(\"CL\",\"C\")", "\n }}, ", - "\n {new AocStep(\"EOP\",\"C\"), new AocStep[]{new AocStep(\"BOP\",\"I\"),new AocStep(\"IA\",\"I\"),", + "\n {new AocStep(\"EOP\",\"C\"), new AocStep[]{new AocStep(\"BOP\",\"I\"),new AocStep(\"CF\",\"I\"),new AocStep(\"IA\",\"I\"),", "\n new AocStep(\"BOP\",\"N\"), new AocStep(\"CF\",\"N\"), new AocStep(\"IA\",\"N\"), ", "\n new AocStep(\"CF\",\"C\"), new AocStep(\"YCU\",\"C\"), new AocStep(\"EV\",\"C\"), new AocStep(\"CL\",\"C\"), new AocStep(\"AM\",\"C\"),", "\n }}, ", @@ -1458,38 +1460,40 @@ "\n {new AocStep(\"AM\",\"C\"), new AocStep[]{new AocStep(\"CL\",\"C\") }},", "\n {new AocStep(\"EOP\",\"C\"), new AocStep[]{new AocStep(\"CL\",\"C\") }},", "\n {new AocStep(\"CF\",\"C\") , new AocStep[]{new AocStep(\"CF\",\"C\") }},", + "\n {new AocStep(\"CF\",\"I\") , new AocStep[]{new AocStep(\"BOP\",\"I\") }},", "\n {new AocStep(\"IA\",\"I\") , new AocStep[]{new AocStep(\"BOP\",\"I\") }},", "\n {new AocStep(\"BOP\",\"I\"), new AocStep[]{new AocStep(\"BOP\",\"I\") }},", "\n };", "\nvar fullAocBm = new Dictionary>()", "\n {", "\n //{new AocStep(\"BOP\",\"N\"), Enumerable.Empty()},", - "\n {new AocStep(\"IA\",\"I\"), new AocStep[]{new AocStep(\"BOP\",\"I\"),}},", + "\n {new AocStep(\"CF\",\"I\"), new AocStep[]{new AocStep(\"BOP\",\"I\"),}},", + "\n {new AocStep(\"IA\",\"I\"), new AocStep[]{new AocStep(\"BOP\",\"I\"),new AocStep(\"CF\",\"I\")}},", "\n {new AocStep(\"CF\",\"N\"), new AocStep[]{new AocStep(\"BOP\",\"N\")}},", "\n {new AocStep(\"IA\",\"N\"), new AocStep[]{new AocStep(\"BOP\",\"N\"), new AocStep(\"CF\",\"N\")}},", "\n ", - "\n {new AocStep(\"AU\",\"C\"), new AocStep[]{new AocStep(\"BOP\",\"I\"),new AocStep(\"IA\",\"I\"),", + "\n {new AocStep(\"AU\",\"C\"), new AocStep[]{new AocStep(\"BOP\",\"I\"),new AocStep(\"CF\",\"I\"),new AocStep(\"IA\",\"I\"),", "\n new AocStep(\"BOP\",\"N\"), new AocStep(\"CF\",\"N\"), new AocStep(\"IA\",\"N\"),", "\n }},", - "\n {new AocStep(\"YCU\",\"C\"), new AocStep[]{new AocStep(\"BOP\",\"I\"),new AocStep(\"IA\",\"I\"),", + "\n {new AocStep(\"YCU\",\"C\"), new AocStep[]{new AocStep(\"BOP\",\"I\"),new AocStep(\"CF\",\"I\"),new AocStep(\"IA\",\"I\"),", "\n new AocStep(\"BOP\",\"N\"), new AocStep(\"CF\",\"N\"), new AocStep(\"IA\",\"N\"),", "\n new AocStep(\"AU\",\"C\"),}},", - "\n {new AocStep(\"EV\",\"C\"), new AocStep[]{new AocStep(\"BOP\",\"I\"),new AocStep(\"IA\",\"I\"),", + "\n {new AocStep(\"EV\",\"C\"), new AocStep[]{new AocStep(\"BOP\",\"I\"),new AocStep(\"CF\",\"I\"),new AocStep(\"IA\",\"I\"),", "\n new AocStep(\"BOP\",\"N\"), new AocStep(\"CF\",\"N\"), new AocStep(\"IA\",\"N\"), ", "\n new AocStep(\"AU\",\"C\"),new AocStep(\"YCU\",\"C\"),", "\n }},", - "\n {new AocStep(\"CL\",\"C\"), new AocStep[]{new AocStep(\"BOP\",\"I\"),new AocStep(\"IA\",\"I\"),", + "\n {new AocStep(\"CL\",\"C\"), new AocStep[]{new AocStep(\"BOP\",\"I\"),new AocStep(\"CF\",\"I\"),new AocStep(\"IA\",\"I\"),", "\n new AocStep(\"BOP\",\"N\"), new AocStep(\"CF\",\"N\"), new AocStep(\"IA\",\"N\"), ", "\n new AocStep(\"AU\",\"C\"),new AocStep(\"YCU\",\"C\"), new AocStep(\"EV\",\"C\")", "\n }}, ", - "\n {new AocStep(\"CF\",\"C\"), new AocStep[]{new AocStep(\"BOP\",\"I\"),new AocStep(\"IA\",\"I\"),", + "\n {new AocStep(\"CF\",\"C\"), new AocStep[]{new AocStep(\"BOP\",\"I\"),new AocStep(\"CF\",\"I\"),new AocStep(\"IA\",\"I\"),", "\n new AocStep(\"BOP\",\"N\"), new AocStep(\"CF\",\"N\"), new AocStep(\"IA\",\"N\"),", "\n new AocStep(\"AU\",\"C\"),new AocStep(\"YCU\",\"C\"), new AocStep(\"EV\",\"C\"), new AocStep(\"CL\",\"C\") }},", - "\n {new AocStep(\"AM\",\"C\"), new AocStep[]{new AocStep(\"BOP\",\"I\"),new AocStep(\"IA\",\"I\"),", + "\n {new AocStep(\"AM\",\"C\"), new AocStep[]{new AocStep(\"BOP\",\"I\"),new AocStep(\"CF\",\"I\"),new AocStep(\"IA\",\"I\"),", "\n new AocStep(\"BOP\",\"N\"), new AocStep(\"CF\",\"N\"), new AocStep(\"IA\",\"N\"), ", "\n new AocStep(\"AU\",\"C\"),new AocStep(\"CF\",\"C\"), new AocStep(\"YCU\",\"C\"), new AocStep(\"EV\",\"C\"), new AocStep(\"CL\",\"C\")", "\n }}, ", - "\n {new AocStep(\"EOP\",\"C\"), new AocStep[]{new AocStep(\"BOP\",\"I\"),new AocStep(\"IA\",\"I\"),", + "\n {new AocStep(\"EOP\",\"C\"), new AocStep[]{new AocStep(\"BOP\",\"I\"),new AocStep(\"CF\",\"I\"),new AocStep(\"IA\",\"I\"),", "\n new AocStep(\"BOP\",\"N\"), new AocStep(\"CF\",\"N\"), new AocStep(\"IA\",\"N\"), ", "\n new AocStep(\"AU\",\"C\"),new AocStep(\"CF\",\"C\"), new AocStep(\"YCU\",\"C\"), new AocStep(\"EV\",\"C\"), new AocStep(\"CL\",\"C\"), new AocStep(\"AM\",\"C\"),", "\n }}, ", diff --git a/ifrs17/Utils/ImportCalculationMethods.ipynb b/ifrs17/Utils/ImportCalculationMethods.ipynb index e6daa007..c1635261 100644 --- a/ifrs17/Utils/ImportCalculationMethods.ipynb +++ b/ifrs17/Utils/ImportCalculationMethods.ipynb @@ -408,14 +408,14 @@ "public static class ComputationHelper{", "\n public static HashSet AocStepWithNoPv = new AocStep[]{new AocStep(AocTypes.EA, Novelties.C), new AocStep(AocTypes.AM, Novelties.C), new AocStep(AocTypes.RCU, Novelties.I),}.ToHashSet();", "\n public static HashSet AocStepWithNoCsm = new AocStep[]{new AocStep(AocTypes.CF, Novelties.C),new AocStep(AocTypes.WO, Novelties.C)}.ToHashSet();", - "\n public static Dictionary> ReferenceAocSteps => new Dictionary>()", - "\n {", - "\n {new AocStep(AocTypes.EA ,Novelties.C), new AocStep[]{new AocStep(AocTypes.CF,Novelties.C)}},", - "\n {new AocStep(AocTypes.AM ,Novelties.C), new AocStep[]{new AocStep(AocTypes.CL,Novelties.C)}}, ", - "\n {new AocStep(AocTypes.EOP ,Novelties.C), new AocStep[]{new AocStep(AocTypes.CL,Novelties.C)}}, ", - "\n {new AocStep(AocTypes.BOP ,Novelties.I), new AocStep[]{new AocStep(AocTypes.CL,Novelties.C)}},//for projections", - "\n };", "\n public static HashSet ReinsuranceAocType = new []{AocTypes.CRU, AocTypes.RCU}.ToHashSet();", + "\n ", + "\n public static Dictionary> ReferenceAocSteps => new ()", + "\n {", + "\n {new AocStep(AocTypes.EA, Novelties.C), new []{new AocStep(AocTypes.CF, Novelties.C)}},", + "\n {new AocStep(AocTypes.AM, Novelties.C), new []{new AocStep(AocTypes.CL, Novelties.C)}},", + "\n {new AocStep(AocTypes.EOP, Novelties.C), new []{new AocStep(AocTypes.CL, Novelties.C)}}, ", + "\n }; ", "\n} " ], "metadata": {},