Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
154 commits
Select commit Hold shift + click to select a range
6d7c59e
base code
dcolleoni Sep 28, 2022
1f545cd
correct broken links
dcolleoni Sep 28, 2022
2a4db13
Merge pull request #29 from Systemorph/importCeProject
dcolleoni Sep 28, 2022
fdbe77c
fixed Opening re-import
sbusato Sep 29, 2022
61d4332
Merge pull request #31 from Systemorph/OpeningImporterBug
sbusato Sep 29, 2022
6adb68e
Rename "PvBase" to "PresentValue" (#32)
nnikolopoulos Sep 30, 2022
2c0cc65
include new default spaces
sbusato Oct 5, 2022
c3c0bcb
Merge pull request #36 from Systemorph/CleanUpNotebooksSpaces
sbusato Oct 5, 2022
95c90f9
reorder global metadata using alphabetical order
sbusato Oct 6, 2022
7cb299a
Merge pull request #37 from Systemorph/ReorderGlobalMetadata
sbusato Oct 6, 2022
fc7816f
Break utils nb (#33)
dcolleoni Oct 6, 2022
9d1844a
Including FX positions to FP scope
sbusato Oct 6, 2022
ae5cbac
Merge remote-tracking branch 'origin/develop' into FXinPl
sbusato Oct 6, 2022
d171be7
FP specification nb - add FX aoc step
sbusato Oct 7, 2022
18fde56
Merge pull request #38 from Systemorph/FXinPl
dcolleoni Oct 7, 2022
2695c4e
Rename calculation type with estimate type (#34)
nnikolopoulos Oct 7, 2022
56fded2
new data node factory
Oct 8, 2022
9b77b4f
Merge branch 'develop' of https://github.com/Systemorph/IFRS17Calcula…
Oct 8, 2022
74a381b
metadata
Oct 10, 2022
10ef85f
metadata x2
Oct 10, 2022
28fd4f9
metadata x3
Oct 10, 2022
4a6c946
implement feedback
Oct 10, 2022
9ddbe58
Merge pull request #40 from Systemorph/defaultsStateParameters
amuolo Oct 10, 2022
260b872
split directories
dcolleoni Oct 10, 2022
5b072d7
fix tests + add readme + seperate overview nb
dcolleoni Oct 11, 2022
c24a558
include changes on factory
dcolleoni Oct 11, 2022
d2ad559
Merge remote-tracking branch 'origin/develop' into ExtractDataProject
dcolleoni Oct 11, 2022
4f6f4cb
Merge pull request #42 from Systemorph/ExtractDataProject
dcolleoni Oct 12, 2022
92f6876
adapt to the split
Oct 13, 2022
4f178e2
still not working properly
calderinisystemorph Oct 13, 2022
44412fa
code cleanup
calderinisystemorph Oct 13, 2022
d98b701
new file creation
calderinisystemorph Oct 13, 2022
005f28f
update packages and fix csm with bm
dcolleoni Oct 14, 2022
446edd0
Merge pull request #44 from Systemorph/UpdatePackageAndFixCsm
dcolleoni Oct 14, 2022
49a3b6f
approaching
Oct 14, 2022
bf8c098
Merge branch 'develop' of https://github.com/Systemorph/IFRS17Calcula…
Oct 14, 2022
59e5ca0
better
Oct 16, 2022
c6513da
testing ifrsvariables
calderinisystemorph Oct 17, 2022
fc000a1
Merge remote-tracking branch 'origin/develop' into Multiple_Scenario_…
calderinisystemorph Oct 17, 2022
efd06dc
implement feedback
Oct 17, 2022
886ec68
final feedback
Oct 17, 2022
7b8850b
fix
Oct 17, 2022
34a97cf
const version ce
Oct 17, 2022
9951430
Merge pull request #43 from Systemorph/defaultAocConfig
amuolo Oct 17, 2022
26970b4
testing IfrsVariables calculations
calderinisystemorph Oct 18, 2022
fa2154c
Merge remote-tracking branch 'origin/develop' into Multiple_Scenario_…
calderinisystemorph Oct 18, 2022
d304e3d
new partition added
calderinisystemorph Oct 18, 2022
ad47b3e
implementing new test
calderinisystemorph Oct 18, 2022
254a97e
test cleaned
calderinisystemorph Oct 18, 2022
016fac7
Update links (#51)
dcolleoni Oct 20, 2022
546ae04
removal arithmetics
Oct 21, 2022
c26697d
testing queries
calderinisystemorph Oct 24, 2022
5a1fc85
Merge remote-tracking branch 'origin/develop' into Multiple_Scenario_…
calderinisystemorph Oct 24, 2022
95ccbb2
Simple value test data (#54)
Oct 24, 2022
03c35bf
reset consts
Oct 25, 2022
b8d6e88
implement feedback part 1
Oct 26, 2022
3a07d9a
Overview texts (#53)
UMueller1 Oct 26, 2022
2312bcb
finalized + hot fixes
Oct 26, 2022
22bd497
ReportGridOptions
dcolleoni Oct 26, 2022
193c066
checking multiple import of the same scenario
calderinisystemorph Oct 27, 2022
54c5327
Merge branch 'develop' of https://github.com/Systemorph/IFRS17Calcula…
Oct 27, 2022
5a143ff
final fixes and feedback implementations
Oct 27, 2022
a6ee353
Merge pull request #55 from Systemorph/removalArithmetic
amuolo Oct 27, 2022
4ca1bd3
dynamic problems solved
calderinisystemorph Oct 27, 2022
1a0647b
Merge remote-tracking branch 'origin/develop' into Multiple_Scenario_…
calderinisystemorph Oct 27, 2022
dfbc6b9
fixing aoctype for scenario
calderinisystemorph Oct 31, 2022
a864f0f
Interactive reports (#58)
dcolleoni Oct 31, 2022
b78b36a
test for actualsr
calderinisystemorph Nov 2, 2022
0e880bf
Merge remote-tracking branch 'origin/develop' into Multiple_Scenario_…
calderinisystemorph Nov 2, 2022
e614d1a
code cleanup
calderinisystemorph Nov 2, 2022
ca009df
New format design in importers (#62)
nnikolopoulos Nov 2, 2022
fa5563f
import yield curve trigger calculations
calderinisystemorph Nov 3, 2022
d597a30
Merge remote-tracking branch 'origin/develop' into Scenario_for_param…
calderinisystemorph Nov 3, 2022
0c0821c
forward
Nov 3, 2022
7a4f464
Package update (#65)
dcolleoni Nov 3, 2022
dcac721
cleanups
Nov 4, 2022
07b3244
Merge branch 'develop' of https://github.com/Systemorph/IFRS17Calcula…
Nov 4, 2022
d62dc98
Fixing AA and OA opening and benchmark simple importer (#57)
Nov 4, 2022
372dcb6
much better
Nov 5, 2022
091b4df
Merge branch 'develop' of https://github.com/Systemorph/IFRS17Calcula…
Nov 5, 2022
eb04b4d
implemented
Nov 7, 2022
10dcfc8
Aggregate by in report variable (#67)
sbusato Nov 7, 2022
ab1ddaa
Clean up doc (#71)
dcolleoni Nov 7, 2022
1c0cbe5
Merge remote-tracking branch 'origin/develop' into Scenario_for_param…
calderinisystemorph Nov 7, 2022
a79e1d6
Merge remote-tracking branch 'origin/Multiple_Scenario_Implementation…
calderinisystemorph Nov 7, 2022
fae9b83
implement feedback
Nov 7, 2022
21d1b45
Merge pull request #72 from Systemorph/NoMorePartitions
amuolo Nov 7, 2022
7f507ef
Merge branch 'develop' of https://github.com/Systemorph/IFRS17Calcula…
Nov 7, 2022
47bdcc3
code cleanup after merging
calderinisystemorph Nov 7, 2022
6bb0243
Merge remote-tracking branch 'origin/develop' into Scenario_for_param…
calderinisystemorph Nov 7, 2022
8bddd27
cleanups
Nov 7, 2022
77987a9
Merge remote-tracking branch 'origin/Multiple_Scenario_Implementation…
calderinisystemorph Nov 7, 2022
3cb6ee8
cleanups x2
Nov 7, 2022
b915eb5
new importer for yield curve
calderinisystemorph Nov 8, 2022
68b7699
Merge remote-tracking branch 'origin/Multiple_Scenario_Implementation…
calderinisystemorph Nov 8, 2022
1b5cbe3
importer cleanup
calderinisystemorph Nov 8, 2022
bf0c9c7
fixes needed after merge
Nov 8, 2022
fd7cfbf
all tests are green
Nov 8, 2022
fa36959
implement feedback
Nov 8, 2022
98885ad
Doc cleanup2 (#76)
dcolleoni Nov 9, 2022
7bbd235
importer for yieldcurve improved
calderinisystemorph Nov 9, 2022
ace44c8
implement all feedbacks
Nov 9, 2022
85a6761
Merge pull request #45 from Systemorph/Multiple_Scenario_Implementation
amuolo Nov 9, 2022
ad2384a
yield importer fails to initialize importstorage
calderinisystemorph Nov 11, 2022
6448259
Merge remote-tracking branch 'origin/develop' into Scenario_for_param…
calderinisystemorph Nov 14, 2022
2cc046d
packages + withGridOption + await HierarchyCache init (#83)
dcolleoni Nov 14, 2022
f7a3696
Change in ReportMutableScopes NB (#85)
nnikolopoulos Nov 14, 2022
768bc41
changes in datamodel
calderinisystemorph Nov 14, 2022
a546177
New metadata (#87)
nnikolopoulos Nov 15, 2022
8bb4648
Rename pv amount type (#88)
nnikolopoulos Nov 15, 2022
2e2431b
New metadatax2 (#91)
nnikolopoulos Nov 16, 2022
f91efb1
Signs and actuals (#77)
Nov 16, 2022
2b4a8fd
importer written
calderinisystemorph Nov 17, 2022
b10821a
Merge remote-tracking branch 'origin/develop' into Scenario_for_param…
calderinisystemorph Nov 17, 2022
835f304
fixing json errors
calderinisystemorph Nov 17, 2022
ee53bfd
fix more json errors
pkunszt Nov 17, 2022
dd017f5
YC importer cleanup
calderinisystemorph Nov 17, 2022
d8f1240
Present value series (#70)
tkukuljan Nov 18, 2022
8c55a01
Update Reports.ipynb (#96)
amuolo Nov 18, 2022
fe7d4ad
code clean up
calderinisystemorph Nov 18, 2022
0440457
Merge remote-tracking branch 'origin/develop' into Scenario_for_param…
calderinisystemorph Nov 18, 2022
b328759
New packages, tested at *STAGE* (17/11/2022) (#93)
nnikolopoulos Nov 21, 2022
b0cc7ac
Add a comma (#97)
nnikolopoulos Nov 21, 2022
808061a
code allignment with dev
calderinisystemorph Nov 21, 2022
8032682
Improve doc (#92)
dcolleoni Nov 22, 2022
9a19cb9
refactor of importer
calderinisystemorph Nov 23, 2022
02a47ed
Merge remote-tracking branch 'origin/develop' into Scenario_for_param…
calderinisystemorph Nov 23, 2022
760fb71
updated links (#101)
amuolo Nov 24, 2022
eea6596
Implement Disposable Workspace in all Importers (#100)
tkukuljan Nov 25, 2022
53b8ded
test improved
calderinisystemorph Nov 25, 2022
1f6f60b
Merge remote-tracking branch 'origin/develop' into Scenario_for_param…
calderinisystemorph Nov 25, 2022
045a255
Reorganising importers (#104)
tkukuljan Nov 25, 2022
f886f2f
code cleanup
calderinisystemorph Nov 28, 2022
6b0462e
Merge remote-tracking branch 'origin/develop' into Scenario_for_param…
calderinisystemorph Nov 28, 2022
8192c48
new importer for yield curve
calderinisystemorph Nov 28, 2022
d7ca8ec
removing full-template
calderinisystemorph Nov 28, 2022
e9faa9f
present value reset to develop
calderinisystemorph Nov 28, 2022
6bb4a16
reset to develop
calderinisystemorph Nov 28, 2022
8197ee1
reset to develop
calderinisystemorph Nov 28, 2022
af579df
reset changes from wrong merge
calderinisystemorph Nov 29, 2022
4c75b0e
tests added again
calderinisystemorph Nov 29, 2022
91c45a4
reset merging conflit errors
calderinisystemorph Nov 29, 2022
20520a4
fixing importers noteboook
calderinisystemorph Nov 29, 2022
398bd27
fixing importer merging errors
calderinisystemorph Nov 29, 2022
4949f37
fixing importers
calderinisystemorph Nov 29, 2022
f4b43d3
merging conflicts fixed
calderinisystemorph Nov 29, 2022
5e619f6
equality comparer and queries updated
calderinisystemorph Nov 29, 2022
36db29e
data model, importers and importstorage updated
calderinisystemorph Nov 29, 2022
270c126
scenario avalinade for datanodes
calderinisystemorph Nov 30, 2022
ce3298e
scenario test improved
calderinisystemorph Nov 30, 2022
98720e6
Merge remote-tracking branch 'origin/develop' into Scenario_for_param…
calderinisystemorph Nov 30, 2022
dea3833
Merge branch 'Importer_Scenario_Cashflow_Actuals' into Scenario_for_p…
calderinisystemorph Nov 30, 2022
6c0f95d
preliminary files updated
calderinisystemorph Nov 30, 2022
ad05d06
new format implemented
calderinisystemorph Nov 30, 2022
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
8 changes: 4 additions & 4 deletions ifrs17-template/Files/DataNodes/DataNodes_CH.csv
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ ReportingNode,,,,,,
CH,,,,,,
,,,,,,
@@InsurancePortfolio,,,,,,
SystemName,DisplayName,ContractualCurrency,LineOfBusiness,ValuationApproach,OciType,
SystemName,DisplayName,ContractualCurrency,LineOfBusiness,ValuationApproach,OciType,Scenario,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove Scenario from Data Node csv files, it should be optional not mandatory. Apply also for all recurrences.

DT,DT Complex CF,USD,ANN,BBA,Default,
DT1,DT1 OCI,USD,ANN,BBA,Default,
DT2,DT2 NOCI,USD,ANN,BBA,,
Expand All @@ -12,7 +12,7 @@ DT4,DT4 OCI,USD,ANN,BBA,Default,
DT5,DT5 Simple Import,USD,ANN,BBA,Default,
,,,,,,
@@GroupOfInsuranceContract,,,,,,
SystemName,DisplayName,InsurancePortfolio,AnnualCohort,LiabilityType,Profitability,
SystemName,DisplayName,InsurancePortfolio,AnnualCohort,LiabilityType,Profitability,Scenario,
GicComplex,Gic test discounting,DT,2020,LRC,P,
DT1.1,DT1.1 OCI LRC PA 0.8,DT1,2020,LRC,P,
DT1.2,DT1.2 OCI LIC,DT1,2020,LIC,P,
Expand All @@ -26,13 +26,13 @@ DT4.1,DT4.1 CSM PA 0.8,DT4,2020,LRC,P,
DT5.1,DT5.1 Simple Import on DT 4.1,DT5,2020,LRC,P,
,,,,,,
@@ReinsurancePortfolio,,,,,,
SystemName,DisplayName,ContractualCurrency,LineOfBusiness,ValuationApproach,OciType,
SystemName,DisplayName,ContractualCurrency,LineOfBusiness,ValuationApproach,OciType,Scenario,
DTR,DTR complex CF,USD,ANN,BBA,,
DTR1,DTR1 OCI,USD,ANN,BBA,Default,
DTR2,DTR2 NOCI,USD,ANN,BBA,,
,,,,,,
@@GroupOfReinsuranceContract,,,,,,
SystemName,DisplayName,ReinsurancePortfolio,AnnualCohort,LiabilityType,Profitability,Partner
SystemName,DisplayName,ReinsurancePortfolio,AnnualCohort,LiabilityType,Profitability,Partner,Scenario,
GricComplex,Gric test for discounting,DTR,2020,LRC,P,PT1
DTR1.1,DTR1.1 OCI LRC,DTR1,2020,LRC,P,PT1
DTR1.2,DTR1.2 OCI LIC,DTR1,2020,LIC,P,PT1
Expand Down
7 changes: 7 additions & 0 deletions ifrs17-template/Files/Parameters/YieldCurve_2020_1.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@@Main
Year,Month,Scenario
2020,1,
@@YieldCurve
Currency,Values0,Values1,Values2,Values3
USD,0.002,0.002,0.002,0.002

7 changes: 7 additions & 0 deletions ifrs17-template/Files/Parameters/YieldCurve_2020_12.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@@Main
Year,Month,Scenario
2020,12,
@@YieldCurve
Currency,Values0,Values1,Values2,Values3
USD,0.002,0.002,0.002,0.002

9 changes: 9 additions & 0 deletions ifrs17-template/Files/Parameters/YieldCurve_2020_3.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
@@Main
Year,Month,Scenario
2020,3,
@@YieldCurve
Currency,Values0,Values1,Values2,Values3
EUR,0.008685495,0.008685495,0.018498471,0.019966839
CHF,0.002,0.002,0.002,0.002
USD,0.002,0.002,0.002,0.002
GBP,0.002,0.002,0.002,0.002
8 changes: 8 additions & 0 deletions ifrs17-template/Files/Parameters/YieldCurve_2021_3.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
@@Main
Year,Month,Scenario
2021,3,
@@YieldCurve
Currency,Values0,Values1,Values2,Values3
CHF,0.1,0.1,0.1,0.1
USD,0.005,0.005,0.005,0.005
GBP,0.005,0.005,0.005,0.005
1 change: 1 addition & 0 deletions ifrs17-template/Import/CloseImportTemplate.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@
"\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- ImportFormat.YieldCurve : TODO",
"\n"
],
"metadata": {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,12 @@
{
"cell_type": "code",
"source": [
"await Import.FromFile(\"../Files/Parameters/YieldCurve.csv\").WithType<YieldCurve>().SnapshotMode().WithTarget(DataSource).ExecuteAsync()"
"//await Import.FromFile(\"../Files/Parameters/YieldCurve.csv\").WithType<YieldCurve>().SnapshotMode().WithTarget(DataSource).ExecuteAsync()",
"\nvar log1 = await Import.FromFile(\"../Files/Parameters/YieldCurve_2020_1.csv\").WithType<YieldCurve>().SnapshotMode().WithTarget(DataSource).ExecuteAsync();",
"\nvar log2 = await Import.FromFile(\"../Files/Parameters/YieldCurve_2020_3.csv\").WithType<YieldCurve>().SnapshotMode().WithTarget(DataSource).ExecuteAsync();",
"\nvar log3 = await Import.FromFile(\"../Files/Parameters/YieldCurve_2020_12.csv\").WithType<YieldCurve>().SnapshotMode().WithTarget(DataSource).ExecuteAsync();",
"\nvar log4 = await Import.FromFile(\"../Files/Parameters/YieldCurve_2021_3.csv\").WithType<YieldCurve>().SnapshotMode().WithTarget(DataSource).ExecuteAsync();",
"\nlog1.Merge(log2).Merge(log3).Merge(log4)"
],
"metadata": {},
"execution_count": 0,
Expand Down
181 changes: 181 additions & 0 deletions ifrs17-template/Test/ScenarioParameterTest.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,181 @@
{
"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": [
"# Context"
],
"metadata": {},
"execution_count": 0,
"outputs": []
},
{
"cell_type": "code",
"source": [
"#!eval-notebook \"../Initialization/InitSystemorphToMemory\""
],
"metadata": {},
"execution_count": 0,
"outputs": []
},
{
"cell_type": "code",
"source": [
"Workspace.Reset(x => x.ResetInitializationRules().ResetCurrentPartitions());",
"\nWorkspace.Initialize(x => x.FromSource(DataSource));",
"\nvar defaultVarsBE = Workspace.Query<IfrsVariable>();"
],
"metadata": {},
"execution_count": 0,
"outputs": []
},
{
"cell_type": "markdown",
"source": [
"# Yield Curve Scenario"
],
"metadata": {},
"execution_count": 0,
"outputs": []
},
{
"cell_type": "code",
"source": [
"var yieldCurve = @\"",
"\n@@YieldCurve",
"\nCurrency,Year,Month,Scenario,Values0,Values1,Values2,Values3",
"\nEUR,2020,3,,0.008685495,0.008685495,0.018498471,0.019966839",
"\nCHF,2020,3,,0.002,0.002,0.002,0.002",
"\nCHF,2021,3,,0.1,0.1,0.1,0.1",
"\nUSD,2021,3,,0.005,0.005,0.005,0.005",
"\nUSD,2020,12,,0.002,0.002,0.002,0.002",
"\nUSD,2020,3,,0.002,0.002,0.002,0.002",
"\nUSD,2020,1,,0.002,0.002,0.002,0.002",
"\nEUR,2018,3,MTUP10pct,0.009554045,0.009554045,0.020348318,0.021963523",
"\nCHF,2018,3,MTUP10pct,0.0022,0.0022,0.0022,0.0022",
"\nCHF,2019,3,MTUP10pct,0.11,0.11,0.11,0.11",
"\nUSD,2019,3,MTUP10pct,0.0055,0.0055,0.0055,0.0055",
"\nUSD,2018,12,MTUP10pct,0.0022,0.0022,0.0022,0.0022",
"\nUSD,2018,3,MTUP10pct,0.0022,0.0022,0.0022,0.0022",
"\nUSD,2018,1,MTUP10pct,0.0022,0.0022,0.0022,0.0022",
"\nEUR,2020,12,MTUP10pct,0.009554045,0.009554045,0.020348318,0.021963523",
"\nCHF,2020,12,MTUP10pct,0.0022,0.0022,0.0022,0.0022",
"\nCHF,2021,3,MTUP10pct,0.11,0.11,0.11,0.11",
"\nUSD,2021,3,MTUP10pct,0.0055,0.0055,0.0055,0.0055",
"\nUSD,2020,12,MTUP10pct,0.0022,0.0022,0.0022,0.0022",
"\nUSD,2020,3,MTUP10pct,0.0022,0.0022,0.0022,0.0022",
"\nUSD,2020,1,MTUP10pct,0.0022,0.0022,0.0022,0.0022\";"
],
"metadata": {},
"execution_count": 0,
"outputs": []
},
{
"cell_type": "code",
"source": [
"var log = await Import.FromString(yieldCurve).WithFormat(ImportFormats.YieldCurve).WithTarget(DataSource).ExecuteAsync();",
"\nWorkspace.Reset(x => x.ResetInitializationRules().ResetCurrentPartitions());",
"\nWorkspace.Initialize(x => x.FromSource(DataSource));",
"\nlog.Warnings.Count().Should().Be(6);"
],
"metadata": {},
"execution_count": 0,
"outputs": []
},
{
"cell_type": "markdown",
"source": [
"## Test 2020Q4 with Scenario MTUP10pct"
],
"metadata": {},
"execution_count": 0,
"outputs": []
},
{
"cell_type": "code",
"source": [
"log"
],
"metadata": {},
"execution_count": 0,
"outputs": []
},
{
"cell_type": "code",
"source": [
"var argsBestEstimate = new ImportArgs (\"CH\",2020, 12, Periodicity.Quarterly, null, ImportFormats.Cashflow);",
"\nvar defaultPartition = (Guid)(await DataSource.Partition.GetKeyForInstanceAsync<PartitionByReportingNodeAndPeriod>(argsBestEstimate)); ",
"\n",
"\nvar scenarioArgs = new ImportArgs (\"CH\",2020, 12, Periodicity.Quarterly, \"MTUP10pct\", ImportFormats.Cashflow);",
"\nawait Workspace.Partition.SetAsync<PartitionByReportingNodeAndPeriod>(scenarioArgs);",
"\nawait DataSource.Partition.SetAsync<PartitionByReportingNodeAndPeriod>(scenarioArgs);",
"\nvar diffIfrsVars = Workspace.Query<IfrsVariable>().Except(defaultVarsBE.Where(x => x.Partition == defaultPartition).ToArray(), IfrsVariableComparer.Instance());",
"\ndiffIfrsVars.ToArray().Length.Should().NotBe(0);"
],
"metadata": {},
"execution_count": 0,
"outputs": []
},
{
"cell_type": "markdown",
"source": [
"## Test 2021Q1 with Scenario MTUP10pct"
],
"metadata": {},
"execution_count": 0,
"outputs": []
},
{
"cell_type": "code",
"source": [
"var argsBestEstimate = new ImportArgs (\"CH\",2021, 3, Periodicity.Quarterly, null, ImportFormats.Cashflow);",
"\nvar defaultPartition = (Guid)(await DataSource.Partition.GetKeyForInstanceAsync<PartitionByReportingNodeAndPeriod>(argsBestEstimate)); ",
"\n",
"\nvar scenarioArgs = new ImportArgs (\"CH\",2021, 3, Periodicity.Quarterly, \"MTUP10pct\", ImportFormats.Cashflow);",
"\nawait Workspace.Partition.SetAsync<PartitionByReportingNodeAndPeriod>(scenarioArgs);",
"\nawait DataSource.Partition.SetAsync<PartitionByReportingNodeAndPeriod>(scenarioArgs);",
"\nvar diffIfrsVars = Workspace.Query<IfrsVariable>().Except(defaultVarsBE.Where(x => x.Partition == defaultPartition).ToArray(), IfrsVariableComparer.Instance());",
"\ndiffIfrsVars.ToArray().Length.Should().NotBe(0);"
],
"metadata": {},
"execution_count": 0,
"outputs": []
},
{
"cell_type": "markdown",
"source": [
"## Robustness: Reimport does not trigger Calculations"
],
"metadata": {},
"execution_count": 0,
"outputs": []
},
{
"cell_type": "code",
"source": [
"var log = await Import.FromString(yieldCurve).WithFormat(ImportFormats.YieldCurve).WithTarget(DataSource).ExecuteAsync();",
"\nWorkspace.Reset(x => x.ResetInitializationRules().ResetCurrentPartitions());",
"\nWorkspace.Initialize(x => x.FromSource(DataSource));",
"\nlog.Warnings.Count().Should().Be(1);"
],
"metadata": {},
"execution_count": 0,
"outputs": []
}
]
}
Loading