Skip to content

Commit

Permalink
Slice by accident year current and previous (#300)
Browse files Browse the repository at this point in the history
* slice by accident year current and previous

* rename

* update bm
  • Loading branch information
dcolleoni authored May 8, 2023
1 parent fd38a2d commit 610b0aa
Show file tree
Hide file tree
Showing 7 changed files with 3,273 additions and 3,245 deletions.
2 changes: 1 addition & 1 deletion ifrs17-template/Report/Reports.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
"\npv.ReportingNode = \"CH\";",
"\npv.ReportingPeriod = (2021, 3);",
"\npv.CurrencyType = CurrencyType.Contractual;",
"\npv.ColumnSlices = new string[]{};//\"GroupOfContract\", \"AmountType\", \"Scenario\"",
"\npv.ColumnSlices = new string[]{};//\"GroupOfContract\", \"AmountType\", \"Scenario\", \"ServicePeriod\"",
"\npv.Scenario = null; //\"All\";",
"\npv.DataFilter = null; //new [] {(\"GroupOfContract\", \"DT1.2\"),(\"LiabilityType\", \"LIC\") };",
"\n(await pv.ToReportAsync)"
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

18 changes: 18 additions & 0 deletions ifrs17/Constants/Enums.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,24 @@
"metadata": {},
"execution_count": 0,
"outputs": []
},
{
"cell_type": "markdown",
"source": [
"# Report Variable"
],
"metadata": {},
"execution_count": 0,
"outputs": []
},
{
"cell_type": "code",
"source": [
"public enum ServicePeriod{ NotApplicable, PastService, CurrentService, FutureService }"
],
"metadata": {},
"execution_count": 0,
"outputs": []
}
]
}
10 changes: 8 additions & 2 deletions ifrs17/DataModel/DataStructure.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1963,12 +1963,17 @@
"\n [Dimension(typeof(int), nameof(AccidentYear))]",
"\n [IdentityProperty]",
"\n public int AccidentYear { get; init; }",
"\n ",
"\n",
"\n [NotVisible]",
"\n [Dimension(typeof(ServicePeriod))]",
"\n [IdentityProperty]",
"\n public ServicePeriod ServicePeriod { get; init; }",
"\n",
"\n [NotVisible]",
"\n [NoArithmetics(ArithmeticOperation.Scale)]",
"\n [Dimension(typeof(ProjectionConfiguration), nameof(Projection))]",
"\n [IdentityProperty]",
"\n //[AggregateBy]",
"\n [AggregateBy]",
"\n public string Projection { get; init;}",
"\n ",
"\n [NotVisible]",
Expand Down Expand Up @@ -2016,6 +2021,7 @@
"\n Partner = rv.Partner;",
"\n IsReinsurance = rv.IsReinsurance;",
"\n AccidentYear = rv.AccidentYear;",
"\n ServicePeriod = rv.ServicePeriod;",
"\n Projection = rv.Projection;",
"\n VariableType = rv.VariableType;",
"\n Novelty = rv.Novelty;",
Expand Down
4 changes: 4 additions & 0 deletions ifrs17/Report/ReportConfigurationAndUtils.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,10 @@
"\n ",
"\n //LIC",
"\n AccidentYear = iv.AccidentYear == null ? default : (int)iv.AccidentYear,",
"\n ServicePeriod = ",
"\n dn.LiabilityType == LiabilityTypes.LIC",
"\n ? iv.AccidentYear == args.Year ? ServicePeriod.CurrentService : ServicePeriod.PastService",
"\n : ServicePeriod.NotApplicable,",
"\n ",
"\n Projection = \"P0\",//Assign the correct value for each projection (check ProjectionConfiguration values)",
"\n Value = iv.Values.ElementAtOrDefault(0) })",
Expand Down

0 comments on commit 610b0aa

Please sign in to comment.