Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ DT2.1,Active,
DT2.2,Active,
DT3.1,Active,
DT4.1,Active,
DT5.1,Active,
DTR1.1,Active,
DTR1.2,Active,
DTR2.1,Active,
Expand Down
12 changes: 7 additions & 5 deletions full-ifrs17-template/Files/700.DataNodes/DataNodes_CH.csv
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
@@Main,,,,,,
ReportingNode,,,,,,
CH,,,,,,
,,,,,,

@@InsurancePortfolio,,,,,,
SystemName,DisplayName,ContractualCurrency,LineOfBusiness,ValuationApproach,OciType,
DT,DT complex CF,USD,ANN,BBA,Default,
DT,DT Complex CF,USD,ANN,BBA,Default,
DT1,DT1 OCI,USD,ANN,BBA,Default,
DT2,DT2 NOCI,USD,ANN,BBA,,
DT3,DT3 RunOff,USD,ANN,BBA,Default,
DT4,DT4 OCI,USD,ANN,BBA,Default,
,,,,,,
DT5,DT5 Simple Import,USD,ANN,BBA,Default

@@GroupOfInsuranceContract,,,,,,
SystemName,DisplayName,InsurancePortfolio,AnnualCohort,LiabilityType,Profitability,
GicComplex,Gic test discounting,DT,2020,LRC,P,
Expand All @@ -20,13 +21,14 @@ DT2.1,DT2.1 NOCI LRC PA 0.8,DT2,2020,LRC,P,
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,

@@ReinsurancePortfolio,,,,,,
SystemName,DisplayName,ContractualCurrency,LineOfBusiness,ValuationApproach,OciType,
DTR,DTR complex CF,USD,ANN,BBA,,
DTR1,DTR1 OCI,USD,ANN,BBA,Default,
DTR2,DTR2 NOCI,USD,ANN,BBA,,
,,,,,,

@@GroupOfReinsuranceContract,,,,,,
SystemName,DisplayName,ReinsurancePortfolio,AnnualCohort,LiabilityType,Profitability,Partner
GricComplex,Gric test for discounting,DTR,2020,LRC,P,PT1
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
@@Main
Month,ReportingNode,Scenario,Year
12,CH,,2020
@@SimpleValue
AccidentYear,AmountType,AocType,DataNode,EconomicBasis,EstimateType,Novelty,Value
,PR,BOP,DT5.1,L,BE,N,-798.536731161375
,NIC,BOP,DT5.1,L,BE,N,598.7529445986629
,PR,BOP,DT5.1,C,BE,N,-798.536731161375
,NIC,BOP,DT5.1,C,BE,N,598.7529445986629
,,BOP,DT5.1,C,RA,N,59.8752944598663
,,BOP,DT5.1,L,RA,N,59.8752944598663
,,AM,DT5.1,L,F,C,0.6562298579039588
,PR,EOP,DT5.1,L,BE,C,-399.63392949885525
,NIC,EOP,DT5.1,L,BE,C,299.67554969423594
,PR,EOP,DT5.1,C,BE,C,-399.63392949885525
,NIC,EOP,DT5.1,C,BE,C,299.67554969423594
,,EOP,DT5.1,C,RA,C,29.967554969423595
,,EOP,DT5.1,L,RA,C,29.967554969423595
,PR,IA,DT5.1,L,BE,N,-1.0971983374806105
,NIC,IA,DT5.1,L,BE,N,0.9226050955731167
,PR,IA,DT5.1,C,BE,N,-1.0971983374806105
,NIC,IA,DT5.1,C,BE,N,0.9226050955731167
,,IA,DT5.1,C,RA,N,0.09226050955731169
,,IA,DT5.1,L,RA,N,0.09226050955731169
,PR,CF,DT5.1,L,BE,N,400
,NIC,CF,DT5.1,L,BE,N,-300
,PR,CF,DT5.1,C,BE,N,400
,NIC,CF,DT5.1,C,BE,N,-300
,,CF,DT5.1,C,RA,N,-30
,,CF,DT5.1,L,RA,N,-30
,PR,CF,DT5.1,L,BEPA,N,320
,PR,CF,DT5.1,,A,C,400
,NIC,CF,DT5.1,,A,C,-280
,ACA,CF,DT5.1,,A,C,-10
,AEA,CF,DT5.1,,A,C,-5
,PR,CF,DT5.1,,APA,C,320
,,CF,DT5.1,,DA,C,-15
,,EA,DT5.1,,C,C,-15
,,AM,DT5.1,,DA,C,9.843447868559382
,,AM,DT5.1,,C,C,-82.02271122089925
,,EOP,DT5.1,,DA,C,-5.156552131440618
,,EOP,DT5.1,,C,C,42.9681136142967
,,BOP,DT5.1,,C,N,139.90849210284577
,,IA,DT5.1,,C,N,0.08233273235018213
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,12 @@
"await UploadActualAsync(\"../Files/900.TransactionalData/Actuals_CH_2021_3.csv\")"
]
},
{
"cell_type": "code",
"source": [
"await UploadSimpleValueAsync(\"../Files/900.TransactionalData/SimpleValue_CH_2020_12.csv\")"
]
},
{
"cell_type": "markdown",
"source": [
Expand Down
22 changes: 13 additions & 9 deletions ifrs17/Import/Importers.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1065,21 +1065,25 @@
"\n EstimateType = estimateType,",
"\n EconomicBasis = economicBasis,",
"\n Partition = parsingStorage.TargetPartitionByReportingNodeAndPeriod.Id,",
"\n Value = GetSign((aocStep.AocType, amountType, estimateType, parsingStorage.IsDataNodeReinsurance(dataNode)), parsingStorage.HierarchyCache)",
"\n Value = //GetSign((aocStep.AocType, amountType, estimateType, parsingStorage.IsDataNodeReinsurance(dataNode)), parsingStorage.HierarchyCache)",
"\n 1 // TODO, we need to adjust the inputs to have the correct sign, so that the default GetSign returns 1.",
"\n * datarow.Field<string>(nameof(IfrsVariable.Value)).CheckStringForExponentialAndConvertToDouble()",
"\n };",
"\n return iv;",
"\n }, importFormat",
"\n }, importFormat // This should indicate the table name, not the input format",
"\n ).WithTarget(Workspace).ExecuteAsync();",
"\n ",
"\n HashSet<string> availableEstimateTypes = parsingStorage.TechnicalMarginEstimateTypes;",
"\n var multipleOp = await Workspace.Query<IfrsVariable>().Where(iv => availableEstimateTypes.Contains(iv.EstimateType))",
"\n .GroupBy(iv => iv.DataNode)",
"\n .Where(g => g.Count() > 1).ToArrayAsync();",
"\n //.Select(g => ApplicationMessage.Log(Error.MultipleTechnicalMarginOpening, g.Key));",
"\n // Checking if there are inconsistencies in the TechnicalMarginEstimateTypes --> double entries in the steps where we expect to have unique values",
"\n var invalidVariables = await Workspace.Query<IfrsVariable>()",
"\n .Where(iv => parsingStorage.TechnicalMarginEstimateTypes.Contains(iv.EstimateType))",
"\n .Where(iv => iv.AocType == AocTypes.BOP || iv.AocType == AocTypes.EOP || iv.AocType == AocTypes.AM || iv.AocType == AocTypes.EA)",
"\n .GroupBy(iv => new {iv.DataNode, iv.AocType, iv.Novelty})",
"\n .Where(g => g.Count() > 1)",
"\n .Select(g => g.Key)",
"\n .ToArrayAsync();",
"\n ",
"\n foreach (var op in multipleOp)",
"\n ApplicationMessage.Log(Error.MultipleTechnicalMarginOpening, op.Key);",
"\n foreach (var iv in invalidVariables)",
"\n ApplicationMessage.Log(Error.MultipleTechnicalMarginOpening, $\"{iv.DataNode},{iv.AocType},{iv.Novelty}\");",
"\n ",
"\n await ValidateForDataNodeStateActiveAsync<IfrsVariable>(parsingStorage.DataNodeDataBySystemName);",
"\n targetPartitionByReportingNodeAndPeriodId = parsingStorage.TargetPartitionByReportingNodeAndPeriod.Id;",
Expand Down