{ "cells": [ { "cell_type": "markdown", "id": "83f06545", "metadata": {}, "source": [ "### Trigger example" ] }, { "cell_type": "code", "execution_count": 4, "id": "57ec2f90", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
Connecting engine server -> https://absbox.org/api/dev\n",
       "
\n" ], "text/plain": [ "Connecting engine server -> \u001b[4;94mhttps://absbox.org/api/dev\u001b[0m\n" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stderr", "output_type": "stream", "text": [ "/home/xiaoyu/repo/AbsBox/lib/python3.13/site-packages/urllib3/connectionpool.py:1097: InsecureRequestWarning: Unverified HTTPS request is being made to host 'absbox.org'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#tls-warnings\n", " warnings.warn(\n" ] }, { "data": { "text/html": [ "
✅Connected, local lib:0.46.5, server:0.50.1\n",
       "
\n" ], "text/plain": [ "✅Connected, local li\u001b[1;92mb:0\u001b[0m.\u001b[1;36m46.5\u001b[0m, server:\u001b[1;36m0.50\u001b[0m.\u001b[1;36m1\u001b[0m\n" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "from absbox import API,EnginePath\n", "\n", "import pandas as pd\n", "pd.set_option('display.max_rows', None)\n", "\n", "localAPI = API(EnginePath.DEV, lang='english', check=False)\n", "\n", "from absbox.examples import trigger01,trigger02" ] }, { "cell_type": "markdown", "id": "a8aff7dd", "metadata": {}, "source": [ "#### Trigger 01 (by default rate)\n", "\n", "the test case `trigger01` which is in `PreClosing` stage ,has a trigger with constant default rate. When the cumulative default rate breached, the deal status will convert into `Accelerated`\n", "\n", " defautlRateTrigger = {\"defaultRateTrigger\": \n", " {\"condition\":[(\"cumPoolDefaultedRate\",),\">\", 0.05]\n", " ,\"effects\":(\"newStatus\",\"Accelerated\")\n", " ,\"status\":False\n", " ,\"curable\":False}}" ] }, { "cell_type": "code", "execution_count": 5, "id": "121ffe57", "metadata": { "scrolled": true }, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "/home/xiaoyu/repo/AbsBox/lib/python3.13/site-packages/urllib3/connectionpool.py:1097: InsecureRequestWarning: Unverified HTTPS request is being made to host 'absbox.org'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#tls-warnings\n", " warnings.warn(\n" ] }, { "data": { "text/html": [ "
Warning Message from server:Bond B is not paid off\n",
       "Account acc01 has cash to be distributed\n",
       " No waterfall distribution found on date 2021-12-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2022-01-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2022-02-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2022-03-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2022-04-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2022-05-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2022-06-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2022-07-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2022-08-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2022-09-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2022-10-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2022-11-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2022-12-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2023-01-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2023-02-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2023-03-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2023-04-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2023-05-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2023-06-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2023-07-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2023-08-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2023-09-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2023-10-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2023-11-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2023-12-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2024-01-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2024-02-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2024-03-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2024-04-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2024-05-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2024-06-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2024-07-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2024-08-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2024-09-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2024-10-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2024-11-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2024-12-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2025-01-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2025-02-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2025-03-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2025-04-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2025-05-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2025-06-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2025-07-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2025-08-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2025-09-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2025-10-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2025-11-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2025-12-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2026-01-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2026-02-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2026-03-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2026-04-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2026-05-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2026-06-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2026-07-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2026-08-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2026-09-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2026-10-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2026-11-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2026-12-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2027-01-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2027-02-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2027-03-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2027-04-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2027-05-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2027-06-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2027-07-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2027-08-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2027-09-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2027-10-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2027-11-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2027-12-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2028-01-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2028-02-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2028-03-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2028-04-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2028-05-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2028-06-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2028-07-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2028-08-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2028-09-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2028-10-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2028-11-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2028-12-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2029-01-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2029-02-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2029-03-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2029-04-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2029-05-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2029-06-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2029-07-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2029-08-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2029-09-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2029-10-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2029-11-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2029-12-20 with waterfall key DefaultDistribution\n",
       "
\n" ], "text/plain": [ "Warning Message from server:Bond B is not paid off\n", "Account acc01 has cash to be distributed\n", " No waterfall distribution found on date \u001b[1;36m2021\u001b[0m-\u001b[1;36m12\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2022\u001b[0m-\u001b[1;36m01\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2022\u001b[0m-\u001b[1;36m02\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2022\u001b[0m-\u001b[1;36m03\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2022\u001b[0m-\u001b[1;36m04\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2022\u001b[0m-\u001b[1;36m05\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2022\u001b[0m-\u001b[1;36m06\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2022\u001b[0m-\u001b[1;36m07\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2022\u001b[0m-\u001b[1;36m08\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2022\u001b[0m-\u001b[1;36m09\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2022\u001b[0m-\u001b[1;36m10\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2022\u001b[0m-\u001b[1;36m11\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2022\u001b[0m-\u001b[1;36m12\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2023\u001b[0m-\u001b[1;36m01\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2023\u001b[0m-\u001b[1;36m02\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2023\u001b[0m-\u001b[1;36m03\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2023\u001b[0m-\u001b[1;36m04\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2023\u001b[0m-\u001b[1;36m05\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2023\u001b[0m-\u001b[1;36m06\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2023\u001b[0m-\u001b[1;36m07\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2023\u001b[0m-\u001b[1;36m08\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2023\u001b[0m-\u001b[1;36m09\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2023\u001b[0m-\u001b[1;36m10\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2023\u001b[0m-\u001b[1;36m11\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2023\u001b[0m-\u001b[1;36m12\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2024\u001b[0m-\u001b[1;36m01\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2024\u001b[0m-\u001b[1;36m02\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2024\u001b[0m-\u001b[1;36m03\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2024\u001b[0m-\u001b[1;36m04\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2024\u001b[0m-\u001b[1;36m05\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2024\u001b[0m-\u001b[1;36m06\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2024\u001b[0m-\u001b[1;36m07\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2024\u001b[0m-\u001b[1;36m08\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2024\u001b[0m-\u001b[1;36m09\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2024\u001b[0m-\u001b[1;36m10\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2024\u001b[0m-\u001b[1;36m11\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2024\u001b[0m-\u001b[1;36m12\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2025\u001b[0m-\u001b[1;36m01\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2025\u001b[0m-\u001b[1;36m02\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2025\u001b[0m-\u001b[1;36m03\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2025\u001b[0m-\u001b[1;36m04\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2025\u001b[0m-\u001b[1;36m05\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2025\u001b[0m-\u001b[1;36m06\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2025\u001b[0m-\u001b[1;36m07\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2025\u001b[0m-\u001b[1;36m08\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2025\u001b[0m-\u001b[1;36m09\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2025\u001b[0m-\u001b[1;36m10\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2025\u001b[0m-\u001b[1;36m11\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2025\u001b[0m-\u001b[1;36m12\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2026\u001b[0m-\u001b[1;36m01\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2026\u001b[0m-\u001b[1;36m02\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2026\u001b[0m-\u001b[1;36m03\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2026\u001b[0m-\u001b[1;36m04\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2026\u001b[0m-\u001b[1;36m05\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2026\u001b[0m-\u001b[1;36m06\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2026\u001b[0m-\u001b[1;36m07\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2026\u001b[0m-\u001b[1;36m08\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2026\u001b[0m-\u001b[1;36m09\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2026\u001b[0m-\u001b[1;36m10\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2026\u001b[0m-\u001b[1;36m11\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2026\u001b[0m-\u001b[1;36m12\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2027\u001b[0m-\u001b[1;36m01\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2027\u001b[0m-\u001b[1;36m02\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2027\u001b[0m-\u001b[1;36m03\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2027\u001b[0m-\u001b[1;36m04\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2027\u001b[0m-\u001b[1;36m05\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2027\u001b[0m-\u001b[1;36m06\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2027\u001b[0m-\u001b[1;36m07\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2027\u001b[0m-\u001b[1;36m08\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2027\u001b[0m-\u001b[1;36m09\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2027\u001b[0m-\u001b[1;36m10\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2027\u001b[0m-\u001b[1;36m11\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2027\u001b[0m-\u001b[1;36m12\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2028\u001b[0m-\u001b[1;36m01\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2028\u001b[0m-\u001b[1;36m02\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2028\u001b[0m-\u001b[1;36m03\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2028\u001b[0m-\u001b[1;36m04\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2028\u001b[0m-\u001b[1;36m05\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2028\u001b[0m-\u001b[1;36m06\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2028\u001b[0m-\u001b[1;36m07\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2028\u001b[0m-\u001b[1;36m08\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2028\u001b[0m-\u001b[1;36m09\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2028\u001b[0m-\u001b[1;36m10\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2028\u001b[0m-\u001b[1;36m11\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2028\u001b[0m-\u001b[1;36m12\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2029\u001b[0m-\u001b[1;36m01\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2029\u001b[0m-\u001b[1;36m02\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2029\u001b[0m-\u001b[1;36m03\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2029\u001b[0m-\u001b[1;36m04\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2029\u001b[0m-\u001b[1;36m05\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2029\u001b[0m-\u001b[1;36m06\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2029\u001b[0m-\u001b[1;36m07\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2029\u001b[0m-\u001b[1;36m08\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2029\u001b[0m-\u001b[1;36m09\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2029\u001b[0m-\u001b[1;36m10\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2029\u001b[0m-\u001b[1;36m11\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2029\u001b[0m-\u001b[1;36m12\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "r = localAPI.run(trigger01\n", " ,poolAssump = (\"Pool\",(\"Mortgage\",{\"CDR\":0.08},None,None,None)\n", " ,None\n", " ,None)\n", " ,runAssump = [(\"inspect\",(\"MonthEnd\",(\"trigger\", \"AfterCollect\" ,\"defaultRateTrigger\"))\n", " ,(\"MonthEnd\",(\"cumPoolDefaultedBalance\",)))\n", " ]\n", " ,read=True)" ] }, { "cell_type": "markdown", "id": "545e6e56", "metadata": {}, "source": [ "> Why so many warnings ? \n", "\n", " Because the testing case hasn't specify the waterfall for `Accelerated` status." ] }, { "cell_type": "code", "execution_count": 6, "id": "1ab81aca", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "Date\n", "2021-10-01 0.044818\n", "2021-11-01 0.048927\n", "2021-12-01 0.052559\n", "2022-01-01 0.055959\n", "Name: CumDefault, dtype: float64" ] }, "execution_count": 6, "metadata": {}, "output_type": "execute_result" } ], "source": [ "cmulativeDefaultRates = r['pool']['flow']['PoolConsol']['CumDefault'] / 2200\n", "cmulativeDefaultRates.iloc[6:10,]" ] }, { "cell_type": "code", "execution_count": 10, "id": "e4db395c", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
<TriggersStatus:<EndCollectionWF>,<defaultRateTrigger>>
Date
2021-10-31False
2021-11-30False
2021-12-31True
2022-01-31True
\n", "
" ], "text/plain": [ " ,>\n", "Date \n", "2021-10-31 False \n", "2021-11-30 False \n", "2021-12-31 True \n", "2022-01-31 True " ] }, "execution_count": 10, "metadata": {}, "output_type": "execute_result" } ], "source": [ "triggerStatus = r['result']['inspect'][',>']\n", "triggerStatus.iloc[8:12,]" ] }, { "cell_type": "code", "execution_count": 13, "id": "6b3f507a", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
<CumulativePoolDefaultedBalance>
Date
2021-10-3198.6
2021-11-30107.64
2021-12-31115.63
2022-01-31123.11
\n", "
" ], "text/plain": [ " \n", "Date \n", "2021-10-31 98.6\n", "2021-11-30 107.64\n", "2021-12-31 115.63\n", "2022-01-31 123.11" ] }, "execution_count": 13, "metadata": {}, "output_type": "execute_result" } ], "source": [ "r['result']['inspect'][''].iloc[8:12,]" ] }, { "cell_type": "code", "execution_count": 14, "id": "b584a21c", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
<TriggersStatus:<EndCollectionWF>,<defaultRateTrigger>>CumDefault
Date
2021-10-31FalseNaN
2021-11-01NaN0.048927
2021-11-30FalseNaN
2021-12-01NaN0.052559
2021-12-31TrueNaN
2022-01-01NaN0.055959
2022-01-31TrueNaN
\n", "
" ], "text/plain": [ " ,> CumDefault\n", "Date \n", "2021-10-31 False NaN\n", "2021-11-01 NaN 0.048927\n", "2021-11-30 False NaN\n", "2021-12-01 NaN 0.052559\n", "2021-12-31 True NaN\n", "2022-01-01 NaN 0.055959\n", "2022-01-31 True NaN" ] }, "execution_count": 14, "metadata": {}, "output_type": "execute_result" } ], "source": [ "pd.concat([triggerStatus, cmulativeDefaultRates], axis=1).sort_index().iloc[15:22,]" ] }, { "cell_type": "code", "execution_count": 15, "id": "f6ed3689", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
DateFromToComment
02021-04-01PreClosingAmortizingBy Deal Close
12021-12-01AmortizingAcceleratedBy trigger
22030-01-01DealEndStop: Stated Maturity
\n", "
" ], "text/plain": [ " Date From To Comment\n", "0 2021-04-01 PreClosing Amortizing By Deal Close\n", "1 2021-12-01 Amortizing Accelerated By trigger\n", "2 2030-01-01 DealEnd Stop: Stated Maturity" ] }, "execution_count": 15, "metadata": {}, "output_type": "execute_result" } ], "source": [ "r['result']['status']" ] }, { "cell_type": "markdown", "id": "6a72081e", "metadata": {}, "source": [ "Now the trigger was fired at `2021-12-01` and deal status convert into `Accelerated`. After this date, deal will pick up waterfall which has a key `(\"amortizing\", \"accelerated\")`" ] }, { "cell_type": "markdown", "id": "adc623f9", "metadata": {}, "source": [ "#### Trigger 02 ( by default balance)\n", "\n", "the test case `trigger02` which is in `Amortizing` stage with `current defaulted balance` = 100 ,has a same trigger as the one shown in `trigger01`." ] }, { "cell_type": "markdown", "id": "ed707e72", "metadata": {}, "source": [ "> Note\n", "\n", " `trigger02` is ongoing deal which is likely accumulates some defaults. Here , you may notice `issuanceStat` has a defaulted balance of 100." ] }, { "cell_type": "code", "execution_count": 16, "id": "c80bf7e4", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "{'assets': [['Mortgage',\n", " {'originBalance': 2200,\n", " 'originRate': ['fix', 0.045],\n", " 'originTerm': 20,\n", " 'freq': 'Monthly',\n", " 'type': 'Level',\n", " 'originDate': '2021-02-01'},\n", " {'currentBalance': 2200,\n", " 'currentRate': 0.08,\n", " 'remainTerm': 20,\n", " 'status': 'current'}]],\n", " 'issuanceStat': {'HistoryDefaults': 50, 'IssuanceBalance': 1500}}" ] }, "execution_count": 16, "metadata": {}, "output_type": "execute_result" } ], "source": [ "trigger02.pool" ] }, { "cell_type": "code", "execution_count": 17, "id": "351926b2", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "{'collect': ['2021-10-01', '2021-11-01'],\n", " 'pay': ['2021-09-20', '2021-10-20'],\n", " 'payFreq': ['DayOfMonth', 20],\n", " 'poolFreq': 'MonthFirst',\n", " 'stated': '2030-01-01'}" ] }, "execution_count": 17, "metadata": {}, "output_type": "execute_result" } ], "source": [ "trigger02.dates" ] }, { "cell_type": "code", "execution_count": 18, "id": "849d3882", "metadata": { "scrolled": true }, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "/home/xiaoyu/repo/AbsBox/lib/python3.13/site-packages/urllib3/connectionpool.py:1097: InsecureRequestWarning: Unverified HTTPS request is being made to host 'absbox.org'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#tls-warnings\n", " warnings.warn(\n" ] }, { "data": { "text/html": [ "
Warning Message from server:Bond B is not paid off\n",
       "Account acc01 has cash to be distributed\n",
       " No waterfall distribution found on date 2022-09-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2022-10-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2022-11-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2022-12-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2023-01-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2023-02-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2023-03-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2023-04-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2023-05-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2023-06-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2023-07-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2023-08-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2023-09-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2023-10-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2023-11-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2023-12-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2024-01-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2024-02-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2024-03-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2024-04-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2024-05-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2024-06-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2024-07-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2024-08-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2024-09-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2024-10-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2024-11-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2024-12-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2025-01-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2025-02-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2025-03-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2025-04-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2025-05-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2025-06-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2025-07-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2025-08-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2025-09-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2025-10-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2025-11-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2025-12-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2026-01-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2026-02-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2026-03-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2026-04-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2026-05-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2026-06-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2026-07-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2026-08-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2026-09-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2026-10-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2026-11-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2026-12-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2027-01-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2027-02-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2027-03-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2027-04-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2027-05-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2027-06-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2027-07-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2027-08-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2027-09-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2027-10-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2027-11-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2027-12-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2028-01-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2028-02-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2028-03-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2028-04-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2028-05-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2028-06-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2028-07-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2028-08-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2028-09-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2028-10-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2028-11-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2028-12-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2029-01-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2029-02-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2029-03-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2029-04-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2029-05-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2029-06-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2029-07-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2029-08-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2029-09-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2029-10-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2029-11-20 with waterfall key DefaultDistribution\n",
       " No waterfall distribution found on date 2029-12-20 with waterfall key DefaultDistribution\n",
       "
\n" ], "text/plain": [ "Warning Message from server:Bond B is not paid off\n", "Account acc01 has cash to be distributed\n", " No waterfall distribution found on date \u001b[1;36m2022\u001b[0m-\u001b[1;36m09\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2022\u001b[0m-\u001b[1;36m10\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2022\u001b[0m-\u001b[1;36m11\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2022\u001b[0m-\u001b[1;36m12\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2023\u001b[0m-\u001b[1;36m01\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2023\u001b[0m-\u001b[1;36m02\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2023\u001b[0m-\u001b[1;36m03\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2023\u001b[0m-\u001b[1;36m04\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2023\u001b[0m-\u001b[1;36m05\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2023\u001b[0m-\u001b[1;36m06\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2023\u001b[0m-\u001b[1;36m07\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2023\u001b[0m-\u001b[1;36m08\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2023\u001b[0m-\u001b[1;36m09\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2023\u001b[0m-\u001b[1;36m10\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2023\u001b[0m-\u001b[1;36m11\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2023\u001b[0m-\u001b[1;36m12\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2024\u001b[0m-\u001b[1;36m01\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2024\u001b[0m-\u001b[1;36m02\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2024\u001b[0m-\u001b[1;36m03\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2024\u001b[0m-\u001b[1;36m04\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2024\u001b[0m-\u001b[1;36m05\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2024\u001b[0m-\u001b[1;36m06\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2024\u001b[0m-\u001b[1;36m07\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2024\u001b[0m-\u001b[1;36m08\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2024\u001b[0m-\u001b[1;36m09\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2024\u001b[0m-\u001b[1;36m10\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2024\u001b[0m-\u001b[1;36m11\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2024\u001b[0m-\u001b[1;36m12\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2025\u001b[0m-\u001b[1;36m01\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2025\u001b[0m-\u001b[1;36m02\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2025\u001b[0m-\u001b[1;36m03\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2025\u001b[0m-\u001b[1;36m04\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2025\u001b[0m-\u001b[1;36m05\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2025\u001b[0m-\u001b[1;36m06\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2025\u001b[0m-\u001b[1;36m07\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2025\u001b[0m-\u001b[1;36m08\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2025\u001b[0m-\u001b[1;36m09\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2025\u001b[0m-\u001b[1;36m10\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2025\u001b[0m-\u001b[1;36m11\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2025\u001b[0m-\u001b[1;36m12\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2026\u001b[0m-\u001b[1;36m01\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2026\u001b[0m-\u001b[1;36m02\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2026\u001b[0m-\u001b[1;36m03\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2026\u001b[0m-\u001b[1;36m04\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2026\u001b[0m-\u001b[1;36m05\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2026\u001b[0m-\u001b[1;36m06\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2026\u001b[0m-\u001b[1;36m07\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2026\u001b[0m-\u001b[1;36m08\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2026\u001b[0m-\u001b[1;36m09\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2026\u001b[0m-\u001b[1;36m10\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2026\u001b[0m-\u001b[1;36m11\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2026\u001b[0m-\u001b[1;36m12\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2027\u001b[0m-\u001b[1;36m01\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2027\u001b[0m-\u001b[1;36m02\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2027\u001b[0m-\u001b[1;36m03\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2027\u001b[0m-\u001b[1;36m04\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2027\u001b[0m-\u001b[1;36m05\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2027\u001b[0m-\u001b[1;36m06\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2027\u001b[0m-\u001b[1;36m07\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2027\u001b[0m-\u001b[1;36m08\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2027\u001b[0m-\u001b[1;36m09\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2027\u001b[0m-\u001b[1;36m10\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2027\u001b[0m-\u001b[1;36m11\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2027\u001b[0m-\u001b[1;36m12\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2028\u001b[0m-\u001b[1;36m01\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2028\u001b[0m-\u001b[1;36m02\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2028\u001b[0m-\u001b[1;36m03\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2028\u001b[0m-\u001b[1;36m04\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2028\u001b[0m-\u001b[1;36m05\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2028\u001b[0m-\u001b[1;36m06\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2028\u001b[0m-\u001b[1;36m07\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2028\u001b[0m-\u001b[1;36m08\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2028\u001b[0m-\u001b[1;36m09\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2028\u001b[0m-\u001b[1;36m10\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2028\u001b[0m-\u001b[1;36m11\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2028\u001b[0m-\u001b[1;36m12\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2029\u001b[0m-\u001b[1;36m01\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2029\u001b[0m-\u001b[1;36m02\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2029\u001b[0m-\u001b[1;36m03\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2029\u001b[0m-\u001b[1;36m04\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2029\u001b[0m-\u001b[1;36m05\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2029\u001b[0m-\u001b[1;36m06\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2029\u001b[0m-\u001b[1;36m07\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2029\u001b[0m-\u001b[1;36m08\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2029\u001b[0m-\u001b[1;36m09\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2029\u001b[0m-\u001b[1;36m10\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2029\u001b[0m-\u001b[1;36m11\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n", " No waterfall distribution found on date \u001b[1;36m2029\u001b[0m-\u001b[1;36m12\u001b[0m-\u001b[1;36m20\u001b[0m with waterfall key DefaultDistribution\n" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "r = localAPI.run(trigger02\n", " ,poolAssump = (\"Pool\",(\"Mortgage\",{\"CDR\":0.03},None,None,None)\n", " ,None\n", " ,None)\n", " ,runAssump = [(\"inspect\",(\"MonthEnd\",(\"trigger\", \"AfterCollect\" ,\"defaultRateTrigger\"))\n", " ,(\"MonthEnd\",(\"cumPoolDefaultedBalance\",)))\n", " ]\n", " ,read=True)" ] }, { "cell_type": "code", "execution_count": 20, "id": "e7f1857e", "metadata": {}, "outputs": [], "source": [ "triggerStatus = r['result']['inspect'][',>']\n", "cumulativeDefaultAmt = r['result']['inspect']['']\n", "#cumulativeDefaultAmt / 1500" ] }, { "cell_type": "code", "execution_count": 21, "id": "de71a0f5", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
<TriggersStatus:<EndCollectionWF>,<defaultRateTrigger>><CumulativePoolDefaultedBalance>
Date
2022-07-31False0.049173
2022-08-31False0.049747
2022-09-30True0.050127
2022-10-31True0.050307
2022-11-30True0.050307
\n", "
" ], "text/plain": [ " ,> \\\n", "Date \n", "2022-07-31 False \n", "2022-08-31 False \n", "2022-09-30 True \n", "2022-10-31 True \n", "2022-11-30 True \n", "\n", " \n", "Date \n", "2022-07-31 0.049173 \n", "2022-08-31 0.049747 \n", "2022-09-30 0.050127 \n", "2022-10-31 0.050307 \n", "2022-11-30 0.050307 " ] }, "execution_count": 21, "metadata": {}, "output_type": "execute_result" } ], "source": [ "pd.concat([triggerStatus, cumulativeDefaultAmt / 1500], axis=1).sort_index().iloc[10:15,]" ] }, { "cell_type": "code", "execution_count": 22, "id": "2ae32cab", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
DateFromToComment
02022-09-01AmortizingAcceleratedBy trigger
12030-01-01DealEndStop: Stated Maturity
\n", "
" ], "text/plain": [ " Date From To Comment\n", "0 2022-09-01 Amortizing Accelerated By trigger\n", "1 2030-01-01 DealEnd Stop: Stated Maturity" ] }, "execution_count": 22, "metadata": {}, "output_type": "execute_result" } ], "source": [ "r['result']['status']" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.13.3" } }, "nbformat": 4, "nbformat_minor": 5 }