diff --git a/ifrs17-template/Files/DataNodes/DataNodeParameters_ES_2020_12.csv b/ifrs17-template/Files/DataNodes/DataNodeParameters_ES_2020_12.csv new file mode 100644 index 00000000..e3bf89c8 --- /dev/null +++ b/ifrs17-template/Files/DataNodes/DataNodeParameters_ES_2020_12.csv @@ -0,0 +1,18 @@ +@@Main,, +ReportingNode,Year,Month +ES,2020,12 +,, +@@SingleDataNodeParameter,, +DataNode,PremiumAllocation, +3BBBA.0,1, +3BPAA.0,1, +3BBBA.1,1, +3BPAA.1,1, +3BBBA.2,1, +3BPAA.2,1, +3BBBA.3,1, +3BPAA.3,1, +3BBBA.4,1, +3BPAA.4,1, +3BBBA.5,1, +3BPAA.5,1, diff --git a/ifrs17-template/Files/DataNodes/DataNodeParameters_FR_2020_12.csv b/ifrs17-template/Files/DataNodes/DataNodeParameters_FR_2020_12.csv new file mode 100644 index 00000000..f02f1b4e --- /dev/null +++ b/ifrs17-template/Files/DataNodes/DataNodeParameters_FR_2020_12.csv @@ -0,0 +1,23 @@ +@@Main,, +ReportingNode,Year,Month +FR,2020,12 +,, +@@SingleDataNodeParameter,, +DataNode,PremiumAllocation, +EY52BBA.1,1, +EY52PPA.1,1, +EY57G.1,1, +EY58G.1,1, +EY58G.2,1, +EY59G.1,1, +EY59G.2,1, +EY63G.1,1, +,, +@@InterDataNodeParameter,, +DataNode,LinkedDataNode,ReinsuranceCoverage +EY57G.1,EY57R.1,0.3 +EY58G.1,EY58R.1,0.3 +EY58G.2,EY58R.1,0.3 +EY59G.1,EY59R.1,0.3 +EY59G.2,EY59R.2,0.3 +EY63G.1,EY63R.1,0.5 diff --git a/ifrs17-template/Files/DataNodes/DataNodeStates_ES_2020_12.csv b/ifrs17-template/Files/DataNodes/DataNodeStates_ES_2020_12.csv new file mode 100644 index 00000000..4930276e --- /dev/null +++ b/ifrs17-template/Files/DataNodes/DataNodeStates_ES_2020_12.csv @@ -0,0 +1,18 @@ +@@Main,, +ReportingNode,Year,Month +ES,2020,12 +,, +@@DataNodeState,, +DataNode,State, +3BBBA.0,Active, +3BPAA.0,Active, +3BBBA.1,Active, +3BPAA.1,Active, +3BBBA.2,Active, +3BPAA.2,Active, +3BBBA.3,Active, +3BPAA.3,Active, +3BBBA.4,Active, +3BPAA.4,Active, +3BBBA.5,Active, +3BPAA.5,Active, diff --git a/ifrs17-template/Files/DataNodes/DataNodeStates_FR_2020_12.csv b/ifrs17-template/Files/DataNodes/DataNodeStates_FR_2020_12.csv new file mode 100644 index 00000000..61536920 --- /dev/null +++ b/ifrs17-template/Files/DataNodes/DataNodeStates_FR_2020_12.csv @@ -0,0 +1,19 @@ +@@Main,, +ReportingNode,Year,Month +FR,2020,12 +,, +@@DataNodeState,, +DataNode,State, +EY52BBA.1,Active, +EY52PPA.1,Active, +EY57G.1,Active, +EY57R.1,Active, +EY58G.1,Active, +EY58G.2,Active, +EY58R.1,Active, +EY63G.1,Active, +EY59G.1,Active, +EY59G.2,Active, +EY59R.1,Active, +EY59R.2,Active, +EY63R.1,Active, diff --git a/ifrs17-template/Files/DataNodes/DataNodes_ES.csv b/ifrs17-template/Files/DataNodes/DataNodes_ES.csv new file mode 100644 index 00000000..2115f6be --- /dev/null +++ b/ifrs17-template/Files/DataNodes/DataNodes_ES.csv @@ -0,0 +1,23 @@ +@@Main,,,,,, +ReportingNode,,,,,, +ES,,,,,, +,,,,,, +@@InsurancePortfolio,,,,,, +SystemName,DisplayName,ContractualCurrency,LineOfBusiness,ValuationApproach,OciType, +3BBBA,BBA,EUR,MOT,BBA,Default, +3BPAA,PAA,EUR,MOT,PAA,Default, +,,,,,, +@@GroupOfInsuranceContract,,,,,, +SystemName,DisplayName,InsurancePortfolio,AnnualCohort,LiabilityType,Profitability,YieldCurveName +3BBBA.0,0 BBA,3BBBA,2020,LRC,P,3PCT +3BPAA.0,0 PAA,3BPAA,2020,LRC,P,3PCT +3BBBA.1,1 BBA,3BBBA,2020,LRC,P,NoDiscount +3BPAA.1,1 PAA,3BPAA,2020,LRC,P,NoDiscount +3BBBA.2,2 BBA,3BBBA,2020,LRC,P,NoDiscount +3BPAA.2,2 PAA,3BPAA,2020,LRC,P,NoDiscount +3BBBA.3,3 BBA,3BBBA,2020,LRC,P,NoDiscount +3BPAA.3,3 PAA,3BPAA,2020,LRC,P,NoDiscount +3BBBA.4,4 BBA,3BBBA,2020,LRC,P,NoDiscount +3BPAA.4,4 PAA,3BPAA,2020,LRC,P,NoDiscount +3BBBA.5,5 BBA,3BBBA,2020,LRC,P,NoDiscount +3BPAA.5,5 PAA,3BPAA,2020,LRC,P,NoDiscount diff --git a/ifrs17-template/Files/DataNodes/DataNodes_FR.csv b/ifrs17-template/Files/DataNodes/DataNodes_FR.csv new file mode 100644 index 00000000..101878c1 --- /dev/null +++ b/ifrs17-template/Files/DataNodes/DataNodes_FR.csv @@ -0,0 +1,38 @@ +@@Main,,,,,, +ReportingNode,,,,,, +FR,,,,,, +,,,,,, +@@InsurancePortfolio,,,,,, +SystemName,DisplayName,ContractualCurrency,LineOfBusiness,ValuationApproach,OciType, +EY52BBA,52 BBA,EUR,MOT,BBA,, +EY52PPA,52 PAA,EUR,MOT,PAA,, +EY57G,57 Gross,EUR,MOT,BBA,, +EY58G,58 Gross,EUR,MOT,BBA,, +EY59G,59 Gross,EUR,MOT,BBA,, +EY63G,63 Gross,EUR,MOT,BBA,, +,,,,,, +@@GroupOfInsuranceContract,,,,,, +SystemName,DisplayName,InsurancePortfolio,AnnualCohort,LiabilityType,Profitability,YieldCurveName +EY52BBA.1,52 BBA,EY52BBA,2020,LRC,P,NoDiscount +EY52PPA.1,52 PAA,EY52PPA,2020,LRC,P,NoDiscount +EY57G.1,57 Gross Profitable,EY57G,2020,LRC,P,NoDiscount +EY58G.1,58 Gross Profitable,EY58G,2020,LRC,P,NoDiscount +EY58G.2,58 Gross Onerous,EY58G,2020,LRC,O,NoDiscount +EY59G.1,59 Gross Example A,EY59G,2019,LRC,P,NoDiscount +EY59G.2,59 Gross Example B,EY59G,2019,LRC,P,NoDiscount +EY63G.1,63 Gross,EY63G,2019,LIC,U,NoDiscount +,,,,,, +@@ReinsurancePortfolio,,,,,, +SystemName,DisplayName,ContractualCurrency,LineOfBusiness,ValuationApproach,OciType, +EY57R,57 Reinsurance,EUR,MOT,BBA,, +EY58R,58 Reinsurance,EUR,MOT,BBA,, +EY59R,59 Reinsurance,EUR,MOT,BBA,, +EY63R,63 Reinsurance,EUR,MOT,BBA,, +,,,,,, +@@GroupOfReinsuranceContract,,,,,, +SystemName,DisplayName,ReinsurancePortfolio,AnnualCohort,LiabilityType,Profitability,Partner +EY57R.1,57 Reinsurance,EY57R,2020,LRC,P,PTI +EY58R.1,58 Reinsurance ,EY58R,2020,LRC,P,PTI +EY59R.1,59 Reinsurance Example A,EY59R,2019,LRC,P,PTI +EY59R.2,59 Reinsurance Example B,EY59R,2019,LRC,P,PTI +EY63R.1,63 Reinsurance ,EY63R,2020,LRC,P,PTI diff --git a/ifrs17-template/Files/Dimensions.csv b/ifrs17-template/Files/Dimensions.csv index 85a30f1d..783a3a3c 100644 --- a/ifrs17-template/Files/Dimensions.csv +++ b/ifrs17-template/Files/Dimensions.csv @@ -8,13 +8,13 @@ CDR,Credit Default Risk,CL,50,EndOfPeriod,,,,,,, CE,Claim Expenses,CL,200,EndOfPeriod,,,,,,, ALE,Allocated Loss Adjustment Expenses,CE,210,EndOfPeriod,,,,,,, ULE,Unallocated Loss Adjustment Expenses,CE,220,EndOfPeriod,,,,,,, -AE,Attributable Expenses,,80,BeginningOfPeriod,,,,,,, +AE,Attributable Expenses,,80,EndOfPeriod,,,,,,, AEA,Aquisition,AE,90,BeginningOfPeriod,,,,,,, -AEM,Maintenance,AE,100,BeginningOfPeriod,,,,,,, +AEM,Maintenance,AE,100,EndOfPeriod,,,,,,, NE,Non Attributable Expenses,,110,BeginningOfPeriod,,,,,,, AC,Attributable Commission,,120,BeginningOfPeriod,,,,,,, ACA,Aquisition,AC,130,BeginningOfPeriod,,,,,,, -ACM,Maitenance,AC,140,BeginningOfPeriod,,,,,,, +ACM,Maitenance,AC,140,EndOfPeriod,,,,,,, ,,,,,,,,,,, @@DeferrableAmountType,,,,,,,,,,, SystemName,DisplayName,Parent,Order,PeriodType,,,,,,, @@ -163,6 +163,7 @@ Default,Default,,,,,,,,,, @@Partner,,,,,,,,,,, SystemName,DisplayName,,,,,,,,,, PT1,Partner1,,,,,,,,,, +PTI,Internal Partner,,,,,,,,,, ,,,,,,,,,,, @@BsVariableType,,,,,,,,,,, SystemName,DisplayName,Parent,Order,,,,,,,, @@ -234,6 +235,7 @@ LICDW10pct,Lic Down 10pct,,,,,,,,,, @@ValuationApproach,,,,,,,,,,, SystemName,DisplayName,,,,,,,,,, BBA,Building Block Approach,,,,,,,,,, +PAA,Premium Allocation Approach,,,,,,,,,, ,,,,,,,,,,, @@ProjectionConfiguration,,,,,,,,,,, SystemName,DisplayName,Shift,TimeStep,,,,,,,, diff --git a/ifrs17-template/Files/Parameters/CreditDefaultRate.csv b/ifrs17-template/Files/Parameters/CreditDefaultRate.csv index b39c644e..4d754ae8 100644 --- a/ifrs17-template/Files/Parameters/CreditDefaultRate.csv +++ b/ifrs17-template/Files/Parameters/CreditDefaultRate.csv @@ -21,3 +21,4 @@ Year,Month,CreditRiskRating,Values0 1900,12,CCC-,0.079972327 1900,12,CC,0.108600179 1900,12,C,0.147476 +1900,12,I,0 diff --git a/ifrs17-template/Files/Parameters/PartnerRating.csv b/ifrs17-template/Files/Parameters/PartnerRating.csv index 8f9d717c..51001cf3 100644 --- a/ifrs17-template/Files/Parameters/PartnerRating.csv +++ b/ifrs17-template/Files/Parameters/PartnerRating.csv @@ -1,4 +1,5 @@ -@@PartnerRating +@@PartnerRating,,, Partner,CreditRiskRating,Year,Month PT1,AAA,2020,12 -PT1,BBB,2021,3 \ No newline at end of file +PT1,BBB,2021,3 +PTI,I,2019,12 diff --git a/ifrs17-template/Files/Parameters/YieldCurve_2019_12.csv b/ifrs17-template/Files/Parameters/YieldCurve_2019_12.csv index 657f3e7e..7b60d3ff 100644 --- a/ifrs17-template/Files/Parameters/YieldCurve_2019_12.csv +++ b/ifrs17-template/Files/Parameters/YieldCurve_2019_12.csv @@ -1,7 +1,10 @@ -@@Main -Year,Month -2019,12 -@@YieldCurve -Currency,Values0,Values1,Values2,Values3 -CHF,0,0,0.015,0.02 -XTSHY,0.85,0.85,0.85,0.85 \ No newline at end of file +@@Main,,,,, +Year,Month,,,, +2019,12,,,, +@@YieldCurve,,,,, +Currency,Name,Values0,Values1,Values2,Values3 +CHF,,0,0,0.015,0.02 +XTSHY,,0.85,,, +EUR,,0,,, +EUR,NoDiscount,0,,, +EUR,3PCT,0.03,,, diff --git a/ifrs17-template/Files/Parameters/YieldCurve_2020_3.csv b/ifrs17-template/Files/Parameters/YieldCurve_2020_3.csv index 266e8682..8b8ccfd8 100644 --- a/ifrs17-template/Files/Parameters/YieldCurve_2020_3.csv +++ b/ifrs17-template/Files/Parameters/YieldCurve_2020_3.csv @@ -1,8 +1,7 @@ -@@Main -Year,Month -2020,3 -@@YieldCurve +@@Main,,,, +Year,Month,,, +2020,3,,, +@@YieldCurve,,,, Currency,Values0,Values1,Values2,Values3 -EUR,0.008685495,0.008685495,0.018498471,0.019966839 USD,0.002,0.002,0.002,0.002 GBP,0.01,0.015,0.02,0.02 diff --git a/ifrs17-template/Files/TransactionalData/Actuals_ES_2020_12.csv b/ifrs17-template/Files/TransactionalData/Actuals_ES_2020_12.csv new file mode 100644 index 00000000..86812659 --- /dev/null +++ b/ifrs17-template/Files/TransactionalData/Actuals_ES_2020_12.csv @@ -0,0 +1,9 @@ +@@Main,,,,, +ReportingNode,Year,Month,Scenario ,, +ES,2020,12,,, +@@Actual,,,,, +DataNode,AocType,AmountType,EstimateType,AccidentYear,Value +3BBBA.0,CF,PR,A,,1000 +3BBBA.0,CF,NIC,A,,-500 +3BBBA.0,CF,AEM,A,,-150 +3BBBA.0,CF,AEA,A,,-200 diff --git a/ifrs17-template/Files/TransactionalData/Actuals_FR_2020_12.csv b/ifrs17-template/Files/TransactionalData/Actuals_FR_2020_12.csv new file mode 100644 index 00000000..f84d2524 --- /dev/null +++ b/ifrs17-template/Files/TransactionalData/Actuals_FR_2020_12.csv @@ -0,0 +1,18 @@ +@@Main,,,,, +ReportingNode,Year,Month,Scenario ,, +FR,2020,12,,, +@@Actual,,,,, +DataNode,AocType,AmountType,EstimateType,AccidentYear,Value +EY52BBA.1,CF,PR,A,,2000 +EY52BBA.1,CF,NIC,A,,-900 +EY57G.1,CF,PR,A,,1000 +EY57G.1,CF,NIC,A,,-900 +EY57R.1,CF,PR,A,,-300 +EY57R.1,CF,NIC,A,,270 +EY58G.1,CF,PR,A,,900 +EY58G.1,CF,NIC,A,,-600 +EY58G.2,CF,PR,A,,210 +EY58G.2,CF,NIC,A,,-300 +EY58R.1,CF,PR,A,,-315 +EY58R.1,CF,NIC,A,,270 +EY63G.1,CF,PR,A,,-55 diff --git a/ifrs17-template/Files/TransactionalData/NominalCashflows_ES_2020_12.csv b/ifrs17-template/Files/TransactionalData/NominalCashflows_ES_2020_12.csv new file mode 100644 index 00000000..dacb3e3f --- /dev/null +++ b/ifrs17-template/Files/TransactionalData/NominalCashflows_ES_2020_12.csv @@ -0,0 +1,14 @@ +@@Main,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +ReportingNode,Year,Month,Scenario,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +ES,2020,12,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +@@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 +3BBBA.0,PR,BE,BOP,N,,1000,0,0,0,0,0,0,0,0,0,0,0,,,,,,,,,,,,,,,,,,,,,,,, +3BBBA.0,NIC,BE,BOP,N,,0,0,0,0,0,0,0,0,0,0,0,-600,,,,,,,,,,,,,,,,,,,,,,,, +3BBBA.0,AEM,BE,BOP,N,,0,0,0,0,0,0,0,0,0,0,0,-100,,,,,,,,,,,,,,,,,,,,,,,, +3BBBA.0,AEA,BE,BOP,N,,-200,0,0,0,0,0,0,0,0,0,0,0,,,,,,,,,,,,,,,,,,,,,,,, +3BBBA.0,PR,BE,CL,C,,0,0,0,0,0,0,0,0,0,0,0,0,,,,,,,,,,,,,,,,,,,,,,,, +3BBBA.0,NIC,BE,CL,C,,0,0,0,0,0,0,0,0,0,0,0,0,,,,,,,,,,,,,,,,,,,,,,,, +3BBBA.0,AEM,BE,CL,C,,0,0,0,0,0,0,0,0,0,0,0,0,,,,,,,,,,,,,,,,,,,,,,,, +3BBBA.0,AEA,BE,CL,C,,0,0,0,0,0,0,0,0,0,0,0,0,,,,,,,,,,,,,,,,,,,,,,,, +3BBBA.0,,CU,CL,C,,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,,,,,,,,,,,,,,,,,,,,,,,, diff --git a/ifrs17-template/Files/TransactionalData/NominalCashflows_FR_2020_12.csv b/ifrs17-template/Files/TransactionalData/NominalCashflows_FR_2020_12.csv new file mode 100644 index 00000000..662e8b2f --- /dev/null +++ b/ifrs17-template/Files/TransactionalData/NominalCashflows_FR_2020_12.csv @@ -0,0 +1,65 @@ +@@Main,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +ReportingNode,Year,Month,Scenario,,,,,,,,,,,,,,,,,,,,,,,,,, +FR,2020,12,,,,,,,,,,,,,,,,,,,,,,,,,,, +@@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 +EY52BBA.1,PR,BE,BOP,N,,2000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +EY52BBA.1,NIC,BE,BOP,N,,-75,-75,-75,-75,-75,-75,-75,-75,-75,-75,-75,-75,-75,-75,-75,-75,-75,-75,-75,-75,-75,-75,-75,-75 +EY52BBA.1,NIC,BE,EV,N,,0,0,0,0,0,0,0,0,0,0,0,0,-79.16666667,-79.16666667,-79.16666667,-79.16666667,-79.16666667,-79.16666667,-79.16666667,-79.16666667,-79.16666667,-79.16666667,-79.16666667,-79.16666667 +EY52BBA.1,PR,BE,CL,C,,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +EY52BBA.1,NIC,BE,CL,C,,0,0,0,0,0,0,0,0,0,0,0,0,-79.16666667,-79.16666667,-79.16666667,-79.16666667,-79.16666667,-79.16666667,-79.16666667,-79.16666667,-79.16666667,-79.16666667,-79.16666667,-79.16666667 +EY52BBA.1,,CU,CL,C,,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 +EY57G.1,PR,BE,BOP,N,,1000,0,0,0,0,0,0,0,0,0,0,0,,,,,,,,,,,, +EY57G.1,NIC,BE,BOP,N,,-75,-75,-75,-75,-75,-75,-75,-75,-75,-75,-75,-75,,,,,,,,,,,, +EY57G.1,,RA,BOP,N,,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,,,,,,,,,,,, +EY57G.1,PR,BE,CL,C,,0,0,0,0,0,0,0,0,0,0,0,0,,,,,,,,,,,, +EY57G.1,NIC,BE,CL,C,,0,0,0,0,0,0,0,0,0,0,0,0,,,,,,,,,,,, +EY57G.1,,RA,CL,C,,0,0,0,0,0,0,0,0,0,0,0,0,,,,,,,,,,,, +EY57G.1,,CU,CL,C,,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,,,,,,,,,,,, +EY57R.1,PR,BE,BOP,N,,-25,-25,-25,-25,-25,-25,-25,-25,-25,-25,-25,-25,,,,,,,,,,,, +EY57R.1,NIC,BE,BOP,N,,22.5,22.5,22.5,22.5,22.5,22.5,22.5,22.5,22.5,22.5,22.5,22.5,,,,,,,,,,,, +EY57R.1,,RA,BOP,N,,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,,,,,,,,,,,, +EY57R.1,PR,BE,CL,C,,0,0,0,0,0,0,0,0,0,0,0,0,,,,,,,,,,,, +EY57R.1,NIC,BE,CL,C,,0,0,0,0,0,0,0,0,0,0,0,0,,,,,,,,,,,, +EY57R.1,,RA,CL,C,,0,0,0,0,0,0,0,0,0,0,0,0,,,,,,,,,,,, +EY57R.1,,CU,CL,C,,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,,,,,,,,,,,, +EY58G.1,PR,BE,BOP,N,,75,75,75,75,75,75,75,75,75,75,75,75,,,,,,,,,,,, +EY58G.1,NIC,BE,BOP,N,,-50,-50,-50,-50,-50,-50,-50,-50,-50,-50,-50,-50,,,,,,,,,,,, +EY58G.1,PR,BE,CL,C,,0,0,0,0,0,0,0,0,0,0,0,0,,,,,,,,,,,, +EY58G.1,NIC,BE,CL,C,,0,0,0,0,0,0,0,0,0,0,0,0,,,,,,,,,,,, +EY58G.1,,CU,CL,C,,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,,,,,,,,,,,, +EY58G.2,PR,BE,BOP,N,,17.5,17.5,17.5,17.5,17.5,17.5,17.5,17.5,17.5,17.5,17.5,17.5,,,,,,,,,,,, +EY58G.2,NIC,BE,BOP,N,,-25,-25,-25,-25,-25,-25,-25,-25,-25,-25,-25,-25,,,,,,,,,,,, +EY58G.2,PR,BE,CL,C,,0,0,0,0,0,0,0,0,0,0,0,0,,,,,,,,,,,, +EY58G.2,NIC,BE,CL,C,,0,0,0,0,0,0,0,0,0,0,0,0,,,,,,,,,,,, +EY58G.2,,CU,CL,C,,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,,,,,,,,,,,, +EY58R.1,PR,BE,BOP,N,,-26.25,-26.25,-26.25,-26.25,-26.25,-26.25,-26.25,-26.25,-26.25,-26.25,-26.25,-26.25,,,,,,,,,,,, +EY58R.1,NIC,BE,BOP,N,,22.5,22.5,22.5,22.5,22.5,22.5,22.5,22.5,22.5,22.5,22.5,22.5,,,,,,,,,,,, +EY58R.1,PR,BE,CL,C,,0,0,0,0,0,0,0,0,0,0,0,0,,,,,,,,,,,, +EY58R.1,NIC,BE,CL,C,,0,0,0,0,0,0,0,0,0,0,0,0,,,,,,,,,,,, +EY58R.1,,CU,CL,C,,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,,,,,,,,,,,, +EY59G.1,NIC,BE,BOP,I,,0,0,0,0,0,0,0,0,0,0,0,0,-25,-25,-25,-25,-25,-25,-25,-25,-25,-25,-25,-25 +EY59G.1,NIC,BE,EV,I,,0,0,0,0,0,0,0,0,0,0,0,0,-29.16666667,-29.16666667,-29.16666667,-29.16666667,-29.16666667,-29.16666667,-29.16666667,-29.16666667,-29.16666667,-29.16666667,-29.16666667,-29.16666667 +EY59G.1,NIC,BE,CL,C,,0,0,0,0,0,0,0,0,0,0,0,0,-29.16666667,-29.16666667,-29.16666667,-29.16666667,-29.16666667,-29.16666667,-29.16666667,-29.16666667,-29.16666667,-29.16666667,-29.16666667,-29.16666667 +EY59G.1,,CU,CL,C,,0,0,0,0,0,0,0,0,0,0,0,0,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 +EY59G.2,NIC,BE,BOP,I,,0,0,0,0,0,0,0,0,0,0,0,0,-25,-25,-25,-25,-25,-25,-25,-25,-25,-25,-25,-25 +EY59G.2,NIC,BE,EV,I,,0,0,0,0,0,0,0,0,0,0,0,0,-38.33333333,-38.33333333,-38.33333333,-38.33333333,-38.33333333,-38.33333333,-38.33333333,-38.33333333,-38.33333333,-38.33333333,-38.33333333,-38.33333333 +EY59G.2,NIC,BE,CL,C,,0,0,0,0,0,0,0,0,0,0,0,0,-38.33333333,-38.33333333,-38.33333333,-38.33333333,-38.33333333,-38.33333333,-38.33333333,-38.33333333,-38.33333333,-38.33333333,-38.33333333,-38.33333333 +EY59G.2,,CU,CL,C,,0,0,0,0,0,0,0,0,0,0,0,0,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 +EY59R.1,NIC,BE,BOP,I,,0,0,0,0,0,0,0,0,0,0,0,0,7.5,7.5,7.5,7.5,7.5,7.5,7.5,7.5,7.5,7.5,7.5,7.5 +EY59R.1,NIC,BE,EV,I,,0,0,0,0,0,0,0,0,0,0,0,0,8.75,8.75,8.75,8.75,8.75,8.75,8.75,8.75,8.75,8.75,8.75,8.75 +EY59R.1,NIC,BE,CL,C,,0,0,0,0,0,0,0,0,0,0,0,0,8.75,8.75,8.75,8.75,8.75,8.75,8.75,8.75,8.75,8.75,8.75,8.75 +EY59R.1,,CU,CL,C,,0,0,0,0,0,0,0,0,0,0,0,0,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 +EY59R.2,NIC,BE,BOP,I,,0,0,0,0,0,0,0,0,0,0,0,0,7.5,7.5,7.5,7.5,7.5,7.5,7.5,7.5,7.5,7.5,7.5,7.5 +EY59R.2,NIC,BE,EV,I,,0,0,0,0,0,0,0,0,0,0,0,0,11.5,11.5,11.5,11.5,11.5,11.5,11.5,11.5,11.5,11.5,11.5,11.5 +EY59R.2,NIC,BE,CL,C,,0,0,0,0,0,0,0,0,0,0,0,0,11.5,11.5,11.5,11.5,11.5,11.5,11.5,11.5,11.5,11.5,11.5,11.5 +EY59R.2,,CU,CL,C,,0,0,0,0,0,0,0,0,0,0,0,0,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 +EY63G.1,NIC,BE,BOP,I,2019,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-100 +EY63G.1,NIC,BE,EV,I,2019,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-115 +EY63G.1,NIC,BE,CL,C,2019,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-115 +EY63R.1,PR,BE,BOP,N,,-55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +EY63R.1,NIC,BE,BOP,N,,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50 +EY63R.1,NIC,BE,EV,N,,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,57.5 +EY63R.1,PR,BE,CL,C,,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +EY63R.1,NIC,BE,CL,C,,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,57.5 +EY63R.1,,CU,CL,C,,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1 diff --git a/ifrs17-template/Files/TransactionalData/Openings_ES_2020_12.csv b/ifrs17-template/Files/TransactionalData/Openings_ES_2020_12.csv new file mode 100644 index 00000000..c3271624 --- /dev/null +++ b/ifrs17-template/Files/TransactionalData/Openings_ES_2020_12.csv @@ -0,0 +1,6 @@ +@@Main,,,, +ReportingNode,Year,Month,, +ES,2020,12,, +@@Opening,,,, +DataNode,EstimateType,AmountType,AccidentYear,Value +3BBBA.0,DA,,,0 diff --git a/ifrs17-template/Files/TransactionalData/Openings_FR_2020_12.csv b/ifrs17-template/Files/TransactionalData/Openings_FR_2020_12.csv new file mode 100644 index 00000000..8b7e20d6 --- /dev/null +++ b/ifrs17-template/Files/TransactionalData/Openings_FR_2020_12.csv @@ -0,0 +1,9 @@ +@@Main,,,, +ReportingNode,Year,Month,, +FR,2020,12,, +@@Opening,,,, +DataNode,EstimateType,AmountType,AccidentYear,Value +EY59G.1,C,,,100 +EY59G.2,C,,,100 +EY59R.1,C,,,-25 +EY59R.2,C,,,-25 diff --git a/ifrs17-template/Initialization/InitSystemorphBaseToMemory.ipynb b/ifrs17-template/Initialization/InitSystemorphBaseToMemory.ipynb index 425b716a..ecb28355 100644 --- a/ifrs17-template/Initialization/InitSystemorphBaseToMemory.ipynb +++ b/ifrs17-template/Initialization/InitSystemorphBaseToMemory.ipynb @@ -73,6 +73,111 @@ "execution_count": 0, "outputs": [] }, + { + "cell_type": "markdown", + "source": [ + "## FR Data Nodes" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "await Import.FromFile(\"../Files/DataNodes/DataNodes_FR.csv\")", + "\n .WithFormat(ImportFormats.DataNode)", + "\n .WithTarget(DataSource)", + "\n .WithActivityLog()", + "\n .ExecuteAsync()" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "await Import.FromFile(\"../Files/DataNodes/DataNodeStates_FR_2020_12.csv\")", + "\n .WithFormat(ImportFormats.DataNodeState)", + "\n .WithTarget(DataSource)", + "\n .WithActivityLog()", + "\n .ExecuteAsync()" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "await Import.FromFile(\"../Files/DataNodes/DataNodeParameters_FR_2020_12.csv\")", + "\n .WithFormat(ImportFormats.DataNodeParameter)", + "\n .WithTarget(DataSource)", + "\n .WithActivityLog()", + "\n .ExecuteAsync()" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "markdown", + "source": [ + "## ES Data Nodes" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "await Import.FromFile(\"../Files/DataNodes/DataNodes_ES.csv\")", + "\n .WithFormat(ImportFormats.DataNode)", + "\n .WithTarget(DataSource)", + "\n .WithActivityLog()", + "\n .ExecuteAsync()" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "await Import.FromFile(\"../Files/DataNodes/DataNodeStates_ES_2020_12.csv\")", + "\n .WithFormat(ImportFormats.DataNodeState)", + "\n .WithTarget(DataSource)", + "\n .WithActivityLog()", + "\n .ExecuteAsync()" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "await Import.FromFile(\"../Files/DataNodes/DataNodeParameters_ES_2020_12.csv\")", + "\n .WithFormat(ImportFormats.DataNodeParameter)", + "\n .WithTarget(DataSource)", + "\n .WithActivityLog()", + "\n .ExecuteAsync()" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "markdown", + "source": [ + "## CH Data Nodes" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, { "cell_type": "code", "source": [ diff --git a/ifrs17-template/Initialization/InitSystemorphToMemory.ipynb b/ifrs17-template/Initialization/InitSystemorphToMemory.ipynb index 43ed45fe..aa4bd390 100644 --- a/ifrs17-template/Initialization/InitSystemorphToMemory.ipynb +++ b/ifrs17-template/Initialization/InitSystemorphToMemory.ipynb @@ -63,10 +63,19 @@ "execution_count": 0, "outputs": [] }, + { + "cell_type": "markdown", + "source": [ + "## FR Transactional Data" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, { "cell_type": "code", "source": [ - "await Import.FromFile(\"../Files/TransactionalData/Openings_CH_2020_12.csv\")", + "await Import.FromFile(\"../Files/TransactionalData/Openings_FR_2020_12.csv\")", "\n .WithFormat(ImportFormats.Opening)", "\n .WithTarget(DataSource)", "\n .WithActivityLog()", @@ -79,7 +88,7 @@ { "cell_type": "code", "source": [ - "await Import.FromFile(\"../Files/TransactionalData/NominalCashflows_CH_2020_12.csv\")", + "await Import.FromFile(\"../Files/TransactionalData/NominalCashflows_FR_2020_12.csv\")", "\n .WithFormat(ImportFormats.Cashflow)", "\n .WithTarget(DataSource)", "\n .WithActivityLog()", @@ -92,7 +101,7 @@ { "cell_type": "code", "source": [ - "await Import.FromFile(\"../Files/TransactionalData/Actuals_CH_2020_12.csv\")", + "await Import.FromFile(\"../Files/TransactionalData/Actuals_FR_2020_12.csv\")", "\n .WithFormat(ImportFormats.Actual)", "\n .WithTarget(DataSource)", "\n .WithActivityLog()", @@ -102,10 +111,32 @@ "execution_count": 0, "outputs": [] }, + { + "cell_type": "markdown", + "source": [ + "## ES Transactional Data" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, { "cell_type": "code", "source": [ - "await Import.FromFile(\"../Files/TransactionalData/NominalCashflows_CH_2021_3.csv\")", + "await Import.FromFile(\"../Files/TransactionalData/Openings_ES_2020_12.csv\")", + "\n .WithFormat(ImportFormats.Opening)", + "\n .WithTarget(DataSource)", + "\n .WithActivityLog()", + "\n .ExecuteAsync()" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "await Import.FromFile(\"../Files/TransactionalData/NominalCashflows_ES_2020_12.csv\")", "\n .WithFormat(ImportFormats.Cashflow)", "\n .WithTarget(DataSource)", "\n .WithActivityLog()", @@ -118,7 +149,55 @@ { "cell_type": "code", "source": [ - "await Import.FromFile(\"../Files/TransactionalData/Actuals_CH_2021_3.csv\")", + "await Import.FromFile(\"../Files/TransactionalData/Actuals_ES_2020_12.csv\")", + "\n .WithFormat(ImportFormats.Actual)", + "\n .WithTarget(DataSource)", + "\n .WithActivityLog()", + "\n .ExecuteAsync()" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "markdown", + "source": [ + "## CH Transactional Data" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "await Import.FromFile(\"../Files/TransactionalData/Openings_CH_2020_12.csv\")", + "\n .WithFormat(ImportFormats.Opening)", + "\n .WithTarget(DataSource)", + "\n .WithActivityLog()", + "\n .ExecuteAsync()" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "await Import.FromFile(\"../Files/TransactionalData/NominalCashflows_CH_2020_12.csv\")", + "\n .WithFormat(ImportFormats.Cashflow)", + "\n .WithTarget(DataSource)", + "\n .WithActivityLog()", + "\n .ExecuteAsync()" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "await Import.FromFile(\"../Files/TransactionalData/Actuals_CH_2020_12.csv\")", "\n .WithFormat(ImportFormats.Actual)", "\n .WithTarget(DataSource)", "\n .WithActivityLog()", @@ -154,6 +233,32 @@ "execution_count": 0, "outputs": [] }, + { + "cell_type": "code", + "source": [ + "await Import.FromFile(\"../Files/TransactionalData/NominalCashflows_CH_2021_3.csv\")", + "\n .WithFormat(ImportFormats.Cashflow)", + "\n .WithTarget(DataSource)", + "\n .WithActivityLog()", + "\n .ExecuteAsync()" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "await Import.FromFile(\"../Files/TransactionalData/Actuals_CH_2021_3.csv\")", + "\n .WithFormat(ImportFormats.Actual)", + "\n .WithTarget(DataSource)", + "\n .WithActivityLog()", + "\n .ExecuteAsync()" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, { "cell_type": "markdown", "source": [ diff --git a/ifrs17-template/Test/PracticalCase-CompareReinsuranceTest.ipynb b/ifrs17-template/Test/PracticalCase-CompareReinsuranceTest.ipynb index 0c658c79..71bbfbb1 100644 --- a/ifrs17-template/Test/PracticalCase-CompareReinsuranceTest.ipynb +++ b/ifrs17-template/Test/PracticalCase-CompareReinsuranceTest.ipynb @@ -84,7 +84,7 @@ { "cell_type": "code", "source": [ - "bops.Where(x => x.GroupOfContract==grossBusinessReinsured && x.Scenario==null).Sum(x=>x.Value).Should().BeApproximately(-100.00828, Precision);" + "bops.Where(x => x.GroupOfContract==grossBusinessReinsured && x.Scenario==null).Sum(x=>x.Value).Should().BeApproximately(-100.05818, Precision);" ], "metadata": {}, "execution_count": 0, @@ -93,7 +93,7 @@ { "cell_type": "code", "source": [ - "bops.Where(x => x.GroupOfContract==grossBusinessReinsured && x.Scenario==\"LR70\").Sum(x=>x.Value).Should().BeApproximately(-0.11643, Precision);" + "bops.Where(x => x.GroupOfContract==grossBusinessReinsured && x.Scenario==\"LR70\").Sum(x=>x.Value).Should().BeApproximately(-0.16633, Precision);" ], "metadata": {}, "execution_count": 0, @@ -102,7 +102,7 @@ { "cell_type": "code", "source": [ - "bops.Where(x => x.GroupOfContract==grossBusinessReinsured && x.Scenario==\"LR80\").Sum(x=>x.Value).Should().BeApproximately(99.77541, Precision);" + "bops.Where(x => x.GroupOfContract==grossBusinessReinsured && x.Scenario==\"LR80\").Sum(x=>x.Value).Should().BeApproximately(99.72551, Precision);" ], "metadata": {}, "execution_count": 0, @@ -111,7 +111,7 @@ { "cell_type": "code", "source": [ - "bops.Where(x => x.GroupOfContract==grossBusinessReinsured && x.Scenario==\"ELR60A70\").Sum(x=>x.Value).Should().BeApproximately(-100.00828, Precision);" + "bops.Where(x => x.GroupOfContract==grossBusinessReinsured && x.Scenario==\"ELR60A70\").Sum(x=>x.Value).Should().BeApproximately(-100.05818, Precision);" ], "metadata": {}, "execution_count": 0, @@ -120,7 +120,7 @@ { "cell_type": "code", "source": [ - "bops.Where(x => x.GroupOfContract==grossBusinessReinsured && x.Scenario==\"ELR60A80\").Sum(x=>x.Value).Should().BeApproximately(-100.00828, Precision);" + "bops.Where(x => x.GroupOfContract==grossBusinessReinsured && x.Scenario==\"ELR60A80\").Sum(x=>x.Value).Should().BeApproximately(-100.05818, Precision);" ], "metadata": {}, "execution_count": 0, @@ -255,7 +255,7 @@ { "cell_type": "code", "source": [ - "csmAM.Where(x => x.Scenario == null).Sum(x => x.Value).Should().BeApproximately(-84.98727, Precision);" + "csmAM.Where(x => x.Scenario == null).Sum(x => x.Value).Should().BeApproximately(-84.98845, Precision);" ], "metadata": {}, "execution_count": 0, @@ -264,7 +264,7 @@ { "cell_type": "code", "source": [ - "csmAM.Where(x => x.Scenario == \"LR70\").Sum(x => x.Value).Should().BeApproximately(-14.98673, Precision);" + "csmAM.Where(x => x.Scenario == \"LR70\").Sum(x => x.Value).Should().BeApproximately(-14.98652, Precision);" ], "metadata": {}, "execution_count": 0, @@ -273,7 +273,7 @@ { "cell_type": "code", "source": [ - "csmAM.Where(x => x.Scenario == \"LR80\").Sum(x => x.Value).Should().BeApproximately(-55.01464, Precision);" + "csmAM.Where(x => x.Scenario == \"LR80\").Sum(x => x.Value).Should().BeApproximately(-55.015398, Precision);" ], "metadata": {}, "execution_count": 0, @@ -300,7 +300,7 @@ { "cell_type": "code", "source": [ - "pnl.Where(x => x.Scenario == \"Best Estimate\").Sum(x => x.Value).Should().BeApproximately(84.99882, Precision);" + "pnl.Where(x => x.Scenario == \"Best Estimate\").Sum(x => x.Value).Should().BeApproximately(85.0, Precision);" ], "metadata": {}, "execution_count": 0, @@ -309,7 +309,7 @@ { "cell_type": "code", "source": [ - "pnl.Where(x => x.Scenario == \"LR70\").Sum(x => x.Value).Should().BeApproximately(15.00021, Precision);" + "pnl.Where(x => x.Scenario == \"LR70\").Sum(x => x.Value).Should().BeApproximately(15.0, Precision);" ], "metadata": {}, "execution_count": 0, @@ -318,7 +318,7 @@ { "cell_type": "code", "source": [ - "pnl.Where(x => x.Scenario == \"LR80\").Sum(x => x.Value).Should().BeApproximately(-55.00076, Precision);" + "pnl.Where(x => x.Scenario == \"LR80\").Sum(x => x.Value).Should().BeApproximately(-55.0, Precision);" ], "metadata": {}, "execution_count": 0, @@ -327,7 +327,7 @@ { "cell_type": "code", "source": [ - "pnl.Where(x => x.Scenario == \"ELR60A70\").Sum(x => x.Value).Should().BeApproximately(14.99882, Precision);" + "pnl.Where(x => x.Scenario == \"ELR60A70\").Sum(x => x.Value).Should().BeApproximately(15.0, Precision);" ], "metadata": {}, "execution_count": 0, @@ -336,7 +336,7 @@ { "cell_type": "code", "source": [ - "pnl.Where(x => x.Scenario == \"ELR60A80\").Sum(x => x.Value).Should().BeApproximately(-55.00117, Precision);" + "pnl.Where(x => x.Scenario == \"ELR60A80\").Sum(x => x.Value).Should().BeApproximately(-55.0, Precision);" ], "metadata": {}, "execution_count": 0, diff --git a/ifrs17-template/Test/Tests.ipynb b/ifrs17-template/Test/Tests.ipynb index c6c44706..0cc0bb0f 100644 --- a/ifrs17-template/Test/Tests.ipynb +++ b/ifrs17-template/Test/Tests.ipynb @@ -29,7 +29,7 @@ "cell_type": "markdown", "source": [ "Comprehensive collection of tests executed on top of the Systemorph use cases (initialization).", - "\n
Execute this Notebook using at least 20Gb RAM." + "\n
Execute this Notebook using at least 26Gb RAM." ], "metadata": {}, "execution_count": 0, diff --git a/ifrs17/Import/2ImportScope-PresentValue.ipynb b/ifrs17/Import/2ImportScope-PresentValue.ipynb index 333a2587..46d985d5 100644 --- a/ifrs17/Import/2ImportScope-PresentValue.ipynb +++ b/ifrs17/Import/2ImportScope-PresentValue.ipynb @@ -822,7 +822,7 @@ "For a certain GIC, the monthly Amortization Factors $\\text{Monthly }AF_i$ are computed from the cash flows of the underlying coverage unit for that GIC:", "\n", "\n$$", - "\n\\text{Monthly }AF_i = 1 - \\frac{ \\text{Nominal}_i(CL)} {\\text{CDC}_i(CL) } ~.", + "\n\\text{Monthly }AF_i = Max\\left(0, 1 - \\frac{ \\text{Nominal}_i(CL)} {\\text{CDC}_i(CL) }\\right) ~.", "\n$$", "\n", "\nwhere:", @@ -834,6 +834,15 @@ "execution_count": 0, "outputs": [] }, + { + "cell_type": "markdown", + "source": [ + "" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, { "cell_type": "code", "source": [ @@ -845,12 +854,10 @@ "\n [NotVisible] string EconomicBasis => GetContext();", "\n ", "\n double[] MonthlyAmortizationFactors => Identity.AocType switch {", - "\n AocTypes.AM => NominalCuCashflow.Zip(DiscountedCuCashflow, //Extract to an other scope with month in the identity to avoid Zip?", - "\n (nominal, discountedCumulated) => Math.Abs(discountedCumulated) >= Precision ", - "\n ? 1 - nominal / discountedCumulated ", - "\n : 0).ToArray(),", - "\n _ => Enumerable.Empty().ToArray(),", - "\n };", + "\n AocTypes.AM when NominalCuCashflow.Any() => NominalCuCashflow.Zip(DiscountedCuCashflow, //Extract to an other scope with month in the identity to avoid Zip?", + "\n (nominal, discountedCumulated) => Math.Abs(discountedCumulated) >= Precision ? Math.Max(0, 1 - nominal / discountedCumulated) : 0).ToArray(),", + "\n _ => Enumerable.Empty().ToArray(),", + "\n };", "\n}" ], "metadata": {}, @@ -890,13 +897,13 @@ "\n .MonthlyAmortizationFactors", "\n .Skip(shift)", "\n .Take(timeStep)", + "\n .DefaultIfEmpty()", "\n .Aggregate(1d, (x, y) => x * y);", + "\n ", "\n [NotVisible] string EconomicBasis => GetContext();", "\n", "\n string EstimateType => EstimateTypes.F;", - "\n double Value => Math.Abs(amortizedFactor - 1d) > Precision", - "\n ? 1d - amortizedFactor", - "\n : 1d;", + "\n double Value => 1d - amortizedFactor;", "\n}", "\n", "\npublic interface AmfFromIfrsVariable : CurrentPeriodAmortizationFactor", diff --git a/ifrs17/Import/ImportStorage.ipynb b/ifrs17/Import/ImportStorage.ipynb index f566d2c0..a5f64a40 100644 --- a/ifrs17/Import/ImportStorage.ipynb +++ b/ifrs17/Import/ImportStorage.ipynb @@ -315,7 +315,8 @@ "\n //YieldCurve", "\n public double[] GetYearlyYieldCurve(ImportIdentity id, string economicBasis) {", "\n var yc = GetYieldCurve(id, economicBasis);", - "\n return yc.Values.Skip(args.Year - yc.Year).ToArray(); //Check if the returned array is empty? Log Warning?", + "\n var ret = yc.Values.Skip(args.Year - yc.Year);", + "\n return (ret.Any() ? ret : yc.Values.Last().RepeatOnce()).ToArray();", "\n }", "\n ", "\n public YieldCurve GetYieldCurve(ImportIdentity id, string economicBasis) => (economicBasis, GetYieldCurvePeriod(id)) switch {", diff --git a/ifrs17/Import/Importers.ipynb b/ifrs17/Import/Importers.ipynb index 7e899cdb..99450cfb 100644 --- a/ifrs17/Import/Importers.ipynb +++ b/ifrs17/Import/Importers.ipynb @@ -884,13 +884,12 @@ "\n (dataset, datarow) => {", "\n var values = datarow.Table.Columns.Where(c => c.ColumnName.StartsWith(nameof(YieldCurve.Values))).OrderBy(c => c.ColumnName.Length).ThenBy(c => c.ColumnName)", "\n .Select(x => datarow.Field(x.ColumnName).CheckStringForExponentialAndConvertToDouble()).ToArray().Prune();", - "\n if (!values.Any()) return null;", "\n return new YieldCurve {", "\n Currency = datarow.Field(nameof(YieldCurve.Currency)),", "\n Year = primaryArgs.Year,", "\n Month = primaryArgs.Month, ", "\n Scenario = primaryArgs.Scenario,", - "\n Values = values,", + "\n Values = !values.Any() ? new [] {0d} : values,", "\n Name = hasNameColumn ? datarow.Field(nameof(YieldCurve.Name)) : default(string)", "\n };", "\n }",