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 @@ -18,11 +18,11 @@
{
"cell_type": "code",
"source": [
"var projectName = \"ifrs17ce\";",
"\nvar environmentName = \"dev\";",
"var projectName = \"ifrs17\";",
"\nvar environmentName = \"v1.0.0\";",
"\nvar notebookName = \"CalculationEngine\";",
"\nvar calculationEngine = $\"#!import \\\"//{projectName}/{environmentName}/{notebookName}\\\"\";"
]
}
]
}
}
2 changes: 1 addition & 1 deletion full-ifrs17-template/Database/Configure.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
{
"cell_type": "code",
"source": [
"#!import \"../Constants/Consts\"",
"#!import \"../Constants/CalculationEngine\"",
"\n#!eval calculationEngine"
]
},
Expand Down
25 changes: 25 additions & 0 deletions full-ifrs17-template/Database/PersonalConnectionExample.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"metadata": {
"authors": [],
"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": "code",
"source": [
"var connectionStringMsSql = \"here enter your connection string\";"
]
}
]
}
63 changes: 41 additions & 22 deletions full-ifrs17-template/Export/MapTemplate.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,17 @@
{
"cell_type": "markdown",
"source": [
"This Notebook exports the Data nodes, states, and parameters for the target partition to a spreadsheet file which can be read, modified, and is ready to be re-imported."
"This notebook exports the data nodes, data node states, and data node parameters belonging to a specific data partition into an excel file.",
"\n<br> This file contains reference data used to prepopulate dropdows and validations to facilitate editing.",
"\n<br> This can be modified and imported in the calculation engine to create and modify data."
]
},
{
"cell_type": "markdown",
"source": [
"After setting the desired target Partition, the Data present in the workspace is ready to be exported. "
"After setting the desired target Partition, the Data present in the workspace is ready to be exported. ",
"\n",
"\nThe default location of the exported files is the project file storage. A **download** link is generated and available for as long as the session is active. "
]
},
{
Expand All @@ -52,8 +56,8 @@
"source": [
"/* The DataSource is configured and connected to real database */",
"\n//#!eval-notebook \"../Database/Configure\"",
"\n/* The Systemorph set of dimensions + mockdata are dispatched to the unconfigured in-memory DataSource */",
"\n#!eval-notebook \"../Initialization/InitSystemorphBaseToMemory\""
"\n/* The Systemorph set of dimensions + mockdata (+ those added in the CloseImportTemplate) are dispatched to the unconfigured in-memory DataSource */",
"\n#!eval-notebook \"../Import/CloseImportTemplate\""
]
},
{
Expand All @@ -77,7 +81,9 @@
{
"cell_type": "markdown",
"source": [
"# Map Template: Data Node"
"# Map Template: Data Node",
"\n",
"\n[DataNodes](https://portal.systemorph.cloud/project/ifrs17/env/v1.0.0/DataModel/DataStructure#data-node) defines the properties of [Portfolios](https://portal.systemorph.cloud/project/ifrs17/env/v1.0.0/DataModel/DataStructure#portfolios) and [Group of Contracts](https://portal.systemorph.cloud/project/ifrs17/env/v1.0.0/DataModel/DataStructure#group-of-contracts)."
]
},
{
Expand All @@ -89,13 +95,8 @@
{
"cell_type": "code",
"source": [
"static var partition = new PartitionByReportingNode() { ReportingNode = \"CH\" };"
]
},
{
"cell_type": "code",
"source": [
"await Workspace.Partition.SetAsync<PartitionByReportingNode>( partition );"
"static var partition = new PartitionByReportingNode() { ReportingNode = \"CH\" };",
"\nawait Workspace.Partition.SetAsync<PartitionByReportingNode>( partition );"
]
},
{
Expand All @@ -120,7 +121,9 @@
{
"cell_type": "markdown",
"source": [
"# Map Template: Data Node State"
"# Map Template: Data Node State",
"\n",
"\n[Data Node State](https://portal.systemorph.cloud/project/ifrs17/env/v1.0.0/DataModel/DataStructure#data-node-state) defines whether the instance is active (used in import/output) or inactive (present in the DataSource but not used in input/output operations)."
]
},
{
Expand All @@ -132,19 +135,20 @@
{
"cell_type": "code",
"source": [
"static var partition = new PartitionByReportingNodeAndPeriod() { ReportingNode = \"CH\", Year = 2020, Month = 12 };"
"static var partition = new PartitionByReportingNodeAndPeriod() { ReportingNode = \"CH\", Year = 2020, Month = 12 };",
"\nawait Workspace.Partition.SetAsync<PartitionByReportingNode>( new PartitionByReportingNode() { ReportingNode = partition.ReportingNode } );"
]
},
{
"cell_type": "code",
"cell_type": "markdown",
"source": [
"await Workspace.Partition.SetAsync<PartitionByReportingNode>( new PartitionByReportingNode() { ReportingNode = partition.ReportingNode } );"
"## Export"
]
},
{
"cell_type": "markdown",
"source": [
"## Export"
"The data is retrieved for the Workspace and prepared for export."
]
},
{
Expand All @@ -158,6 +162,12 @@
"\n .ToArray();"
]
},
{
"cell_type": "markdown",
"source": [
"Export is performed."
]
},
{
"cell_type": "code",
"source": [
Expand All @@ -172,7 +182,9 @@
{
"cell_type": "markdown",
"source": [
"# Map Template: Data Node Parameter"
"# Map Template: Data Node Parameter",
"\n",
"\n[Data Node Parameters](https://portal.systemorph.cloud/project/ifrs17/env/v1.0.0/DataModel/DataStructure#data-node-parameters) are defined at the Group of Contract level and are used during the import calculation. "
]
},
{
Expand All @@ -184,19 +196,20 @@
{
"cell_type": "code",
"source": [
"static var partition = new PartitionByReportingNodeAndPeriod() { ReportingNode = \"CH\", Year = 2020, Month = 12 };"
"static var partition = new PartitionByReportingNodeAndPeriod() { ReportingNode = \"CH\", Year = 2020, Month = 12 };",
"\nawait Workspace.Partition.SetAsync<PartitionByReportingNode>( new PartitionByReportingNode() { ReportingNode = partition.ReportingNode } );"
]
},
{
"cell_type": "code",
"cell_type": "markdown",
"source": [
"await Workspace.Partition.SetAsync<PartitionByReportingNode>( new PartitionByReportingNode() { ReportingNode = partition.ReportingNode } );"
"## Export"
]
},
{
"cell_type": "markdown",
"source": [
"## Export"
"The data is retrieved for the Workspace and prepared for export."
]
},
{
Expand All @@ -212,6 +225,12 @@
"\n .ToArray() );"
]
},
{
"cell_type": "markdown",
"source": [
"Export is performed."
]
},
{
"cell_type": "code",
"source": [
Expand Down
Binary file removed full-ifrs17-template/Images/SpecificationsCSM.PNG
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed full-ifrs17-template/Images/SpecificationsPL.PNG
Binary file not shown.
Binary file added full-ifrs17-template/Images/video1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
125 changes: 125 additions & 0 deletions full-ifrs17-template/Import/CloseImportTemplate.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
{
"metadata": {
"authors": [],
"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": [
"<p style=\"font-weight:bold;\"> <span style=\"font-size: 36px\"> Close Imports Template</span> </p>"
]
},
{
"cell_type": "markdown",
"source": [
"All imports are triggered via the <code>Import</code> command. Several options can be fluently appended to customize the import action:",
"\n- <code>FromFile()</code> : accepts a string as input (eg. \"../Files/TransactionalData/Openings_CH_2020_12.csv\"). It corresponds the file to be imported complete with the path",
"\n- <code>WithFormat()</code> : accepts a string as input (eg. \"Cashflow\" or \"Actual\"). It is used to trigger the desired import logic for the current file. Full list of avalaible ImportFormat can be found [here](https://portal.systemorph.cloud/project/ifrs17/env/v1.0.0/Constants/Consts#import-formats)",
"\n- <code>WithFileStorage()</code> : defined the drive from where the input files is retrieved. In this example we use the project file storage (new files have to be uploaded into the project), other options are SharePoint and OneDrive. ",
"\n- <code>WithTarget()</code> : target drive where the results are stored. In this example we use our in-memory set up",
"\n"
]
},
{
"cell_type": "markdown",
"source": [
"# Set up data and configuration",
"\n",
"\nThe data source is initialized and the whole IFRS 17 Calculation Engine code is compiled. "
]
},
{
"cell_type": "code",
"source": [
"#!eval-notebook \"../Initialization/InitSystemorphToMemory\""
]
},
{
"cell_type": "markdown",
"source": [
"# DataNode and Parameters",
"\n",
"\nNew Data Nodes and Parameters are imported here.",
"\n<br> To easily generate these files, please refer to the **Map Template** files exported [here](../Export/MapTemplate). Edit them at your wish and import them back into the solution through the following cells. ",
"\n<br> For the **ImportFormat**, the following options are expected:",
"\n- ImportFormats.DataNode : [Portfolios](https://portal.systemorph.cloud/project/ifrs17/env/v1.0.0/DataModel/DataStructure#portfolios) and [Group of Contracts](https://portal.systemorph.cloud/project/ifrs17/env/v1.0.0/DataModel/DataStructure#group-of-contracts)",
"\n- ImportFormats.DataNodeState : the [state of a data node](https://portal.systemorph.cloud/project/ifrs17/env/v1.0.0/DataModel/DataStructure#data-node-state) can be either active or inactive.",
"\n- ImportFormats.DataNodeParameter : parameters are described [here](https://portal.systemorph.cloud/project/ifrs17/env/v1.0.0/DataModel/DataStructure#data-node-parameters). For **Group of Insurance Contracts** a default [Premium Allocation factor](https://portal.systemorph.cloud/project/ifrs17/env/v1.0.0/Import/ImportScopeCalculation#experience-adjustment-on-premium) of 1 is applied if the parameter is not imported.",
"\n"
]
},
{
"cell_type": "code",
"source": [
"var pathToFile = \"../Files/DataNodes/DataNodes_CH.csv\";"
]
},
{
"cell_type": "code",
"source": [
"var format = ImportFormats.DataNode;"
]
},
{
"cell_type": "code",
"source": [
"await Import.FromFile(pathToFile).WithFormat(format).WithTarget(DataSource).ExecuteAsync()"
]
},
{
"cell_type": "markdown",
"source": [
"# Transactional Data",
"\n",
"\nTransactional data are imported here. ",
"\n<br> For the **ImportFormat**, the following options are expected:",
"\n- ImportFormats.Opening : for opening values in a Fair Value Approach",
"\n- ImportFormats.Cashflow : nominal cash flows",
"\n- ImportFormats.Actual : written actuals, payable and receivables. ",
"\n- ImportFormats.SimpleValue : direct import of pre-calculated Present Value and Actual values for all reports - no calculation is triggered -"
]
},
{
"cell_type": "code",
"source": [
"var pathToFile = \"../Files/TransactionalData/Openings_CH_2020_12.csv\";"
]
},
{
"cell_type": "code",
"source": [
"var format = ImportFormats.Opening;"
]
},
{
"cell_type": "code",
"source": [
"await Import.FromFile(pathToFile).WithFormat(format).WithTarget(DataSource).ExecuteAsync()"
]
},
{
"cell_type": "markdown",
"source": [
"# Workspace reset"
]
},
{
"cell_type": "code",
"source": [
"Workspace.Reset(x => x.ResetInitializationRules().ResetCurrentPartitions());"
]
}
]
}
Loading