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

Large diffs are not rendered by default.

315 changes: 315 additions & 0 deletions ifrs17-template/Report/ReportProjections.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,315 @@
{
"metadata": {
"authors": [],
"id": "Y2xneag7L0C-2tMktaAHBg",
"kernelspec": {
"display_name": "Formula Framework",
"language": "C#",
"name": "C#"
},
"language_info": {
"file_extension": ".cs",
"mimetype": "text/plain",
"name": "C#"
}
},
"nbformat": 4,
"nbformat_minor": 5,
"cells": [
{
"cell_type": "markdown",
"source": [
"<a id='report-production'></a>",
"\n<p style=\"font-weight:bold;\"> <span style=\"font-size: 36px\"> Report for Projections</span> </p>"
],
"metadata": {},
"execution_count": 0,
"outputs": []
},
{
"cell_type": "markdown",
"source": [
"The Reports shown in this notebook illustrate how projections can be displayed in the reports."
],
"metadata": {},
"execution_count": 0,
"outputs": []
},
{
"cell_type": "markdown",
"source": [
"# Set up data and configuration"
],
"metadata": {},
"execution_count": 0,
"outputs": []
},
{
"cell_type": "code",
"source": [
"#!import \"../Initialization/InitSystemorphToMemory\""
],
"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();",
"\nProjectionCount = 11;",
"\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": "code",
"source": [
"Workspace.InitializeFrom(DataSource);",
"\nifrs17.Reset(Workspace)"
],
"metadata": {},
"execution_count": 0,
"outputs": []
},
{
"cell_type": "markdown",
"source": [
"# Report configuration"
],
"metadata": {},
"execution_count": 0,
"outputs": []
},
{
"cell_type": "code",
"source": [
"var reportingNode = \"CH\";",
"\nvar reportingPeriod = (2021, 3);",
"\nvar projection = \"P17\";"
],
"metadata": {},
"execution_count": 0,
"outputs": []
},
{
"cell_type": "code",
"source": [
"var pv = ifrs17.PresentValues;",
"\npv.ReportingNode = reportingNode;",
"\npv.ReportingPeriod = reportingPeriod;",
"\npv.Projection = projection;",
"\npv.ColumnSlices = new string[]{\"Projection\"};"
],
"metadata": {},
"execution_count": 0,
"outputs": []
},
{
"cell_type": "code",
"source": [
"var ra = ifrs17.RiskAdjustments;",
"\nra.ReportingNode = reportingNode;",
"\nra.ReportingPeriod = reportingPeriod;",
"\nra.Projection = projection;",
"\nra.ColumnSlices = new string[]{\"Projection\"};"
],
"metadata": {},
"execution_count": 0,
"outputs": []
},
{
"cell_type": "code",
"source": [
"var experienceAdjustments = ifrs17.ExperienceAdjustments;",
"\nexperienceAdjustments.ReportingNode = reportingNode;",
"\nexperienceAdjustments.ReportingPeriod = reportingPeriod;",
"\nexperienceAdjustments.Projection = projection;",
"\nexperienceAdjustments.RowSlices = new string[]{\"AmountType\", \"EstimateType\"};",
"\nexperienceAdjustments.ColumnSlices = new string[]{\"Projection\"};"
],
"metadata": {},
"execution_count": 0,
"outputs": []
},
{
"cell_type": "code",
"source": [
"var allocatedTechnicalMargins = ifrs17.AllocatedTechnicalMargins;",
"\nallocatedTechnicalMargins.ReportingNode = reportingNode;",
"\nallocatedTechnicalMargins.ReportingPeriod = reportingPeriod;",
"\nallocatedTechnicalMargins.Projection = projection;",
"\nallocatedTechnicalMargins.ColumnSlices = new string[]{\"Projection\", \"EstimateType\"};"
],
"metadata": {},
"execution_count": 0,
"outputs": []
},
{
"cell_type": "code",
"source": [
"var actuarialLrc = ifrs17.ActuarialLrc;",
"\nactuarialLrc.ReportingNode = reportingNode;",
"\nactuarialLrc.ReportingPeriod = reportingPeriod;",
"\nactuarialLrc.Projection = projection;",
"\nactuarialLrc.ColumnSlices = new string[]{\"Projection\", \"EstimateType\"};"
],
"metadata": {},
"execution_count": 0,
"outputs": []
},
{
"cell_type": "code",
"source": [
"var actuarialLic = ifrs17.ActuarialLic;",
"\nactuarialLic.ReportingNode = reportingNode;",
"\nactuarialLic.ReportingPeriod = reportingPeriod;",
"\nactuarialLic.Projection = projection;",
"\nactuarialLic.ColumnSlices = new string[]{\"Projection\", \"EstimateType\"};"
],
"metadata": {},
"execution_count": 0,
"outputs": []
},
{
"cell_type": "code",
"source": [
"var financialPerformanceAlternative = ifrs17.FinancialPerformanceAlternative;",
"\nfinancialPerformanceAlternative.ReportingNode = reportingNode;",
"\nfinancialPerformanceAlternative.ReportingPeriod = reportingPeriod;",
"\nfinancialPerformanceAlternative.Projection = projection;",
"\nfinancialPerformanceAlternative.ColumnSlices = new string[]{\"Projection\"};"
],
"metadata": {},
"execution_count": 0,
"outputs": []
},
{
"cell_type": "markdown",
"source": [
"# Reports",
"\n"
],
"metadata": {},
"execution_count": 0,
"outputs": []
},
{
"cell_type": "code",
"source": [
"var dataFilter = new [] {(\"GroupOfContract\", \"DTP1.1\")};"
],
"metadata": {},
"execution_count": 0,
"outputs": []
},
{
"cell_type": "markdown",
"source": [
"## Best Estimate",
"\n",
"\nProjections for Best Estimate until run-off."
],
"metadata": {},
"execution_count": 0,
"outputs": []
},
{
"cell_type": "code",
"source": [
"pv.DataFilter = dataFilter; (await pv.ToReportAsync)"
],
"metadata": {},
"execution_count": 0,
"outputs": []
},
{
"cell_type": "markdown",
"source": [
"## Actuarial Experience Adjustment",
"\n",
"\nSince we do not physically store any Actuals, we will see Experience Adjustments"
],
"metadata": {},
"execution_count": 0,
"outputs": []
},
{
"cell_type": "code",
"source": [
"experienceAdjustments.DataFilter = dataFilter; (await experienceAdjustments.ToReportAsync)"
],
"metadata": {},
"execution_count": 0,
"outputs": []
},
{
"cell_type": "markdown",
"source": [
"## Contractual Service Margin / Loss Component / Loss Recovery Component",
"\n",
"\nFor CSM/LC/Loreco, we assume Actuals equal to Expected for projections. Since Actuals are not imported in this example, we see Experience Adjustment for the current period."
],
"metadata": {},
"execution_count": 0,
"outputs": []
},
{
"cell_type": "code",
"source": [
"allocatedTechnicalMargins.DataFilter = dataFilter; (await allocatedTechnicalMargins.ToReportAsync)"
],
"metadata": {},
"execution_count": 0,
"outputs": []
},
{
"cell_type": "markdown",
"source": [
"## LRC Actuarial"
],
"metadata": {},
"execution_count": 0,
"outputs": []
},
{
"cell_type": "code",
"source": [
"actuarialLrc.DataFilter = dataFilter; (await actuarialLrc.ToReportAsync)"
],
"metadata": {},
"execution_count": 0,
"outputs": []
},
{
"cell_type": "markdown",
"source": [
"## Financial Performance"
],
"metadata": {},
"execution_count": 0,
"outputs": []
},
{
"cell_type": "code",
"source": [
"financialPerformanceAlternative.DataFilter = dataFilter; (await financialPerformanceAlternative.ToReportAsync) with {GroupDefaultExpanded = 3}"
],
"metadata": {},
"execution_count": 0,
"outputs": []
}
]
}
6 changes: 4 additions & 2 deletions ifrs17-template/Test/Data/ExportIfrsVariable.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,14 @@
"\n .WithTarget(DataSource)",
"\n .WithActivityLog()",
"\n .ExecuteAsync();",
"\nProjectionCount = 11;",
"\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;"
"\nProjectionCount = 1;",
"\n(Activity1: activity1.Status, Errors1:activity1.Errors, Activity2:activity2.Status, Errors2:activity2.Errors)"
],
"metadata": {},
"execution_count": 0,
Expand Down Expand Up @@ -289,7 +291,7 @@
{
"cell_type": "code",
"source": [
"ifrsVariables"
""
],
"metadata": {},
"execution_count": 0,
Expand Down
Loading