Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
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
8ba025c
firsts comments resolved
calderinisystemorph Dec 2, 2022
4886ccb
Merge remote-tracking branch 'origin/develop' into Importer_Scenario_…
calderinisystemorph Dec 2, 2022
c43d3f8
all comments resolved
calderinisystemorph Dec 2, 2022
2a55e62
scenario test works
calderinisystemorph Dec 4, 2022
3e54971
estimate type fix
Dec 5, 2022
6b276e2
more scenario tests
Dec 5, 2022
695f270
revert calculation engine notebook
Dec 6, 2022
a3a1a29
improved union of target/default variables
Dec 6, 2022
be3a99d
full union + save zeros for scenarios
Dec 7, 2022
f07a088
scenario tests are green
Dec 7, 2022
ba8b108
Merge remote-tracking branch 'origin/develop' into Importer_Scenario_…
calderinisystemorph Dec 7, 2022
062fe34
fix equality comparer
Dec 7, 2022
e011351
Merge branch 'Importer_Scenario_Cashflow_Actuals' of https://github.c…
Dec 8, 2022
26053ed
best estimate all green
Dec 8, 2022
56c19fb
ifrs variables scenario new benchmark
Dec 8, 2022
2870df2
openings importer cleanups
Dec 8, 2022
09a5c83
first implementation of yield curve importer
calderinisystemorph Dec 8, 2022
8fb42af
fix report benchmark scenario
Dec 12, 2022
04f9055
cleanup
Dec 12, 2022
322085a
preparation before pull develop
Dec 13, 2022
a4c541f
Merge branch 'develop' of https://github.com/Systemorph/IFRS17Calcula…
Dec 13, 2022
6ed2464
scenario for GOC removed
Dec 13, 2022
67d807e
YieldCurves new format added.
calderinisystemorph Dec 13, 2022
f552dac
more readable relaxed query util method
Dec 13, 2022
5c57183
warning triggering multiple calculation
calderinisystemorph Dec 13, 2022
2c987e6
Merge remote-tracking branch 'origin/Importer_Scenario_Cashflow_Actua…
calderinisystemorph Dec 13, 2022
bab0375
Merge remote-tracking branch 'origin/Importer_Scenario_Cashflow_Actua…
calderinisystemorph Dec 13, 2022
c2a779f
cleanup the importer
calderinisystemorph Dec 13, 2022
f486952
comments on warning implemented
calderinisystemorph Dec 13, 2022
d12266d
Merge branch 'Importer_Scenario_Cashflow_Actuals' into Yield_Curve_wi…
calderinisystemorph Dec 13, 2022
e4c08d7
test clean up
calderinisystemorph Dec 13, 2022
f09aff1
YieldCurve Importer now trigger calculation
calderinisystemorph Dec 13, 2022
236a2b7
fix report variables benchmark
Dec 13, 2022
33a8a92
test coverage improved
calderinisystemorph Dec 14, 2022
29fd4a2
Merge remote-tracking branch 'origin/Importer_Scenario_Cashflow_Actua…
calderinisystemorph Dec 14, 2022
d1e461d
Merge remote-tracking branch 'origin/Importer_Scenario_Cashflow_Actua…
calderinisystemorph Dec 14, 2022
899b7f9
some comments resolved
calderinisystemorph Dec 14, 2022
eb016f3
Merge remote-tracking branch 'origin/develop' into Importer_Scenario_…
calderinisystemorph Dec 15, 2022
6dfd9e5
validation added
calderinisystemorph Dec 15, 2022
d31353a
new args datamodel, bm with standard digits
calderinisystemorph Dec 16, 2022
2bb6168
Useless Zeros not saved, code cleanup
calderinisystemorph Dec 19, 2022
f67e384
comments on EqualityComparer resolved, BM updated
calderinisystemorph Dec 19, 2022
6f42ff6
Test Improved
calderinisystemorph Dec 19, 2022
6737504
comments resolved
calderinisystemorph Dec 20, 2022
b0aaf09
Merge remote-tracking branch 'origin/develop' into Importer_Scenario_…
calderinisystemorph Dec 20, 2022
dcda8db
Merge branch 'Importer_Scenario_Cashflow_Actuals' into Yield_Curve_wi…
calderinisystemorph Dec 20, 2022
90a04d1
refactoring of Main Parser, all tests green
calderinisystemorph Dec 20, 2022
5d60f21
Merge remote-tracking branch 'origin/develop' into Yield_Curve_with_M…
calderinisystemorph Dec 20, 2022
fae228a
typo fixing
calderinisystemorph Dec 20, 2022
44e508d
Merge branch 'Yield_Curve_with_Main_tab_and_Format' into Yield_Curve_…
calderinisystemorph Dec 20, 2022
4e0abfa
importer and test for yield curve improved
calderinisystemorph Dec 20, 2022
e39cc9b
Merge remote-tracking branch 'origin/develop' into Yield_Curve_with_M…
calderinisystemorph Dec 21, 2022
b9ac247
code improvment and cleanup
calderinisystemorph Dec 21, 2022
603c63b
code cleanup
calderinisystemorph Dec 22, 2022
c803c51
Name property in YieldCurve Implemented
calderinisystemorph Dec 22, 2022
af344a8
bug fix, all test green
calderinisystemorph Dec 22, 2022
45c1b09
commit to DB only with succeeded import
calderinisystemorph Dec 22, 2022
3198d28
Merge branch 'Yield_Curve_with_Main_tab_and_Format' into Yield_Curve_…
calderinisystemorph Dec 22, 2022
0988f5f
Merge branch 'develop' into Yield_Curve_Import_Triggers_Calculations
calderinisystemorph Dec 22, 2022
c794923
yield curve updated
calderinisystemorph Dec 22, 2022
6e48ebd
Merge branch 'develop' into Yield_Curve_with_Main_tab_and_Format
calderinisystemorph Dec 23, 2022
e53cb94
new yield curves files created
calderinisystemorph Dec 23, 2022
f2c8517
comment resolved
calderinisystemorph Jan 3, 2023
bb7e6d9
some comments resolved
calderinisystemorph Jan 4, 2023
9c5f922
Merge branch 'Yield_Curve_with_Main_tab_and_Format' into Yield_Curve_…
calderinisystemorph Jan 4, 2023
5ef6da9
renames and markdown and use of .Any
dcolleoni Jan 5, 2023
92f44f7
code improvments
calderinisystemorph Jan 5, 2023
e0c4eeb
Merge branch 'Yield_Curve_with_Main_tab_and_Format' into Yield_Curve_…
calderinisystemorph Jan 5, 2023
d235b77
test debug
calderinisystemorph Jan 6, 2023
bee1c32
Merge remote-tracking branch 'origin/develop' into Yield_Curve_Import…
calderinisystemorph Jan 6, 2023
cba75a4
cleanup merge errors
calderinisystemorph Jan 11, 2023
4f626a2
code cleanup
calderinisystemorph Jan 12, 2023
a6e73d6
Merge branch 'develop' of https://github.com/Systemorph/IFRS17Calcula…
Jan 12, 2023
0bbd768
typo fix, test and importer improved
calderinisystemorph Jan 12, 2023
6adc836
Merge branch 'Yield_Curve_Import_Triggers_Calculations' of https://gi…
Jan 13, 2023
bd88350
Merge branch 'develop' of https://github.com/Systemorph/IFRS17Calcula…
Jan 13, 2023
7272c17
Merge branch 'develop' of https://github.com/Systemorph/IFRS17Calcula…
Jan 17, 2023
2732291
best
Jan 19, 2023
0980c00
implement feedback
Jan 20, 2023
adbacc0
feedback v2: consistency and readability up
Jan 20, 2023
c6dbb99
add toggle
Jan 22, 2023
fab4dae
commit partition renaming
Jan 22, 2023
d457d62
improved toggle + better relaxed queries
Jan 23, 2023
a58a80c
make args and storage initializer more robust
Jan 23, 2023
cc4b70b
Merge branch 'develop' of https://github.com/Systemorph/IFRS17Calcula…
Jan 23, 2023
24cacd4
pv cleanups
Jan 23, 2023
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
12 changes: 3 additions & 9 deletions PresentValueSeries/PresentValue - Episode 2.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,7 @@
{
"cell_type": "code",
"source": [
"await Import.FromFile(\"YieldCurve.xlsx\")",
"\n .WithType<YieldCurve>()",
"\n .WithTarget(DataSource)",
"\n .ExecuteAsync()"
"await Import.FromFile(\"YieldCurve.xlsx\").WithType<YieldCurve>().WithTarget(DataSource).ExecuteAsync()"
],
"metadata": {},
"execution_count": 0,
Expand All @@ -180,10 +177,7 @@
{
"cell_type": "code",
"source": [
"await Import.FromFile(\"Cashflows.xlsx\")",
"\n .WithFormat(\"Cashflow\")",
"\n .WithTarget(DataSource)",
"\n .ExecuteAsync()"
"await Import.FromFile(\"Cashflows.xlsx\").WithFormat(\"Cashflow\").WithTarget(DataSource).ExecuteAsync()"
],
"metadata": {},
"execution_count": 0,
Expand Down Expand Up @@ -507,4 +501,4 @@
"outputs": []
}
]
}
}
35 changes: 7 additions & 28 deletions PresentValueSeries/PresentValue - Episode 3.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,7 @@
{
"cell_type": "code",
"source": [
"await Import.FromFile(\"DataNodes_CH.xlsx\")",
"\n .WithFormat(\"DataNode\")",
"\n .WithTarget(DataSource)",
"\n .ExecuteAsync()"
"await Import.FromFile(\"DataNodes_CH.xlsx\").WithFormat(\"DataNode\").WithTarget(DataSource).ExecuteAsync()"
],
"metadata": {},
"execution_count": 0,
Expand All @@ -180,10 +177,7 @@
{
"cell_type": "code",
"source": [
"await Import.FromFile(\"DataNodes_DE.xlsx\")",
"\n .WithFormat(\"DataNode\")",
"\n .WithTarget(DataSource)",
"\n .ExecuteAsync()"
"await Import.FromFile(\"DataNodes_DE.xlsx\").WithFormat(\"DataNode\").WithTarget(DataSource).ExecuteAsync()"
],
"metadata": {},
"execution_count": 0,
Expand All @@ -192,10 +186,7 @@
{
"cell_type": "code",
"source": [
"await Import.FromFile(\"YieldCurve.xlsx\")",
"\n .WithType<YieldCurve>()",
"\n .WithTarget(DataSource)",
"\n .ExecuteAsync()"
"await Import.FromFile(\"YieldCurve.xlsx\").WithType<YieldCurve>().WithTarget(DataSource).ExecuteAsync()"
],
"metadata": {},
"execution_count": 0,
Expand All @@ -204,10 +195,7 @@
{
"cell_type": "code",
"source": [
"await Import.FromFile(\"Cashflows.xlsx\")",
"\n .WithFormat(\"Cashflow\")",
"\n .WithTarget(DataSource)",
"\n .ExecuteAsync()"
"await Import.FromFile(\"Cashflows.xlsx\").WithFormat(\"Cashflow\").WithTarget(DataSource).ExecuteAsync()"
],
"metadata": {},
"execution_count": 0,
Expand All @@ -216,10 +204,7 @@
{
"cell_type": "code",
"source": [
"await Import.FromFile(\"CF_CH_2021_12.xlsx\")",
"\n .WithFormat(\"Cashflow\")",
"\n .WithTarget(DataSource)",
"\n .ExecuteAsync()"
"await Import.FromFile(\"CF_CH_2021_12.xlsx\").WithFormat(\"Cashflow\").WithTarget(DataSource).ExecuteAsync()"
],
"metadata": {},
"execution_count": 0,
Expand All @@ -228,10 +213,7 @@
{
"cell_type": "code",
"source": [
"await Import.FromFile(\"CF_DE_2021_12.xlsx\")",
"\n .WithFormat(\"Cashflow\")",
"\n .WithTarget(DataSource)",
"\n .ExecuteAsync()"
"await Import.FromFile(\"CF_DE_2021_12.xlsx\").WithFormat(\"Cashflow\").WithTarget(DataSource).ExecuteAsync()"
],
"metadata": {},
"execution_count": 0,
Expand All @@ -240,10 +222,7 @@
{
"cell_type": "code",
"source": [
"await Import.FromFile(\"CF_DE_2022_12.xlsx\")",
"\n .WithFormat(\"Cashflow\")",
"\n .WithTarget(DataSource)",
"\n .ExecuteAsync()"
"await Import.FromFile(\"CF_DE_2022_12.xlsx\").WithFormat(\"Cashflow\").WithTarget(DataSource).ExecuteAsync()"
],
"metadata": {},
"execution_count": 0,
Expand Down
2 changes: 1 addition & 1 deletion ifrs17-template/Files/Parameters/YieldCurve_2020_1.csv
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@@Main
Year,Month
2020,12
2020,1
@@YieldCurve
Currency,Values0,Values1,Values2,Values3
USD,0.002,0.002,0.002,0.002
Expand Down
2 changes: 1 addition & 1 deletion ifrs17-template/Files/Parameters/YieldCurve_2020_12.csv
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@@Main
Year,Month
2020,1
2020,12
@@YieldCurve
Currency,Values0,Values1,Values2,Values3
USD,0.002,0.002,0.002,0.002
Expand Down
133 changes: 101 additions & 32 deletions ifrs17-template/Test/ScenarioDataImportTest.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,49 @@
"execution_count": 0,
"outputs": []
},
{
"cell_type": "markdown",
"source": [
"# Setting Constants"
],
"metadata": {},
"execution_count": 0,
"outputs": []
},
{
"cell_type": "code",
"source": [
"var ws = Workspace.CreateNew();",
"\nws.InitializeFrom(DataSource);",
"\nvar argsBestEstimate = new ImportArgs (\"CH\", 2020, 12, Periodicity.Quarterly, null, ImportFormats.Cashflow);",
"\nvar argsScenario = new ImportArgs (\"CH\", 2020, 12, Periodicity.Quarterly, \"Test\", ImportFormats.Cashflow);",
"\nvar initStorage = new ImportStorage(argsBestEstimate, DataSource, ws);",
"\nawait initStorage.InitializeAsync();",
"\nvar actualETs = initStorage.EstimateTypesByImportFormat[ImportFormats.Actual];",
"\nws.InitializeFrom(DataSource);"
],
"metadata": {},
"execution_count": 0,
"outputs": []
},
{
"cell_type": "code",
"source": [
"var argsBestEstimate = new ImportArgs (\"CH\", 2020, 12, Periodicity.Quarterly, null, ImportFormats.Cashflow);",
"\nvar argsScenario = new ImportArgs (\"CH\", 2020, 12, Periodicity.Quarterly, \"Test\", ImportFormats.Cashflow);"
],
"metadata": {},
"execution_count": 0,
"outputs": []
},
{
"cell_type": "code",
"source": [
"var initStorage = new ImportStorage(argsBestEstimate, DataSource, ws);",
"\nawait initStorage.InitializeAsync();"
],
"metadata": {},
"execution_count": 0,
"outputs": []
},
{
"cell_type": "code",
"source": [
"var actualETs = initStorage.EstimateTypesByImportFormat[ImportFormats.Actual];",
"\nvar cashflowETs = initStorage.EstimateTypesByImportFormat[ImportFormats.Cashflow];",
"\nvar actualOrCashflowETs = actualETs.Intersect(cashflowETs);",
"\nvar onlyActualETs = actualETs.Except(cashflowETs);",
Expand Down Expand Up @@ -192,9 +225,11 @@
{
"cell_type": "code",
"source": [
"actualVars.Length.Should().Be(0);",
"\ncashflowVars.Length.Should().NotBe(0);",
"\ndiffs.Except(actualVars.Union(cashflowVars).Union(actualOrCashflowVars)).ToArray().Length.Should().Be(0);"
"if(EnableScenario) {",
"\n actualVars.Length.Should().Be(0);",
"\n cashflowVars.Length.Should().NotBe(0);",
"\n diffs.Except(actualVars.Union(cashflowVars).Union(actualOrCashflowVars)).ToArray().Length.Should().Be(0);",
"\n}"
],
"metadata": {},
"execution_count": 0,
Expand Down Expand Up @@ -250,9 +285,11 @@
{
"cell_type": "code",
"source": [
"actualVars.Length.Should().NotBe(0);",
"\ncashflowVars.Length.Should().Be(0);",
"\ndiffs.Except(actualVars.Union(cashflowVars).Union(actualOrCashflowVars)).ToArray().Length.Should().Be(0);"
"if(EnableScenario) {",
"\n actualVars.Length.Should().NotBe(0);",
"\n cashflowVars.Length.Should().Be(0);",
"\n diffs.Except(actualVars.Union(cashflowVars).Union(actualOrCashflowVars)).ToArray().Length.Should().Be(0);",
"\n}"
],
"metadata": {},
"execution_count": 0,
Expand Down Expand Up @@ -317,9 +354,11 @@
{
"cell_type": "code",
"source": [
"actualVars.Length.Should().Be(0);",
"\ncashflowVars.Length.Should().NotBe(0);",
"\ndiffs.Except(actualVars.Union(cashflowVars).Union(actualOrCashflowVars)).ToArray().Length.Should().Be(0);"
"if(EnableScenario) {",
"\n actualVars.Length.Should().Be(0);",
"\n cashflowVars.Length.Should().NotBe(0);",
"\n diffs.Except(actualVars.Union(cashflowVars).Union(actualOrCashflowVars)).ToArray().Length.Should().Be(0);",
"\n}"
],
"metadata": {},
"execution_count": 0,
Expand Down Expand Up @@ -376,9 +415,11 @@
{
"cell_type": "code",
"source": [
"diffs.Where(x => x.EstimateType == EstimateTypes.DA).ToArray().Length.Should().NotBe(0);",
"\ndiffs.Where(x => x.EstimateType == EstimateTypes.F).ToArray().Length.Should().Be(0);",
"\ndiffs.Except(actualVars.Union(cashflowVars).Union(actualOrCashflowVars)).ToArray().Length.Should().Be(0);"
"if(EnableScenario) {",
"\n diffs.Where(x => x.EstimateType == EstimateTypes.DA).ToArray().Length.Should().NotBe(0);",
"\n diffs.Where(x => x.EstimateType == EstimateTypes.F).ToArray().Length.Should().Be(0);",
"\n diffs.Except(actualVars.Union(cashflowVars).Union(actualOrCashflowVars)).ToArray().Length.Should().Be(0);",
"\n}"
],
"metadata": {},
"execution_count": 0,
Expand Down Expand Up @@ -441,9 +482,11 @@
{
"cell_type": "code",
"source": [
"diffs.Where(x => x.EstimateType == EstimateTypes.DA).ToArray().Length.Should().NotBe(0);",
"\nivsScenarioActualNoACAAEA.Where(x => x.EstimateType == EstimateTypes.F).Count().Should().NotBe(0);",
"\nivsScenarioActualNoACAAEA.Where(x => x.EstimateType == EstimateTypes.DA && Math.Abs(x.Value) > Precision).Count().Should().Be(0);"
"if(EnableScenario) {",
"\n diffs.Where(x => x.EstimateType == EstimateTypes.DA).ToArray().Length.Should().NotBe(0);",
"\n ivsScenarioActualNoACAAEA.Where(x => x.EstimateType == EstimateTypes.F).Count().Should().NotBe(0);",
"\n ivsScenarioActualNoACAAEA.Where(x => x.EstimateType == EstimateTypes.DA && Math.Abs(x.Value) > Precision).Count().Should().Be(0);",
"\n}"
],
"metadata": {},
"execution_count": 0,
Expand Down Expand Up @@ -525,7 +568,7 @@
{
"cell_type": "code",
"source": [
"diffs.Count().Should().Be(0);"
"if(EnableScenario) diffs.Count().Should().Be(0);"
],
"metadata": {},
"execution_count": 0,
Expand Down Expand Up @@ -619,8 +662,10 @@
{
"cell_type": "code",
"source": [
"diffs.Where(x => onlyCashflowETs.Contains(x.EstimateType) && x.EstimateType != EstimateTypes.F && Math.Abs(x.Value) > Precision).Count().Should().Be(0);",
"\ndiffs.Where(x => onlyActualETs.Contains(x.EstimateType) && Math.Abs(x.Value) > Precision).Count().Should().Be(0);"
"if(EnableScenario) {",
"\n diffs.Where(x => onlyCashflowETs.Contains(x.EstimateType) && x.EstimateType != EstimateTypes.F && Math.Abs(x.Value) > Precision).Count().Should().Be(0);",
"\n diffs.Where(x => onlyActualETs.Contains(x.EstimateType) && Math.Abs(x.Value) > Precision).Count().Should().Be(0);",
"\n}"
],
"metadata": {},
"execution_count": 0,
Expand Down Expand Up @@ -680,9 +725,11 @@
{
"cell_type": "code",
"source": [
"cashflowVars.Length.Should().NotBe(0);",
"\nactualVars.Length.Should().Be(0);",
"\ndiffs.Except(actualVars.Union(cashflowVars).Union(actualOrCashflowVars)).ToArray().Length.Should().Be(0);"
"if(EnableScenario) {",
"\n cashflowVars.Length.Should().NotBe(0);",
"\n actualVars.Length.Should().Be(0);",
"\n diffs.Except(actualVars.Union(cashflowVars).Union(actualOrCashflowVars)).ToArray().Length.Should().Be(0);",
"\n}"
],
"metadata": {},
"execution_count": 0,
Expand Down Expand Up @@ -762,9 +809,11 @@
{
"cell_type": "code",
"source": [
"actualVars.Length.Should().Be(0);",
"\ncashflowVars.Length.Should().NotBe(0);",
"\ncashflowVars.Where(x => x.EstimateType == EstimateTypes.DA).Count().Should().Be(0);"
"if(EnableScenario) {",
"\n actualVars.Length.Should().Be(0);",
"\n cashflowVars.Length.Should().NotBe(0);",
"\n cashflowVars.Where(x => x.EstimateType == EstimateTypes.DA).Count().Should().Be(0);",
"\n}"
],
"metadata": {},
"execution_count": 0,
Expand Down Expand Up @@ -877,8 +926,28 @@
{
"cell_type": "code",
"source": [
"actualVars.Length.Should().Be(0);",
"\ncashflowVars.Length.Should().NotBe(0);"
"if(EnableScenario) {",
"\n actualVars.Length.Should().Be(0);",
"\n cashflowVars.Length.Should().NotBe(0);",
"\n}"
],
"metadata": {},
"execution_count": 0,
"outputs": []
},
{
"cell_type": "code",
"source": [
""
],
"metadata": {},
"execution_count": 0,
"outputs": []
},
{
"cell_type": "code",
"source": [
""
],
"metadata": {},
"execution_count": 0,
Expand Down
Loading