-
Notifications
You must be signed in to change notification settings - Fork 9
Parameters report #163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Parameters report #163
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
bf8aa4c
adding NB with some queries
3e4bcb1
update
aaceeb1
Merge remote-tracking branch 'origin/develop' into ParametersReport
fa41664
update
825113f
update
e5ab051
Split in 2 files
6f2c49f
Merge branch 'develop' into ParametersReport
tkukuljan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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)", | ||
| "\n .WithQuerySource(Workspace)", | ||
| "\n .GroupRowsBy(x => x.CreditRiskRating)", | ||
| "\n .GroupColumnsBy(x => x.Period)", | ||
| "\n .ToTable()", | ||
| "\n .ExecuteAsync()" | ||
| ], | ||
|
dcolleoni marked this conversation as resolved.
|
||
| "metadata": {}, | ||
| "execution_count": 0, | ||
| "outputs": [] | ||
| } | ||
| ] | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.