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
252 changes: 252 additions & 0 deletions ifrs17-template/Report/ParameterReports.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,252 @@
{
"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": [
"# Data Initialization"
],
"metadata": {},
"execution_count": 0,
"outputs": []
},
{
"cell_type": "code",
"source": [
"#!eval-notebook \"../Initialization/InitSystemorphBaseToMemory\""
],
"metadata": {},
"execution_count": 0,
"outputs": []
},
{
"cell_type": "code",
"source": [
"Workspace.Reset(x => x.ResetInitializationRules().ResetCurrentPartitions());"
],
"metadata": {},
"execution_count": 0,
"outputs": []
},
{
"cell_type": "code",
"source": [
"Workspace.InitializeFrom(DataSource);"
],
"metadata": {},
"execution_count": 0,
"outputs": []
},
{
"cell_type": "markdown",
"source": [
"# Args"
],
"metadata": {},
"execution_count": 0,
"outputs": []
},
{
"cell_type": "code",
"source": [
"var args = new ImportArgs(\"CH\", 2021, 3, default, default , default);"
],
"metadata": {},
"execution_count": 0,
"outputs": []
},
{
"cell_type": "markdown",
"source": [
"# Data Node"
],
"metadata": {},
"execution_count": 0,
"outputs": []
},
{
"cell_type": "code",
"source": [
"var dataNodeData = await Workspace.GetDataNodeDataReportParameters(args);"
],
"metadata": {},
"execution_count": 0,
"outputs": []
},
{
"cell_type": "code",
"source": [
"var dataNodeStates = await Workspace.GetDataNodeStateReportParameters(args);"
],
"metadata": {},
"execution_count": 0,
"outputs": []
},
{
"cell_type": "code",
"source": [
"var allYieldCurves = await Workspace.GetYieldCurveReportParameters(args);;"
],
"metadata": {},
"execution_count": 0,
"outputs": []
},
{
"cell_type": "code",
"source": [
"var singleDataNodeParameters = await Workspace.GetSingleDataNodeReportParameters(args);;"
],
"metadata": {},
"execution_count": 0,
"outputs": []
},
{
"cell_type": "code",
"source": [
"var interDataNodeParameters = await Workspace.GetInterDataNodeParameters(args);;"
],
"metadata": {},
"execution_count": 0,
"outputs": []
},
{
"cell_type": "code",
"source": [
"var partnerRatings = await Workspace.GetPartnerRatingsReportParameters(args);"
],
"metadata": {},
"execution_count": 0,
"outputs": []
},
{
"cell_type": "code",
"source": [
"var partnerDefaultRates = await Workspace.GetCreditDefaultRatesReportParameters(args);;"
],
"metadata": {},
"execution_count": 0,
"outputs": []
},
{
"cell_type": "markdown",
"source": [
"# Reports"
],
"metadata": {},
"execution_count": 0,
"outputs": []
},
{
"cell_type": "code",
"source": [
"await Report.ForObjects(dataNodeData)",
"\n .WithQuerySource(Workspace)",
"\n .GroupRowsBy(x => x.Portfolio).GroupRowsBy(x => x.DataNode)",
"\n .ToTable()",
"\n .ExecuteAsync()"
],
"metadata": {},
"execution_count": 0,
"outputs": []
},
{
"cell_type": "code",
"source": [
"await Report.ForObjects(dataNodeStates)",
"\n .WithQuerySource(Workspace)",
"\n .GroupRowsBy(x => x.GroupOfContract)",
"\n .GroupColumnsBy(x => x.Period)",
"\n .ToTable()",
"\n .ExecuteAsync()",
"\n "
],
"metadata": {},
"execution_count": 0,
"outputs": []
},
{
"cell_type": "code",
"source": [
"await Report.ForObjects(allYieldCurves)",
"\n .WithQuerySource(Workspace)",
"\n .GroupRowsBy(x => x.GroupOfContract)",
"\n .GroupColumnsBy(x => x.YieldCurveType).GroupColumnsBy(x => x.Period)",
"\n .ToTable()",
"\n .ExecuteAsync()"
],
"metadata": {},
"execution_count": 0,
"outputs": []
},
{
"cell_type": "code",
"source": [
"await Report.ForObjects(singleDataNodeParameters)",
"\n .WithQuerySource(Workspace)",
"\n .GroupRowsBy(x => x.GroupOfContract)",
"\n .GroupColumnsBy(x => x.Period)",
"\n .ToTable()",
"\n .ExecuteAsync()"
],
"metadata": {},
"execution_count": 0,
"outputs": []
},
{
"cell_type": "code",
"source": [
"await Report.ForObjects(interDataNodeParameters)",
"\n .WithQuerySource(Workspace)",
"\n .GroupRowsBy(x => x.GroupOfContract).GroupRowsBy(x => x.LinkedDataNode)",
"\n .GroupColumnsBy(x => x.Period)",
"\n .ToTable()",
"\n .ExecuteAsync()"
],
"metadata": {},
"execution_count": 0,
"outputs": []
},
{
"cell_type": "code",
"source": [
"await Report.ForObjects(partnerRatings)",
"\n .WithQuerySource(Workspace)",
"\n .GroupRowsBy(x => x.Partner)",
"\n .GroupColumnsBy(x => x.Period)",
"\n .ToTable()",
"\n .ExecuteAsync()"
],
"metadata": {},
"execution_count": 0,
"outputs": []
},
{
"cell_type": "code",
"source": [
"await Report.ForObjects(partnerDefaultRates)",
Comment thread
dcolleoni marked this conversation as resolved.
"\n .WithQuerySource(Workspace)",
"\n .GroupRowsBy(x => x.CreditRiskRating)",
"\n .GroupColumnsBy(x => x.Period)",
"\n .ToTable()",
"\n .ExecuteAsync()"
],
Comment thread
dcolleoni marked this conversation as resolved.
"metadata": {},
"execution_count": 0,
"outputs": []
}
]
}
3 changes: 2 additions & 1 deletion ifrs17/CalculationEngine.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
"\n#!import \"Import/Importers\"",
"\n#!import \"Export/ExportConfiguration\"",
"\n#!import \"Utils/TestHelper\"",
"\n#!import \"Utils/ActivityLog\""
"\n#!import \"Utils/ActivityLog\"",
"\n#!import \"Report/ParameterReportsQueries\""
],
"metadata": {},
"execution_count": 0,
Expand Down
Loading