diff --git a/ifrs17-template/Images/QuotaShareReinsurance.png b/ifrs17-template/Images/QuotaShareReinsurance.png new file mode 100644 index 00000000..242ca134 Binary files /dev/null and b/ifrs17-template/Images/QuotaShareReinsurance.png differ diff --git a/ifrs17-template/Images/QuotaShareReinsurance2.png b/ifrs17-template/Images/QuotaShareReinsurance2.png new file mode 100644 index 00000000..5e504624 Binary files /dev/null and b/ifrs17-template/Images/QuotaShareReinsurance2.png differ diff --git a/ifrs17-template/PracticalUseCases/CompareReinsuranceContracts/Actual_CH_2020_12_BE.csv b/ifrs17-template/PracticalUseCases/CompareReinsuranceContracts/Actual_CH_2020_12_BE.csv new file mode 100644 index 00000000..14f9777c --- /dev/null +++ b/ifrs17-template/PracticalUseCases/CompareReinsuranceContracts/Actual_CH_2020_12_BE.csv @@ -0,0 +1,11 @@ +@@Main,,,,, +ReportingNode,Year,Month,,, +CH,2020,12,,, +@@Actual,,,,, +DataNode,AocType,AmountType,EstimateType,AccidentYear,Value +RP1.1,CF,PR,A,,1000 +RP1.1,CF,NIC,A,,-600 +RP1.1,CF,AEM,A,,-300 +RPR1.1,CF,PR,A,,-300 +RPR1.1,CF,NIC,A,,180 +RPR1.1,CF,AC,A,,105 diff --git a/ifrs17-template/PracticalUseCases/CompareReinsuranceContracts/Actual_CH_2020_12_ELR60A70.csv b/ifrs17-template/PracticalUseCases/CompareReinsuranceContracts/Actual_CH_2020_12_ELR60A70.csv new file mode 100644 index 00000000..68943f13 --- /dev/null +++ b/ifrs17-template/PracticalUseCases/CompareReinsuranceContracts/Actual_CH_2020_12_ELR60A70.csv @@ -0,0 +1,11 @@ +@@Main,,,,, +ReportingNode,Year,Month,Scenario,, +CH,2020,12,ELR60A70,, +@@Actual,,,,, +DataNode,AocType,AmountType,EstimateType,AccidentYear,Value +RP1.1,CF,PR,A,,1000 +RP1.1,CF,NIC,A,,-700 +RP1.1,CF,AEM,A,,-300 +RPR1.1,CF,PR,A,,-300 +RPR1.1,CF,NIC,A,,210 +RPR1.1,CF,AC,A,,105 diff --git a/ifrs17-template/PracticalUseCases/CompareReinsuranceContracts/Actual_CH_2020_12_ELR60A80.csv b/ifrs17-template/PracticalUseCases/CompareReinsuranceContracts/Actual_CH_2020_12_ELR60A80.csv new file mode 100644 index 00000000..e58f9304 --- /dev/null +++ b/ifrs17-template/PracticalUseCases/CompareReinsuranceContracts/Actual_CH_2020_12_ELR60A80.csv @@ -0,0 +1,11 @@ +@@Main,,,,, +ReportingNode,Year,Month,Scenario,, +CH,2020,12,ELR60A80,, +@@Actual,,,,, +DataNode,AocType,AmountType,EstimateType,AccidentYear,Value +RP1.1,CF,PR,A,,1000 +RP1.1,CF,NIC,A,,-800 +RP1.1,CF,AEM,A,,-300 +RPR1.1,CF,PR,A,,-300 +RPR1.1,CF,NIC,A,,240 +RPR1.1,CF,AC,A,,105 diff --git a/ifrs17-template/PracticalUseCases/CompareReinsuranceContracts/Actual_CH_2020_12_LR70.csv b/ifrs17-template/PracticalUseCases/CompareReinsuranceContracts/Actual_CH_2020_12_LR70.csv new file mode 100644 index 00000000..025df1ea --- /dev/null +++ b/ifrs17-template/PracticalUseCases/CompareReinsuranceContracts/Actual_CH_2020_12_LR70.csv @@ -0,0 +1,11 @@ +@@Main,,,,, +ReportingNode,Year,Month,Scenario,, +CH,2020,12,LR70,, +@@Actual,,,,, +DataNode,AocType,AmountType,EstimateType,AccidentYear,Value +RP1.1,CF,PR,A,,1000 +RP1.1,CF,NIC,A,,-700 +RP1.1,CF,AEM,A,,-300 +RPR1.1,CF,PR,A,,-300 +RPR1.1,CF,NIC,A,,210 +RPR1.1,CF,AC,A,,105 diff --git a/ifrs17-template/PracticalUseCases/CompareReinsuranceContracts/Actual_CH_2020_12_LR80.csv b/ifrs17-template/PracticalUseCases/CompareReinsuranceContracts/Actual_CH_2020_12_LR80.csv new file mode 100644 index 00000000..38aba505 --- /dev/null +++ b/ifrs17-template/PracticalUseCases/CompareReinsuranceContracts/Actual_CH_2020_12_LR80.csv @@ -0,0 +1,11 @@ +@@Main,,,,, +ReportingNode,Year,Month,Scenario,, +CH,2020,12,LR80,, +@@Actual,,,,, +DataNode,AocType,AmountType,EstimateType,AccidentYear,Value +RP1.1,CF,PR,A,,1000 +RP1.1,CF,NIC,A,,-800 +RP1.1,CF,AEM,A,,-300 +RPR1.1,CF,PR,A,,-300 +RPR1.1,CF,NIC,A,,240 +RPR1.1,CF,AC,A,,105 diff --git a/ifrs17-template/PracticalUseCases/CompareReinsuranceContracts/DataImport.ipynb b/ifrs17-template/PracticalUseCases/CompareReinsuranceContracts/DataImport.ipynb new file mode 100644 index 00000000..71c126c7 --- /dev/null +++ b/ifrs17-template/PracticalUseCases/CompareReinsuranceContracts/DataImport.ipynb @@ -0,0 +1,283 @@ +{ + "metadata": { + "authors": [], + "id": "YGWMnwRniU64QZaE2oBrFw", + "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": [ + "

Contractual Service Margin and Loss Component Switch Data Import

" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "markdown", + "source": [ + "This is the Data Import notebook for the Contractual Service Margin and Loss Component Switch case.", + "\n" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "markdown", + "source": [ + "# Set up and data import" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "markdown", + "source": [ + "## Reference Data and Parameters" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "#!import \"../../Initialization/InitSystemorphRefDataToMemory\"" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "markdown", + "source": [ + "# Scenarios" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "await Import.FromFile(\"Scenarios.csv\").WithType().WithTarget(DataSource).WithActivityLog().ExecuteAsync()" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "markdown", + "source": [ + "## Data Nodes" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "await Import.FromFile(\"DataNodes_CH.csv\").WithFormat(ImportFormats.DataNode).WithTarget(DataSource).WithActivityLog().ExecuteAsync()" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "await Import.FromFile(\"DataNodeStates_CH_2020_12.csv\").WithFormat(ImportFormats.DataNodeState).WithTarget(DataSource).WithActivityLog().ExecuteAsync()" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "await Import.FromFile(\"DataNodeParameters_CH_2020_12.csv\").WithFormat(ImportFormats.DataNodeParameter).WithTarget(DataSource).WithActivityLog().ExecuteAsync()" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "markdown", + "source": [ + "# Best Estimate - Loss Ratio 60%" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "markdown", + "source": [ + "### importing first GIC: 2020 12 for fully retrospective calculation and 2021 3 for the current calculation" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "await Import.FromFile(\"Actual_CH_2020_12_BE.csv\").WithFormat(ImportFormats.Actual).WithTarget(DataSource).WithActivityLog().ExecuteAsync()" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "await Import.FromFile(\"NominalCashflows_CH_2020_12_BE.csv\").WithFormat(ImportFormats.Cashflow).WithTarget(DataSource).WithActivityLog().ExecuteAsync()" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "markdown", + "source": [ + "# Import Scenarios" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "markdown", + "source": [ + "## Loss Ratio 70%" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "await Import.FromFile(\"Actual_CH_2020_12_LR70.csv\").WithFormat(ImportFormats.Actual).WithTarget(DataSource).WithActivityLog().ExecuteAsync()" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "await Import.FromFile(\"NominalCashflows_CH_2020_12_LR70.csv\").WithFormat(ImportFormats.Cashflow).WithTarget(DataSource).WithActivityLog().ExecuteAsync()" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "markdown", + "source": [ + "## Loss Ratio 80%" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "await Import.FromFile(\"Actual_CH_2020_12_LR80.csv\").WithFormat(ImportFormats.Actual).WithTarget(DataSource).WithActivityLog().ExecuteAsync()" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "await Import.FromFile(\"NominalCashflows_CH_2020_12_LR80.csv\").WithFormat(ImportFormats.Cashflow).WithTarget(DataSource).WithActivityLog().ExecuteAsync()" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "markdown", + "source": [ + "## Expected Loss Ratio 60% (BE) Actual 70%" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "await Import.FromFile(\"Actual_CH_2020_12_ELR60A70.csv\").WithFormat(ImportFormats.Actual).WithTarget(DataSource).WithActivityLog().ExecuteAsync()" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "markdown", + "source": [ + "## Expected Loss Ratio 60% (BE) Actual 80%" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "await Import.FromFile(\"Actual_CH_2020_12_ELR60A80.csv\").WithFormat(ImportFormats.Actual).WithTarget(DataSource).WithActivityLog().ExecuteAsync()" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "markdown", + "source": [ + "# Initialize Workspace" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "Workspace.Reset(x => x.ResetInitializationRules().ResetCurrentPartitions());", + "\nWorkspace.InitializeFrom(DataSource);" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + } + ] +} \ No newline at end of file diff --git a/ifrs17-template/PracticalUseCases/CompareReinsuranceContracts/DataNodeParameters_CH_2020_12.csv b/ifrs17-template/PracticalUseCases/CompareReinsuranceContracts/DataNodeParameters_CH_2020_12.csv new file mode 100644 index 00000000..bb53a8a8 --- /dev/null +++ b/ifrs17-template/PracticalUseCases/CompareReinsuranceContracts/DataNodeParameters_CH_2020_12.csv @@ -0,0 +1,11 @@ +@@Main,, +ReportingNode,Year,Month,Scenario +CH,2020,12 +,, +@@SingleDataNodeParameter,, +DataNode,PremiumAllocation, +RP1.1,0.0 +,, +@@InterDataNodeParameter,, +DataNode,LinkedDataNode,ReinsuranceCoverage +RP1.1,RPR1.1,0.3 diff --git a/ifrs17-template/PracticalUseCases/CompareReinsuranceContracts/DataNodeStates_CH_2020_12.csv b/ifrs17-template/PracticalUseCases/CompareReinsuranceContracts/DataNodeStates_CH_2020_12.csv new file mode 100644 index 00000000..576d5bd0 --- /dev/null +++ b/ifrs17-template/PracticalUseCases/CompareReinsuranceContracts/DataNodeStates_CH_2020_12.csv @@ -0,0 +1,8 @@ +@@Main +ReportingNode,Year,Month,Scenario +CH,2020,12, + +@@DataNodeState,, +DataNode,State, +RP1.1,Active, +RPR1.1,Active, diff --git a/ifrs17-template/PracticalUseCases/CompareReinsuranceContracts/DataNodes_CH.csv b/ifrs17-template/PracticalUseCases/CompareReinsuranceContracts/DataNodes_CH.csv new file mode 100644 index 00000000..ca3696e5 --- /dev/null +++ b/ifrs17-template/PracticalUseCases/CompareReinsuranceContracts/DataNodes_CH.csv @@ -0,0 +1,15 @@ +@@Main +ReportingNode +CH +@@InsurancePortfolio +SystemName,DisplayName,ContractualCurrency,LineOfBusiness,ValuationApproach,OciType, +RP1,Insurance Portfolio,USD,ANN,BBA,Default, +@@GroupOfInsuranceContract +SystemName,DisplayName,InsurancePortfolio,AnnualCohort,LiabilityType,Profitability, +RP1.1,Gross Business Reinsured,RP1,2020,LRC,O, +@@ReinsurancePortfolio +SystemName,DisplayName,ContractualCurrency,LineOfBusiness,ValuationApproach,OciType, +RPR1,Reinsurance Portfolio,USD,ANN,BBA,Default, +@@GroupOfReinsuranceContract +SystemName,DisplayName,ReinsurancePortfolio,AnnualCohort,LiabilityType,Profitability,Partner +RPR1.1,Reinsurance Contract,RPR1,2020,LRC,P,PT1 diff --git a/ifrs17-template/PracticalUseCases/CompareReinsuranceContracts/NominalCashflows_CH_2020_12_BE.csv b/ifrs17-template/PracticalUseCases/CompareReinsuranceContracts/NominalCashflows_CH_2020_12_BE.csv new file mode 100644 index 00000000..11b389f9 --- /dev/null +++ b/ifrs17-template/PracticalUseCases/CompareReinsuranceContracts/NominalCashflows_CH_2020_12_BE.csv @@ -0,0 +1,19 @@ +@@Main,,,,,,,,,,,,,,,,, +ReportingNode,Year,Month,Scenario,,,,,,,,,,,,,, +CH,2020,12,,,,,,,,,,,,,,, +@@Cashflow,,,,,,,,,,,,,,,,, +DataNode,AmountType,EstimateType,AocType,Novelty,AccidentYear,Values0,Values1,Values2,Values3,Values4,Values5,Values6,Values7,Values8,Values9,Values10,Values11 +RP1.1,,CU,CL,C,,83.33333333,83.33333333,83.33333333,83.33333333,83.33333333,83.33333333,83.33333333,83.33333333,83.33333333,83.33333333,83.33333333,83.33333333 +RPR1.1,,CU,CL,C,,50,50,50,50,50,50,50,50,50,50,50,50 +RP1.1,PR,BE,BOP,N,,83.33333333,83.33333333,83.33333333,83.33333333,83.33333333,83.33333333,83.33333333,83.33333333,83.33333333,83.33333333,83.33333333,83.33333333 +RP1.1,PR,BE,CL,C,,0,0,0,0,0,0,0,0,0,0,0,0 +RP1.1,NIC,BE,BOP,N,,-50,-50,-50,-50,-50,-50,-50,-50,-50,-50,-50,-50 +RP1.1,NIC,BE,CL,C,,0,0,0,0,0,0,0,0,0,0,0,0 +RP1.1,AEM,BE,BOP,N,,-25,-25,-25,-25,-25,-25,-25,-25,-25,-25,-25,-25 +RP1.1,AEM,BE,CL,C,,0,0,0,0,0,0,0,0,0,0,0,0 +RPR1.1,PR,BE,BOP,N,,-25,-25,-25,-25,-25,-25,-25,-25,-25,-25,-25,-25 +RPR1.1,PR,BE,CL,C,,0,0,0,0,0,0,0,0,0,0,0,0 +RPR1.1,NIC,BE,BOP,N,,15,15,15,15,15,15,15,15,15,15,15,15 +RPR1.1,NIC,BE,CL,C,,0,0,0,0,0,0,0,0,0,0,0,0 +RPR1.1,AC,BE,BOP,N,,8.75,8.75,8.75,8.75,8.75,8.75,8.75,8.75,8.75,8.75,8.75,8.75 +RPR1.1,AC,BE,CL,C,,0,0,0,0,0,0,0,0,0,0,0,0 diff --git a/ifrs17-template/PracticalUseCases/CompareReinsuranceContracts/NominalCashflows_CH_2020_12_LR70.csv b/ifrs17-template/PracticalUseCases/CompareReinsuranceContracts/NominalCashflows_CH_2020_12_LR70.csv new file mode 100644 index 00000000..c0bd388a --- /dev/null +++ b/ifrs17-template/PracticalUseCases/CompareReinsuranceContracts/NominalCashflows_CH_2020_12_LR70.csv @@ -0,0 +1,19 @@ +@@Main,,,,,,,,,,,,,,,,, +ReportingNode,Year,Month,Scenario,,,,,,,,,,,,,, +CH,2020,12,LR70,,,,,,,,,,,,,, +@@Cashflow,,,,,,,,,,,,,,,,, +DataNode,AmountType,EstimateType,AocType,Novelty,AccidentYear,Values0,Values1,Values2,Values3,Values4,Values5,Values6,Values7,Values8,Values9,Values10,Values11 +RP1.1,,CU,CL,C,,83.33333333,83.33333333,83.33333333,83.33333333,83.33333333,83.33333333,83.33333333,83.33333333,83.33333333,83.33333333,83.33333333,83.33333333 +RPR1.1,,CU,CL,C,,58.33333333,58.33333333,58.33333333,58.33333333,58.33333333,58.33333333,58.33333333,58.33333333,58.33333333,58.33333333,58.33333333,58.33333333 +RP1.1,PR,BE,BOP,N,,83.33333333,83.33333333,83.33333333,83.33333333,83.33333333,83.33333333,83.33333333,83.33333333,83.33333333,83.33333333,83.33333333,83.33333333 +RP1.1,PR,BE,CL,C,,0,0,0,0,0,0,0,0,0,0,0,0 +RP1.1,NIC,BE,BOP,N,,-58.33333333,-58.33333333,-58.33333333,-58.33333333,-58.33333333,-58.33333333,-58.33333333,-58.33333333,-58.33333333,-58.33333333,-58.33333333,-58.33333333 +RP1.1,NIC,BE,CL,C,,0,0,0,0,0,0,0,0,0,0,0,0 +RP1.1,AEM,BE,BOP,N,,-25,-25,-25,-25,-25,-25,-25,-25,-25,-25,-25,-25 +RP1.1,AEM,BE,CL,C,,0,0,0,0,0,0,0,0,0,0,0,0 +RPR1.1,PR,BE,BOP,N,,-25,-25,-25,-25,-25,-25,-25,-25,-25,-25,-25,-25 +RPR1.1,PR,BE,CL,C,,0,0,0,0,0,0,0,0,0,0,0,0 +RPR1.1,NIC,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 +RPR1.1,NIC,BE,CL,C,,0,0,0,0,0,0,0,0,0,0,0,0 +RPR1.1,AC,BE,BOP,N,,8.75,8.75,8.75,8.75,8.75,8.75,8.75,8.75,8.75,8.75,8.75,8.75 +RPR1.1,AC,BE,CL,C,,0,0,0,0,0,0,0,0,0,0,0,0 diff --git a/ifrs17-template/PracticalUseCases/CompareReinsuranceContracts/NominalCashflows_CH_2020_12_LR80.csv b/ifrs17-template/PracticalUseCases/CompareReinsuranceContracts/NominalCashflows_CH_2020_12_LR80.csv new file mode 100644 index 00000000..6f1d5cdb --- /dev/null +++ b/ifrs17-template/PracticalUseCases/CompareReinsuranceContracts/NominalCashflows_CH_2020_12_LR80.csv @@ -0,0 +1,19 @@ +@@Main,,,,,,,,,,,,,,,,, +ReportingNode,Year,Month,Scenario,,,,,,,,,,,,,, +CH,2020,12,LR80,,,,,,,,,,,,,, +@@Cashflow,,,,,,,,,,,,,,,,, +DataNode,AmountType,EstimateType,AocType,Novelty,AccidentYear,Values0,Values1,Values2,Values3,Values4,Values5,Values6,Values7,Values8,Values9,Values10,Values11 +RP1.1,,CU,CL,C,,83.33333333,83.33333333,83.33333333,83.33333333,83.33333333,83.33333333,83.33333333,83.33333333,83.33333333,83.33333333,83.33333333,83.33333333 +RPR1.1,,CU,CL,C,,66.66666667,66.66666667,66.66666667,66.66666667,66.66666667,66.66666667,66.66666667,66.66666667,66.66666667,66.66666667,66.66666667,66.66666667 +RP1.1,PR,BE,BOP,N,,83.33333333,83.33333333,83.33333333,83.33333333,83.33333333,83.33333333,83.33333333,83.33333333,83.33333333,83.33333333,83.33333333,83.33333333 +RP1.1,PR,BE,CL,C,,0,0,0,0,0,0,0,0,0,0,0,0 +RP1.1,NIC,BE,BOP,N,,-66.66666667,-66.66666667,-66.66666667,-66.66666667,-66.66666667,-66.66666667,-66.66666667,-66.66666667,-66.66666667,-66.66666667,-66.66666667,-66.66666667 +RP1.1,NIC,BE,CL,C,,0,0,0,0,0,0,0,0,0,0,0,0 +RP1.1,AEM,BE,BOP,N,,-25,-25,-25,-25,-25,-25,-25,-25,-25,-25,-25,-25 +RP1.1,AEM,BE,CL,C,,0,0,0,0,0,0,0,0,0,0,0,0 +RPR1.1,PR,BE,BOP,N,,-25,-25,-25,-25,-25,-25,-25,-25,-25,-25,-25,-25 +RPR1.1,PR,BE,CL,C,,0,0,0,0,0,0,0,0,0,0,0,0 +RPR1.1,NIC,BE,BOP,N,,20,20,20,20,20,20,20,20,20,20,20,20 +RPR1.1,NIC,BE,CL,C,,0,0,0,0,0,0,0,0,0,0,0,0 +RPR1.1,AC,BE,BOP,N,,8.75,8.75,8.75,8.75,8.75,8.75,8.75,8.75,8.75,8.75,8.75,8.75 +RPR1.1,AC,BE,CL,C,,0,0,0,0,0,0,0,0,0,0,0,0 diff --git a/ifrs17-template/PracticalUseCases/CompareReinsuranceContracts/Reports.ipynb b/ifrs17-template/PracticalUseCases/CompareReinsuranceContracts/Reports.ipynb new file mode 100644 index 00000000..db07a7b7 --- /dev/null +++ b/ifrs17-template/PracticalUseCases/CompareReinsuranceContracts/Reports.ipynb @@ -0,0 +1,471 @@ +{ + "metadata": { + "authors": [], + "id": "fSGCg42oXUOYruTUQPiNXg", + "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": [ + "

Quota Share Reinsurance

", + "\n", + "\n

Loss Ratio analysis

" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "markdown", + "source": [ + "# Case Study", + "\n", + "\n## Modelling Cash-flow inputs", + "\n", + "\nA simple Group of Insurance Contract with New Business and End Of Period runs is modeled over one year period with an expected Loss Ratio (LR) of 60%. We modeled the cashflows evenly distributed over time for both premium (1000 USD total), Claims, and Expenses (estimated to be 30% of Premiums). A Reinsurance Contract covers the above mentioned Insurance Contract. A Quota Share of 30% is considered and a Reinsurance Commission of 35% on the Reinsurance Premiums is modeled. Actual values entered matching the expected values. ", + "\n", + "\nAll these parameters are summarized in the following tables: ", + "\n

", + "\n| Insurance Contract | ||| Reinsurance Contract | |", + "\n|-----------------------|------|-|-----------------------|------|", + "\n| Total Premium (USD) | 1000 ||| Cession Share | 30% |", + "\n| Internal Expense | 30% ||| Commission | 35% |", + "\n
" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "markdown", + "source": [ + "## Scenarios ", + "\n", + "\nThe inputs descibed in [Modelling Cash-flow inputs](#modelling-cash-flow-inputs) defines the so called \"Best Estimate\" Scenario. This corresponds to what is expected to happen in reality. A scenario analysis is required by IFRS 17 Standards and it can be useful in many cases to analyse risks and take decisions on the future. For example one can easily study how the profit of the Insurance and Reinsuance Contracts modelled with the above mentioned parameter would perform under different values of Loss Ratio. ", + "\n

", + "\n
", + "\n", + "\n", + "\n


", + "\n
", + "\nIn the best estimate scenario (Loss Ratio 60%) we expect the net result of the Insurance and Reinsurance Group Contracts to be profitable, but the costs of having a Reinsurance Contract lower the total profit of the Insurance Group of Contract stand alone. At Loss Ratio of 70% the Group of Insurance Contracts is very close to zero margin and raising futher the Loss Ratio to 80% a Loss making scenario is obtained, where the effect of the Reinsurance contract clearly mitigates the losses as shown by the Net view. ", + "\n

", + "\nIn the current use case, we analyse the impact of the Loss Ratio on the relevant figures computed under IFRS 17 using our standard solution implementation.", + "\nFor simplicity, we consider the contribution of Risk Adjustment to be zero and locked-in and current yield curves are the same. ", + "\nWe have defined four scenarios in addition to the best estimate. We considered variations to the Loss Ratio up to 70% and 80%. In addition, we also studied the cases of having modelled the input cash flow assuming a Loss Ratio of 60% but the incurred actual cash flow producing a Loss Ratio of 70% and 80%. ", + "\n

", + "\n", + "\n| Scenario | Expected Loss Ratio | Actual Loss Ratio |", + "\n|------------------------------|---------------------|--------------------|", + "\n| Best Estimate | 60% | as expected |", + "\n| Loss Ratio 70 | 70% | as expected |", + "\n| Loss Ratio 80 | 80% | as expected |", + "\n| Expected LR 60 Actual LR 70 | 60% | 70% |", + "\n| Expected LR 60 Actual LR 80 | 60% | 80% |", + "\n", + "\n" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "markdown", + "source": [ + "# Data Import" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "#!eval-notebook \"DataImport\"" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "ifrs17 = new Ifrs17(Workspace, Scopes, Report, Export);" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "var reportingYear = 2020; ", + "\nvar reportingMonth = 12;" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "markdown", + "source": [ + "# Best Estimate", + "\n", + "\n" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "var pv = ifrs17.PresentValues;", + "\npv.ReportingNode = \"CH\";", + "\npv.ReportingPeriod = (reportingYear, reportingMonth);", + "\npv.CurrencyType = CurrencyType.Contractual;", + "\npv.ColumnSlices = new string[]{\"Scenario\",\"GroupOfContract\", \"AmountType\"};", + "\npv.DataFilter = new [] {(\"EconomicBasis\", \"L\")};//,(\"Scenario\",\"!ELR60A70\"),(\"Scenario\",\"!ELR60A80\")};", + "\npv.Scenario = \"All\";// null;//\"LR70\";//\"All\";", + "\n(await pv.ToReportAsync)" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "markdown", + "source": [ + "# Written Actuals" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "var writtenActual = ifrs17.WrittenActuals;", + "\nwrittenActual.ReportingNode = \"CH\";", + "\nwrittenActual.ReportingPeriod = (reportingYear, reportingMonth);", + "\nwrittenActual.ColumnSlices = new string[]{\"Scenario\", \"GroupOfContract\"};", + "\nwrittenActual.DataFilter = null;", + "\nwrittenActual.Scenario = \"All\";", + "\n(await writtenActual.ToReportAsync) with { GroupDefaultExpanded = 0}" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "markdown", + "source": [ + "# Actuarial Experience Adjustment" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "var experienceAdjustments = ifrs17.ExperienceAdjustments;", + "\nexperienceAdjustments.ReportingNode = \"CH\";", + "\nexperienceAdjustments.ReportingPeriod = (reportingYear, reportingMonth);", + "\nexperienceAdjustments.ColumnSlices = new string[]{\"Scenario\",\"GroupOfContract\"};//\"GroupOfContract\", \"AmountType\"", + "\nexperienceAdjustments.RowSlices = new string[]{\"AmountType\",\"EstimateType\"};//\"GroupOfContract\", \"AmountType\"", + "\nexperienceAdjustments.DataFilter = null; //new [] {(\"Scenario\", \"!LR70\"),(\"Scenario\", \"!LR80\")};", + "\nexperienceAdjustments.Scenario = \"All\";", + "\n(await experienceAdjustments.ToReportAsync) with { GroupDefaultExpanded = 0}" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "markdown", + "source": [ + "# Contractual Service Margin / Loss Component" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "var allocatedTechnicalMargins = ifrs17.AllocatedTechnicalMargins;", + "\nallocatedTechnicalMargins.ReportingNode = \"CH\";", + "\nallocatedTechnicalMargins.ReportingPeriod = (reportingYear, reportingMonth);", + "\nallocatedTechnicalMargins.ColumnSlices = new string[]{\"Scenario\", \"GroupOfContract\", \"EstimateType\"};", + "\nallocatedTechnicalMargins.DataFilter = new [] {(\"Scenario\",\"!ELR60A70\"),(\"Scenario\",\"!ELR60A80\")}; //new [] {(\"Scenario\", \"!LR70\"),(\"Scenario\", \"!LR80\")};", + "\n//allocatedTechnicalMargins.Scenario = null;", + "\nallocatedTechnicalMargins.Scenario = \"All\";", + "\n(await allocatedTechnicalMargins.ToReportAsync) with {Height = 700}" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "markdown", + "source": [ + "# LRC Actuarial", + "\n" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "var actuarialLrc = ifrs17.ActuarialLrc;", + "\nactuarialLrc.ReportingNode = \"CH\";", + "\nactuarialLrc.ReportingPeriod = (reportingYear, reportingMonth);", + "\nactuarialLrc.ColumnSlices = new string[]{\"Scenario\",\"GroupOfContract\",\"EstimateType\"};", + "\nactuarialLrc.DataFilter = new [] {(\"Scenario\",\"!ELR60A70\"),(\"Scenario\",\"!ELR60A80\")};", + "\nactuarialLrc.Scenario = \"All\";", + "\n(await actuarialLrc.ToReportAsync) with {Height = 750}" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "markdown", + "source": [ + "# Financial Performance", + "\n" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "var financialPerformance = ifrs17.FinancialPerformance;", + "\nfinancialPerformance.ReportingNode = \"CH\";", + "\nfinancialPerformance.ReportingPeriod = (reportingYear, reportingMonth);", + "\nfinancialPerformance.ColumnSlices = new string[]{\"Scenario\", \"GroupOfContract\"};", + "\nfinancialPerformance.RowSlices = new string[]{\"AmountType\"};", + "\nfinancialPerformance.DataFilter = null; //new []{(\"Scenario\",\"!LR70\"),(\"Scenario\",\"!ELR60A70\")};//new []{(\"Scenario\",\"!ELR60A70\"),(\"Scenario\",\"!ELR60A80\")};", + "\nfinancialPerformance.Scenario = \"All\";", + "\n(await financialPerformance.ToReportAsync) with { Height = 900, GroupDefaultExpanded = 3}" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "markdown", + "source": [ + "# Key Performance Indicators (KPIs)" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "markdown", + "source": [ + "## Contractual Service Margine : value creation" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "markdown", + "source": [ + "### New Business" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "var csmNb = allocatedTechnicalMargins.GetDataCube().Where(x => x.VariableType == \"BOP\")", + "\n .Select(x => x.Scenario == null ? x with {Scenario = \"Best Estimate\"} : x);", + "\n // .Select(x => x.Scenario == null ? x with {Scenario = \"Best Estimate\", ", + "\n // Value = x.EstimateType == \"C\" ? -x.Value : x.Value} : x with {Value = x.EstimateType == \"C\" ? -x.Value : x.Value});" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "await Report.ForDataCube(csmNb.ToDataCube()).WithQuerySource(Workspace)", + "\n .SliceRowsBy(\"VariableType\",\"GroupOfContract\")", + "\n .SliceColumnsBy(new[]{\"Currency\",\"Scenario\"})", + "\n .ReportGridOptions().ExecuteAsync()" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "markdown", + "source": [ + "### Amortization" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "var csmAM = allocatedTechnicalMargins.GetDataCube().Where(x => x.VariableType == \"AM\" && Math.Abs(x.Value) > 10E-5)", + "\n .Select(x => x.Scenario == null ? x with {Scenario = \"Best Estimate\", ", + "\n Value = x.EstimateType == \"C\" ? -x.Value : x.Value} : x with {Value = x.EstimateType == \"C\" ? -x.Value : x.Value});" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "await Report.ForDataCube(csmAM.ToDataCube()).WithQuerySource(Workspace)", + "\n .SliceRowsBy(\"VariableType\",\"GroupOfContract\")", + "\n .SliceColumnsBy(new[]{\"Currency\",\"Scenario\",\"EstimateType\"})", + "\n .ReportGridOptions(headerColumnWidth: 300).ExecuteAsync()" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "markdown", + "source": [ + "## Financial Performance" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "markdown", + "source": [ + "### Total Comprehensive Income : profitability", + "\nIn absence of the Other Comprehensive Income (OCI) this corresponds to the Profit and Loss as locked-in and current yield curves are the same. " + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "var tci = financialPerformance.GetDataCube().Select(x => x.Scenario == null ? x with {Scenario = \"Best Estimate\"} : x);", + "\nvar hierarchicalDimension = Workspace.ToHierarchicalDimensionCache();", + "\nawait hierarchicalDimension.InitializeAsync(); ", + "\nvar pnl = tci.Where(x => hierarchicalDimension.Get().Ancestors(x.VariableType, includeSelf: true).Any(x => x.SystemName == \"PNL\"));" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "await Report.ForDataCube(pnl.ToDataCube()).WithQuerySource(Workspace)", + "\n .SliceRowsBy(\"Scenario\")", + "\n .SliceColumnsBy(new[]{\"Currency\",\"GroupOfContract\"}) //\"GroupOfContract\"", + "\n .ReportGridOptions().ExecuteAsync()" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "markdown", + "source": [ + "### Insurance Revenue : business growth" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "var insRev = tci.Where(x => hierarchicalDimension.Get().Ancestors(x.VariableType, includeSelf: true).Any(x => x.SystemName == \"IR\"));" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "await Report.ForDataCube(insRev.ToDataCube()).WithQuerySource(Workspace)", + "\n .SliceRowsBy(\"Scenario\")", + "\n .SliceColumnsBy(new[]{\"Currency\",\"GroupOfContract\"})", + "\n .ReportGridOptions().ExecuteAsync() " + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "markdown", + "source": [ + "## Experience Variance : business strategy", + "\nThis indicator represent how well the expected values match the actual. It is not a financial key performance indicator rather a modelling key performance indicator, indicating how well the company expectations are met by the actual figures." + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "experienceAdjustments.DataFilter = null;", + "\nvar expAdj = experienceAdjustments.GetDataCube().Where(x => x.VariableType == \"CF\" && Math.Abs(x.Value) > 10E-5).Select(x => x.Scenario == null ? x with {Scenario = \"Best Estimate\"} : x);" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "await Report.ForDataCube(expAdj.ToDataCube()).WithQuerySource(Workspace)", + "\n .SliceRowsBy(\"Scenario\")", + "\n .SliceColumnsBy(new[]{\"Currency\",\"GroupOfContract\"})", + "\n .ReportGridOptions().ExecuteAsync()" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + } + ] +} \ No newline at end of file diff --git a/ifrs17-template/PracticalUseCases/CompareReinsuranceContracts/Scenarios.csv b/ifrs17-template/PracticalUseCases/CompareReinsuranceContracts/Scenarios.csv new file mode 100644 index 00000000..ad34991d --- /dev/null +++ b/ifrs17-template/PracticalUseCases/CompareReinsuranceContracts/Scenarios.csv @@ -0,0 +1,22 @@ +@@Scenario,,,,,,,,,,, +SystemName,DisplayName,,,,,,,,,, +LR70,Loss Ratio 70, +LR80,Loss Ratio 80, +ELR60A70,Expected Loss Ratio 60 Actual 70, +ELR60A80,Expected Loss Ratio 60 Actual 80, +YCUP1.0pct,Yield Curve Up 1.0pct,,,,,,,,,, +YCDW1.0pct,Yield Curve Down 1.0pct,,,,,,,,,, +SRUP1.0pct,Spread Rate Up 1.0pct,,,,,,,,,, +SRDW1.0pct,Spread Rate Down 1.0pct,,,,,,,,,, +EUP1.0pct,Equity Up 1.0pct,,,,,,,,,, +EDW1.0pct,Equity Down 1.0pct,,,,,,,,,, +FXUP1.0pct,Exchange Rate Up 1.0pct,,,,,,,,,, +FXDW1.0pct,Exchange Rate Down 1.0pct,,,,,,,,,, +MTUP10pct,Mortality Up 10pct,,,,,,,,,, +MTDW10pct,Mortality Down 10pct,,,,,,,,,, +LUP10pct,Longevity Up 10pct,,,,,,,,,, +LDW10pct,Longevity Down 10pct,,,,,,,,,, +DUP10pct,Disability Up 10pct,,,,,,,,,, +DDW10pct,Disability Down 10pct,,,,,,,,,, +LICUP10pct,Lic Up 10pct,,,,,,,,,, +LICDW10pct,Lic Down 10pct,,,,,,,,,, diff --git a/ifrs17-template/PracticalUseCases/SingleVsMultipleCsmSwitch/CsmSwitchDataImport.ipynb b/ifrs17-template/PracticalUseCases/SingleVsMultipleCsmSwitch/CsmSwitchDataImport.ipynb index b6e114ba..69bbb85e 100644 --- a/ifrs17-template/PracticalUseCases/SingleVsMultipleCsmSwitch/CsmSwitchDataImport.ipynb +++ b/ifrs17-template/PracticalUseCases/SingleVsMultipleCsmSwitch/CsmSwitchDataImport.ipynb @@ -218,7 +218,7 @@ { "cell_type": "markdown", "source": [ - "# Reset Workspace" + "# Initialize Workspace" ], "metadata": {}, "execution_count": 0, @@ -227,17 +227,8 @@ { "cell_type": "code", "source": [ - "Workspace.Reset(x => x.ResetInitializationRules().ResetCurrentPartitions());" - ], - "metadata": {}, - "execution_count": 0, - "outputs": [] - }, - { - "cell_type": "code", - "source": [ - "Workspace.InitializeFrom(DataSource);", - "\nifrs17.Reset(Workspace)" + "Workspace.Reset(x => x.ResetInitializationRules().ResetCurrentPartitions());", + "\nWorkspace.InitializeFrom(DataSource);" ], "metadata": {}, "execution_count": 0, diff --git a/ifrs17-template/PracticalUseCases/SingleVsMultipleCsmSwitch/CsmSwitchReports.ipynb b/ifrs17-template/PracticalUseCases/SingleVsMultipleCsmSwitch/CsmSwitchReports.ipynb index 70f8e7b3..976270bc 100644 --- a/ifrs17-template/PracticalUseCases/SingleVsMultipleCsmSwitch/CsmSwitchReports.ipynb +++ b/ifrs17-template/PracticalUseCases/SingleVsMultipleCsmSwitch/CsmSwitchReports.ipynb @@ -94,6 +94,15 @@ "execution_count": 0, "outputs": [] }, + { + "cell_type": "code", + "source": [ + "ifrs17 = new Ifrs17(Workspace, Scopes, Report, Export);" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, { "cell_type": "code", "source": [ diff --git a/ifrs17-template/README.md b/ifrs17-template/README.md index e6033e6a..34d33c99 100644 --- a/ifrs17-template/README.md +++ b/ifrs17-template/README.md @@ -63,7 +63,7 @@ For more information on our IFRS 17 initiative check out our [IFRS 17 page](http Interact with our IFRS 17 practical use cases. Analyze your data and create new use cases. -
+
@@ -78,6 +78,13 @@ Compare use-cases of [actuals](./PracticalUseCases/ActualsOutsideThePeriod/Actua Compare the effects of modelling the [CSM - LC switch](./PracticalUseCases/SingleVsMultipleCsmSwitch/CsmSwitchReports) with a single vs multiple switch logic. +
+
+ +### Scenario analysis for re-insured contracts + +Compare Net results under IFRS 17 obtained for different [loss ratio](./PracticalUseCases/CompareReinsuranceContracts/Reports). +
diff --git a/ifrs17-template/Test/PracticalCasesTest.ipynb b/ifrs17-template/Test/PracticalCase-CSMSwitchTest.ipynb similarity index 98% rename from ifrs17-template/Test/PracticalCasesTest.ipynb rename to ifrs17-template/Test/PracticalCase-CSMSwitchTest.ipynb index 5b4eab9d..1dd309db 100644 --- a/ifrs17-template/Test/PracticalCasesTest.ipynb +++ b/ifrs17-template/Test/PracticalCase-CSMSwitchTest.ipynb @@ -37,7 +37,7 @@ { "cell_type": "code", "source": [ - "#!import \"../PracticalUseCases/SingleVsMultipleCsmSwitch/CsmSwitchReports\"" + "#!eval-notebook \"../PracticalUseCases/SingleVsMultipleCsmSwitch/CsmSwitchReports\"" ], "metadata": {}, "execution_count": 0, diff --git a/ifrs17-template/Test/PracticalCase-CompareReinsuranceTest.ipynb b/ifrs17-template/Test/PracticalCase-CompareReinsuranceTest.ipynb new file mode 100644 index 00000000..779c4d80 --- /dev/null +++ b/ifrs17-template/Test/PracticalCase-CompareReinsuranceTest.ipynb @@ -0,0 +1,355 @@ +{ + "metadata": { + "authors": [], + "id": "cZ9mwrWya0Ox8CXAyFRn2Q", + "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": [ + "

Test Practical Cases

" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "markdown", + "source": [ + "# Compare Reinsurance Contracts" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "#!eval-notebook \"../PracticalUseCases/CompareReinsuranceContracts/Reports\"" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "using FluentAssertions;" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "var grossBusinessReinsured = \"RP1.1\";", + "\nvar reinsuranceContract = \"RPR1.1\";", + "\nvar groupsOfContracts = new[] {grossBusinessReinsured, reinsuranceContract};" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "markdown", + "source": [ + "## Best Estimate" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "var bops = pv.GetDataCube().Where(x => x.Novelty==\"N\" && x.VariableType==\"BOP\");" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "bops.Where(x => x.GroupOfContract==grossBusinessReinsured && x.Scenario==null).Sum(x=>x.Value).Should().BeApproximately(-100.00828, Precision);" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "bops.Where(x => x.GroupOfContract==grossBusinessReinsured && x.Scenario==\"LR70\").Sum(x=>x.Value).Should().BeApproximately(-0.11643, Precision);" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "bops.Where(x => x.GroupOfContract==grossBusinessReinsured && x.Scenario==\"LR80\").Sum(x=>x.Value).Should().BeApproximately(99.77541, Precision);" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "bops.Where(x => x.GroupOfContract==grossBusinessReinsured && x.Scenario==\"ELR60A70\").Sum(x=>x.Value).Should().BeApproximately(-100.00828, Precision);" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "bops.Where(x => x.GroupOfContract==grossBusinessReinsured && x.Scenario==\"ELR60A80\").Sum(x=>x.Value).Should().BeApproximately(-100.00828, Precision);" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "bops.Where(x => x.GroupOfContract==reinsuranceContract && x.Scenario==null).Sum(x=>x.Value).Should().BeApproximately(15.15453, Precision);" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "bops.Where(x => x.GroupOfContract==reinsuranceContract && x.Scenario==\"LR70\").Sum(x=>x.Value).Should().BeApproximately(-14.78996, Precision);" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "bops.Where(x => x.GroupOfContract==reinsuranceContract && x.Scenario==\"LR80\").Sum(x=>x.Value).Should().BeApproximately(-44.73446, Precision);" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "bops.Where(x => x.GroupOfContract==reinsuranceContract && x.Scenario==\"ELR60A70\").Sum(x=>x.Value).Should().BeApproximately(15.15453, Precision);" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "bops.Where(x => x.GroupOfContract==reinsuranceContract && x.Scenario==\"ELR60A80\").Sum(x=>x.Value).Should().BeApproximately(15.15453, Precision);" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "markdown", + "source": [ + "## Experience Adjustments" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "var eAs = experienceAdjustments.GetDataCube().Where(x => groupsOfContracts.Contains(x.GroupOfContract));" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "eAs.Where(x => x.Scenario == null).Sum(x => x.Value).Should().BeApproximately(0, Precision);" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "eAs.Where(x => x.Scenario == \"LR70\").Sum(x => x.Value).Should().BeApproximately(0, Precision);" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "eAs.Where(x => x.Scenario == \"LR80\").Sum(x => x.Value).Should().BeApproximately(0, Precision);" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "eAs.Where(x => x.Scenario == \"ELR60A70\").Sum(x => x.Value).Should().BeApproximately(-70, Precision);" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "eAs.Where(x => x.Scenario == \"ELR60A80\").Sum(x => x.Value).Should().BeApproximately(-140, Precision);" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "markdown", + "source": [ + "## Csm/Loss Component" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "var csmAM = allocatedTechnicalMargins.GetDataCube().Where(x => groupsOfContracts.Contains(x.GroupOfContract) && x.VariableType == \"AM\" && Math.Abs(x.Value) > Precision);" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "csmAM.Where(x => x.Scenario == null).Sum(x => x.Value).Should().BeApproximately(-84.86029, Precision);" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "csmAM.Where(x => x.Scenario == \"LR70\").Sum(x => x.Value).Should().BeApproximately(-14.83859, Precision);" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "csmAM.Where(x => x.Scenario == \"LR80\").Sum(x => x.Value).Should().BeApproximately(-55.18393, Precision);" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "markdown", + "source": [ + "## Financial Performance" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "pnl = pnl.Where(x => groupsOfContracts.Contains(x.GroupOfContract));" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "pnl.Where(x => x.Scenario == \"Best Estimate\").Sum(x => x.Value).Should().BeApproximately(84.99882, Precision);" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "pnl.Where(x => x.Scenario == \"LR70\").Sum(x => x.Value).Should().BeApproximately(15.00020, Precision);" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "pnl.Where(x => x.Scenario == \"LR80\").Sum(x => x.Value).Should().BeApproximately(-55.00076, Precision);" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "pnl.Where(x => x.Scenario == \"ELR60A70\").Sum(x => x.Value).Should().BeApproximately(14.99882, Precision);" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "pnl.Where(x => x.Scenario == \"ELR60A80\").Sum(x => x.Value).Should().BeApproximately(-55.00117, Precision);" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + } + ] +} \ No newline at end of file diff --git a/ifrs17-template/Test/ScenarioParametersImportTest.ipynb b/ifrs17-template/Test/ScenarioParametersImportTest.ipynb index a65ecdd9..5dd27700 100644 --- a/ifrs17-template/Test/ScenarioParametersImportTest.ipynb +++ b/ifrs17-template/Test/ScenarioParametersImportTest.ipynb @@ -55,7 +55,7 @@ { "cell_type": "code", "source": [ - "var EnableScenarioBackup = EnableScenario;" + "var EnableScenarioBackup = Scenarios.EnableScenario;" ], "metadata": {}, "execution_count": 0, @@ -64,7 +64,7 @@ { "cell_type": "code", "source": [ - "EnableScenario = true;" + "Scenarios.EnableScenario = true;" ], "metadata": {}, "execution_count": 0, @@ -484,7 +484,7 @@ { "cell_type": "code", "source": [ - "EnableScenario = EnableScenarioBackup;" + "Scenarios.EnableScenario = EnableScenarioBackup;" ], "metadata": {}, "execution_count": 0, diff --git a/ifrs17-template/Test/Tests.ipynb b/ifrs17-template/Test/Tests.ipynb index 0e535198..c6c44706 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 18Gb RAM." + "\n
Execute this Notebook using at least 20Gb RAM." ], "metadata": {}, "execution_count": 0, @@ -128,7 +128,16 @@ { "cell_type": "code", "source": [ - "#!eval-notebook \"PracticalCasesTest\"" + "#!eval-notebook \"PracticalCase-CSMSwitchTest\"" + ], + "metadata": {}, + "execution_count": 0, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "#!eval-notebook \"PracticalCase-CompareReinsuranceTest\"" ], "metadata": {}, "execution_count": 0, diff --git a/ifrs17/Constants/Consts.ipynb b/ifrs17/Constants/Consts.ipynb index 42f05dcd..cb4b750d 100644 --- a/ifrs17/Constants/Consts.ipynb +++ b/ifrs17/Constants/Consts.ipynb @@ -366,6 +366,7 @@ "\n public const string AEM = nameof(AEM); // Attributable Expenses Maintenance", "\n public const string AC = nameof(AC); // Attributable Commissions", "\n public const string AE = nameof(AE); // Attributable Expenses", + "\n public const string ULE = nameof(ULE); // Unallocated Loss Adjustment Expenses", "\n}" ], "metadata": {}, diff --git a/ifrs17/DataModel/DataStructure.ipynb b/ifrs17/DataModel/DataStructure.ipynb index 87a2a4a0..a27687cb 100644 --- a/ifrs17/DataModel/DataStructure.ipynb +++ b/ifrs17/DataModel/DataStructure.ipynb @@ -1062,7 +1062,7 @@ "\n", "\nThe Credit Default Rate values must be entered with monthly granularity, i.e. every value corresponds to the default rate for a certain month. The first month entered in column Values0 always corresponds to January of the year entered in column Year. The last value is considered valid also for the following years (for which no value has been provided). ", "\n", - "\nThe latest Credit Default Rate available in the system with Year and Month earlier or equal to Year and Month of the closing period will be used as the current value during calculation." + "\nThe latest Credit Default Rate available in the system with Year and Month earlier or equal to Year and Month of the closing period will be used as the current value during calculation. When the current period Credit Default Rate differs from previous period value, the analysis of change for the Credit Default Rate amount type computes the contribution of such update as an additional step (Credit Risk Update)." ], "metadata": {}, "execution_count": 0, @@ -1114,7 +1114,7 @@ "\n", "\nThe Yield Curve values must be entered with **yearly** granularity, i.e. every value corresponds to the rate of the whole year starting from the year entered in column Year. The last value is considered valid also for the following years (for which no value has been provided). ", "\n", - "\nDuring calculation, the Yield Curve values are retrieved from the DataSource. The Yield Curve Name defined for each group-of-contracts will be used to match the Name of the Yield Curve to be considered. This occurs only for the curve that is used in the computation of the Contractual Service Margin (locked-in for BBA valuation approach, current otherwise). The calculation engine allows the update of the locked-in curve during the entire inception year of the group-of-contracts. When the locked-in Yield Curve is used, the latest Yield Curve available in the system with Year earlier or equal to the inception Year of the group-of-contracts will be used. When the current Yield Curve is used in the calculation, the latest Yield Curve available in the system with Year and Month earlier or equal to Year and Month of the closing period will be used." + "\nDuring calculation, the Yield Curve values are retrieved from the DataSource. The Yield Curve Name defined for each group-of-contracts will be used to match the Name of the Yield Curve to be considered. This occurs only for the curve that is used in the computation of the Contractual Service Margin (locked-in for BBA valuation approach, current otherwise). The calculation engine allows the update of the locked-in curve during the entire inception year of the group-of-contracts. When the locked-in Yield Curve is used, the latest Yield Curve available in the system with Year earlier or equal to the inception Year of the group-of-contracts will be used. When the current Yield Curve is used in the calculation, the latest Yield Curve available in the system with Year and Month earlier or equal to Year and Month of the closing period will be used. When the current period Yield Curve differs from previous period value, the analysis of change computes the contribution of such update as an additional step (Yield Curve Update)." ], "metadata": {}, "execution_count": 0, @@ -1541,7 +1541,7 @@ "\n", "\nData Node Parameters are used to keep track of other parameters pertaining to each Data Node, and their movements in time (year and month).", "\n
PremiumAllocation : defines the weight of Premium to be included in the Experience Adjustement AoC Type of the Technical Margin and is valid only for Group of Insurance Contract with LiabilityType : Liability for Remaining Coverage.", - "\n
ReinsuranceCoverage : defines the weight of the underlying gross business to be considered in the computation of the allocation of the Technical Margin in a Reinsurance case.", + "\n
ReinsuranceCoverage : defines the weight of the underlying gross business to be considered in the computation of the allocation of the Technical Margin in a Reinsurance case. In other words, it represents the percentage to which claims in the underlying GICs are expected to be reinboursed by the Reinsurance Contracts belonging to the GRIC. For proportional contracts, this factor is given by the cession while for other contracts it should be estimated. ", "\n", "\nThe latest Data Node Parameters available in the system with Year and Month earlier or equal to Year and Month of the closing period will be used as the current value during calculation." ], diff --git a/ifrs17/Import/ImportScopeCalculation.ipynb b/ifrs17/Import/ImportScopeCalculation.ipynb index 7189319a..3a357622 100644 --- a/ifrs17/Import/ImportScopeCalculation.ipynb +++ b/ifrs17/Import/ImportScopeCalculation.ipynb @@ -1854,7 +1854,13 @@ "\n", "\n### Reinsurance case", "\n", - "\nFor the reinsurance case, the switch logic is identical to the one described above, except that it uses the gross Technical Margins multiplied by the weights coming from the Reinsurance Coverage Parameter (see [Data Node Parameters](../DataModel/DataStructure#data-node-parameters)). In case a GRIC has multiple GICs, then these weighted $TM$s are aggregated." + "\nFor the reinsurance case, the switch logic is identical to the one described above, except that it uses the gross Technical Margins multiplied by the weights coming from the Reinsurance Coverage (RC) Parameter (see [Data Node Parameters](../DataModel/DataStructure#data-node-parameters)). In case a GRIC ($r$) has multiple GICs ($g$), then these weighted $TM$s are aggregated.", + "\n", + "\n$$", + "\n\\text{Weighted TM}(\\text{r}) = \\sum_{g~\\in~\\text{underlying GICs}} \\text{RC}_{g,r} \\text{TM}(g)", + "\n$$", + "\n", + "\nA Loss Recovery Component (LoReCo) for GRIC $r$ is going to be opened in case the $\\text{Weighted TM}(r)$ would be allocated to Loss Component following the above mentioned switch logic. The amount allocated to the Reinsurance CSM or LoReCo follows the computed Technical Margin computed for GRIC r as described in [Technical Margin](#technical-margin)." ], "metadata": {}, "execution_count": 0, diff --git a/ifrs17/Report/ReportMutableScopes.ipynb b/ifrs17/Report/ReportMutableScopes.ipynb index 54f8d8f3..2689ec60 100644 --- a/ifrs17/Report/ReportMutableScopes.ipynb +++ b/ifrs17/Report/ReportMutableScopes.ipynb @@ -123,12 +123,16 @@ "\n", "\n IEnumerable RowSlices { get; set; }", "\n protected string[] defaultRowSlices => new string[] { };", - "\n protected string[] rowSlices => RowSlices is null ? defaultRowSlices : defaultRowSlices.Concat(RowSlices).Where(x => !forbiddenSlices.Contains(x)).ToArray();", + "\n protected string[] rowSlices => RowSlices is null ", + "\n ? defaultRowSlices ", + "\n : defaultRowSlices.Where(cs => !RowSlices.Contains(cs)).Concat(RowSlices).Where(x => !forbiddenSlices.Contains(x)).ToArray();", "\n", "\n IEnumerable ColumnSlices { get; set; }", "\n protected string[] defaultColumnSlices => new string[] { };", "\n protected string[] columnSlices { get{", - "\n var slices = ColumnSlices is null ? defaultColumnSlices : defaultColumnSlices.Where(cs => !ColumnSlices.Contains(cs)).Concat(ColumnSlices).Where(x => !forbiddenSlices.Contains(x)).ToArray();", + "\n var slices = ColumnSlices is null ", + "\n ? defaultColumnSlices ", + "\n : defaultColumnSlices.Where(cs => !ColumnSlices.Contains(cs)).Concat(ColumnSlices).Where(x => !forbiddenSlices.Contains(x)).ToArray();", "\n return Scenario == \"All\" || Scenario == \"Delta\"", "\n ? slices.Concat(nameof(Scenario).RepeatOnce()).ToArray() ", "\n : Scenario is null ? slices : nameof(Scenario).RepeatOnce().Concat(slices).ToArray();", @@ -222,7 +226,7 @@ "\n", "\npublic interface ExpAdjReport : IIfrs17Report {", "\n string[] IIfrs17Report.defaultRowSlices => new string[] {\"EstimateType\"};", - "\n string[] IIfrs17Report.defaultColumnSlices => new string[] { \"Currency\", \"AmountType\" };", + "\n string[] IIfrs17Report.defaultColumnSlices => new string[] { \"Currency\"};", "\n IDataCube IIfrs17Report.GetDataCube() => DataFilter == null ", "\n ? GetScopes(GetIdentities()).Aggregate().ActuarialExperienceAdjustment", "\n : GetScopes(GetIdentities()).Aggregate().ActuarialExperienceAdjustment.Filter(dataFilter);", diff --git a/ifrs17/Report/ReportScopes.ipynb b/ifrs17/Report/ReportScopes.ipynb index 525773c1..fd8e37c1 100644 --- a/ifrs17/Report/ReportScopes.ipynb +++ b/ifrs17/Report/ReportScopes.ipynb @@ -478,7 +478,7 @@ "\n .Filter((\"VariableType\", AocTypes.CF));", "\n ", "\n private IDataCube BestEstimateCashflow => GetScope(Identity).BestEstimate", - "\n .Filter((\"VariableType\", AocTypes.CF))", + "\n .Filter((\"VariableType\", AocTypes.CF), (\"AmountType\",\"!CDR\"))", "\n .SelectToDataCube(rv => rv with { EconomicBasis = null, Novelty = Novelties.C });", "\n", "\n IDataCube ActuarialExperienceAdjustment => WrittenCashflow - BestEstimateCashflow;",