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
4 changes: 2 additions & 2 deletions PresentValueSeries/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Together with the present project, we produced a series consisting of **three ep
</a>
</div>
<div style="border: 2px solid #9DD6F6; border-radius: 4px; background-color: rgba(204, 227, 255, 0.1); ">
<a href="https://youtu.be/n7KO5-NKTng" style="display:block; padding: 24px;">
<a href="https://youtu.be/bhtSm0cJudo" style="display:block; padding: 24px;">
<img style="display:block; margin-bottom: 12px;" width="100%" src="https://stacdnsmcwe.blob.core.windows.net/content/IFRS17CalculationEngine/Images/PresentValueOfCashFlow/SM-YoutubePreview-S01E03.png" alt="Overview">
How to Customize the Input to your Dataset and Contracts
</a>
Expand Down Expand Up @@ -123,7 +123,7 @@ In the last section of the notebook these steps are taken individually for a sel
## How To Customize The Input: Do It Yourself

The content of this section refers to the third
and last [episode](https://youtu.be/n7KO5-NKTng) of this series.
and last [episode](https://youtu.be/bhtSm0cJudo) of this series.

Its aim is to present how to customize the setup described in the Episode 2 to your business data set and company. The corresponding notebook is named **PresentValues - Episode 3**.

Expand Down
18 changes: 18 additions & 0 deletions ifrs17-template/Initialization/InitSystemorphToDatabase.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,24 @@
"execution_count": 0,
"outputs": []
},
{
"cell_type": "code",
"source": [
"await Import.FromFile(\"../Files/TransactionalData/SimpleValue_CH_2020_12.csv\").WithFormat(ImportFormats.SimpleValue ).WithTarget(DataSource).ExecuteAsync()"
],
"metadata": {},
"execution_count": 0,
"outputs": []
},
{
"cell_type": "code",
"source": [
"await Import.FromFile(\"../Files/TransactionalData/NominalCashflows_CH_2020_12_MTUP10pct.csv\").WithFormat(ImportFormats.Cashflow).WithTarget(DataSource).ExecuteAsync()"
],
"metadata": {},
"execution_count": 0,
"outputs": []
},
{
"cell_type": "markdown",
"source": [
Expand Down
9 changes: 0 additions & 9 deletions ifrs17-template/Initialization/InitSystemorphToMemory.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -127,15 +127,6 @@
"execution_count": 0,
"outputs": []
},
{
"cell_type": "code",
"source": [
"await Import.FromFile(\"../Files/TransactionalData/Actuals_CH_2020_12_MTUP10pct.csv\").WithFormat(ImportFormats.Actual).WithTarget(DataSource).ExecuteAsync()"
],
"metadata": {},
"execution_count": 0,
"outputs": []
},
{
"cell_type": "markdown",
"source": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
{
"cell_type": "code",
"source": [
"#!eval-notebook \"../Initialization/InitSystemorphToMemory\""
"#!eval-notebook \"InitSystemorphToMemoryForTesting\""
],
"metadata": {},
"execution_count": 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,7 @@
{
"cell_type": "code",
"source": [
"#!eval-notebook \"../Initialization/InitSystemorphToMemory\""
],
"metadata": {},
"execution_count": 0,
"outputs": []
},
{
"cell_type": "code",
"source": [
"Workspace.InitializeFrom(DataSource);"
"#!eval-notebook \"InitSystemorphToMemoryForTesting\""
],
"metadata": {},
"execution_count": 0,
Expand All @@ -74,7 +65,7 @@
{
"cell_type": "code",
"source": [
"#!import \"ReportVariablesTestBase\""
"#!import \"../ReportVariablesTestBase\""
],
"metadata": {},
"execution_count": 0,
Expand Down Expand Up @@ -149,12 +140,12 @@
"source": [
"((int Year, int Month) Period, string ReportingNode, string Scenario, CurrencyType CurrencyType)[] exportScope = {",
"\n ((2020, 12), \"CH\", null, CurrencyType.Contractual),",
"\n// ((2020, 12), \"CH\", null, CurrencyType.Functional),",
"\n// ((2020, 12), \"CH\", null, CurrencyType.Group),",
"\n ",
"\n ((2020, 12), \"CH\", null, CurrencyType.Functional),",
"\n ((2020, 12), \"CH\", null, CurrencyType.Group), ",
"\n ((2021, 3), \"CH\", null, CurrencyType.Contractual),",
"\n// ((2021, 3), \"CH\", null, CurrencyType.Functional),",
"\n// ((2021, 3), \"CH\", null, CurrencyType.Group),",
"\n ((2021, 3), \"CH\", null, CurrencyType.Functional),",
"\n ((2021, 3), \"CH\", null, CurrencyType.Group),",
"\n ((2020, 12), \"CH\", nameof(Scenarios.MTUP10pct), CurrencyType.Contractual)",
"\n};"
],
"metadata": {},
Expand All @@ -173,11 +164,8 @@
{
"cell_type": "code",
"source": [
"// foreach(var args in exportScope){",
"\n// var scopesData = await GetScopesDataAsync(args, reportStorage, Scopes);",
"\n// var bmFileName = benchmarkFileNamePrefix + GetBenchmarkFileName(args) + \".csv\";",
"\n// await Export.ToCsv(path + bmFileName).WithTable<ReportVariable>(tableConfig => tableConfig.WithSource(source => scopesData.AsQueryable())).ExecuteAsync(); ",
"\n// }"
"var args = exportScope[6];",
"\nargs"
],
"metadata": {},
"execution_count": 0,
Expand All @@ -186,7 +174,8 @@
{
"cell_type": "code",
"source": [
"var args = exportScope.First();"
"var scopesData = (await GetScopesDataAsync(args, reportStorage, Scopes)).Select(rv => rv with { Value = Math.Round(rv.Value, roundingDigits)});",
"\nvar bmFileName = benchmarkFileNamePrefix + GetBenchmarkFileName(args) + \".csv\";"
],
"metadata": {},
"execution_count": 0,
Expand All @@ -195,8 +184,10 @@
{
"cell_type": "code",
"source": [
"var scopesData = (await GetScopesDataAsync(args, reportStorage, Scopes)).Select(rv => rv with { Value = Math.Round(rv.Value, roundingDigits)});",
"\nvar bmFileName = benchmarkFileNamePrefix + GetBenchmarkFileName(args) + \".csv\";"
"await Export.ToCsv(bmFileName)",
"\n .WithTable<ReportVariable>(tableConfig => tableConfig.WithSource(source => scopesData.AsQueryable()))",
"\n .WithSource(Workspace)",
"\n .ExecuteAsync()"
],
"metadata": {},
"execution_count": 0,
Expand All @@ -205,10 +196,7 @@
{
"cell_type": "code",
"source": [
"await Export.ToCsv(bmFileName)",
"\n .WithTable<ReportVariable>(tableConfig => tableConfig.WithSource(source => scopesData.AsQueryable()))",
"\n .WithSource(Workspace)",
"\n .ExecuteAsync()"
""
],
"metadata": {},
"execution_count": 0,
Expand Down
56 changes: 56 additions & 0 deletions ifrs17-template/Test/Data/InitSystemorphToMemoryForTesting.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
"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": [
"#!eval-notebook \"../../Initialization/InitSystemorphToMemory\""
],
"metadata": {},
"execution_count": 0,
"outputs": []
},
{
"cell_type": "code",
"source": [
"await Import.FromFile(\"Actuals_CH_2020_12_MTUP10pct.csv\").WithFormat(ImportFormats.Actual).WithTarget(DataSource).ExecuteAsync()"
],
"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": []
}
]
}
Loading