Skip to content

Commit

Permalink
update result
Browse files Browse the repository at this point in the history
  • Loading branch information
yellowbean committed Sep 21, 2024
1 parent 5bb29e2 commit 1a4db51
Showing 1 changed file with 64 additions and 14 deletions.
78 changes: 64 additions & 14 deletions docs/source/analytics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1248,9 +1248,37 @@ returns:
``Run single asset`` is a good way to test the asset performance assumption and cashflow before running the whole deal. see example: :ref:`Run Single Assets`
Getting cashflow
Getting Results
------------------
A `result` is returned by a `run()` call.
.. graphviz::
:name: sphinx.ext.graphviz
:caption: cashflow result
:alt: cashflow result
:align: center
digraph {
rankdir = LR
c[label="Cashflow Result"]
c -> "Bonds Cashflow" -> "r['bonds']"
c -> "Fees Cashflow" -> "r['fees']"
c -> "Account Cashflow" -> "r['accounts']"
c -> "Pool Cashflow" -> "r['pool']['flow']"
c -> "Trigger flow" -> "r['triggers']"
c -> "Liquidity flow" -> "r['liqProvider']"
c -> "RateCap/RateSwap flow" -> "r['rateSwap']"
"RateCap/RateSwap flow" -> "r['rateCap']"
c -> "Ledger flow" -> "r['ledgers']"
}
Cashflow Results
^^^^^^^^^^^^^^^^^
* the `run()` function will return a dict which with keys of components like `bonds` `fees` `accounts` `pool`
* the first argument to `run()` is an instance of `deal`
Expand Down Expand Up @@ -1278,7 +1306,7 @@ the `runPool()` function will return cashflow for a pool, user need to specify `
Bond Cashflow
^^^^^^^^^^^^^^^^
""""""""""""""""
.. code-block:: python
Expand All @@ -1301,15 +1329,15 @@ User have the option to view multiple cashflow in a single dataframe,with column
Fee Cashflow
^^^^^^^^^^^^^^
""""""""""""""""
.. code-block:: python
r['fees'].keys() # all fee names
r['fees']['trusteeFee']
Account Cashflow
^^^^^^^^^^^^^^^^^
""""""""""""""""
.. code-block:: python
Expand All @@ -1324,15 +1352,42 @@ Account Cashflow
Pool Cashflow
^^^^^^^^^^^^^^^
""""""""""""""""
.. code-block:: python
r['pool']['flow'] # pool cashflow
Non-Cashflow Results
^^^^^^^^^^^^^^^^^^^^^^^^^
``r['result']`` save the run result other than cashflow.
.. graphviz::
:name: sphinx.ext.graphviz
:caption: none cashflow result
:alt: none cashflow result
:align: center
digraph {
rankdir = LR
d[label="Non-Cashflow Result"]
d -> "Deal Status flow" -> "r['result']['status']"
d -> "Bond Summary" -> "r['result']['bonds']"
"Bond Summary" -> "r['pricing']"
d -> "Variable Inspect" -> "r['result']['inspect']"
"Variable Inspect" -> "r['result']['waterfallInspect']"
d -> "Deal Run Logs" -> "r['result']['logs']"
d -> "Waterfall Run" -> "r['result']['waterfall']"
d -> "Financial Reports" -> "r['result']['report']"
}
Bond Pricing
^^^^^^^^^^^^^
""""""""""""""""
if passing `pricing` in the `run`, then response would have a key `pricing`
Expand All @@ -1342,13 +1397,8 @@ if passing `pricing` in the `run`, then response would have a key `pricing`
Getting Results
---------------
``r['result']`` save the run result other than cashflow.
Deal Status Change During Run
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
""""""""""""""""""""""""""""""""
it is not uncommon that `triggers` may changed deal status between `accelerated` `defaulted` `amorting` `revolving`.
user can check the `status` chang log via :
Expand All @@ -1366,7 +1416,7 @@ or user can cross check by review the account logs by (if changing deal status w
Variables During Waterfall
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
""""""""""""""""""""""""""""""""
If there is waterfall action in the waterfall
Expand All @@ -1383,7 +1433,7 @@ then the <Formula> value can be view in the ``result`` ``waterfallInspect``.
Validation Messages
^^^^^^^^^^^^^^^^^^^^^^^^^^^
""""""""""""""""""""""""""""""""
There are two types of validation message
Expand Down

0 comments on commit 1a4db51

Please sign in to comment.