{ "cells": [ { "cell_type": "markdown", "id": "40adac99", "metadata": {}, "source": [ "### Sensitivity on Deal Run Assumption" ] }, { "cell_type": "code", "execution_count": 1, "id": "6b4690f8", "metadata": {}, "outputs": [], "source": [ "from absbox import Generic\n", "from absbox.examples import test01" ] }, { "cell_type": "code", "execution_count": 2, "id": "b2c34f7d", "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", "localAPI = API(EnginePath.DEV, lang='english', check=False)" ] }, { "cell_type": "code", "execution_count": 3, "id": "2e39369d", "metadata": {}, "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 for A:Account acc01 has cash to be distributed\n",
       "Oustanding pool cashflow hasn't been collected yetfromList [(PoolConsol,1)]\n",
       "
\n" ], "text/plain": [ "Warning Message from server for \u001b[1;92mA:Acc\u001b[0mount acc01 has cash to be distributed\n", "Oustanding pool cashflow hasn't been collected yetfromList \u001b[1m[\u001b[0m\u001b[1m(\u001b[0mPoolConsol,\u001b[1;36m1\u001b[0m\u001b[1m)\u001b[0m\u001b[1m]\u001b[0m\n" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
Warning Message from server for B:Bond B is not paid off\n",
       "Account acc01 has cash to be distributed\n",
       "Oustanding pool cashflow hasn't been collected yetfromList [(PoolConsol,4)]\n",
       "
\n" ], "text/plain": [ "Warning Message from server for \u001b[1;92mB:B\u001b[0mond B is not paid off\n", "Account acc01 has cash to be distributed\n", "Oustanding pool cashflow hasn't been collected yetfromList \u001b[1m[\u001b[0m\u001b[1m(\u001b[0mPoolConsol,\u001b[1;36m4\u001b[0m\u001b[1m)\u001b[0m\u001b[1m]\u001b[0m\n" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "runAssumptionMap = {\n", " \"A\":[(\"call\",(\"poolBalance\",200))]\n", " ,\"B\":[(\"call\",(\"poolBalance\",500))]\n", "}\n", "\n", "r = localAPI.runByDealScenarios(test01\n", " ,runAssump=runAssumptionMap\n", " ,read=True)" ] }, { "cell_type": "code", "execution_count": 4, "id": "24f3ff00", "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", " \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", " \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", "
BalancePrincipalInterestPrepaymentDefaultRecoveryLossWACBorrowerNumPrepayPenaltyCumPrincipalCumPrepayCumDelinqCumDefaultCumRecoveryCumLoss
Date
2022-05-01577.70113.254.6000000.08NoneNone1622.3000000
2022-06-01463.69114.013.8500000.08NoneNone1736.3100000
2022-07-01348.92114.773.0900000.08NoneNone1851.0800000
2022-08-01233.38115.542.3200000.08NoneNone1966.6200000
2022-09-01117.08116.301.5500000.08NoneNone2082.9200000
\n", "
" ], "text/plain": [ " Balance Principal Interest Prepayment Default Recovery Loss \\\n", "Date \n", "2022-05-01 577.70 113.25 4.60 0 0 0 0 \n", "2022-06-01 463.69 114.01 3.85 0 0 0 0 \n", "2022-07-01 348.92 114.77 3.09 0 0 0 0 \n", "2022-08-01 233.38 115.54 2.32 0 0 0 0 \n", "2022-09-01 117.08 116.30 1.55 0 0 0 0 \n", "\n", " WAC BorrowerNum PrepayPenalty CumPrincipal CumPrepay \\\n", "Date \n", "2022-05-01 0.08 None None 1622.30 0 \n", "2022-06-01 0.08 None None 1736.31 0 \n", "2022-07-01 0.08 None None 1851.08 0 \n", "2022-08-01 0.08 None None 1966.62 0 \n", "2022-09-01 0.08 None None 2082.92 0 \n", "\n", " CumDelinq CumDefault CumRecovery CumLoss \n", "Date \n", "2022-05-01 0 0 0 0 \n", "2022-06-01 0 0 0 0 \n", "2022-07-01 0 0 0 0 \n", "2022-08-01 0 0 0 0 \n", "2022-09-01 0 0 0 0 " ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "r[\"A\"][\"pool\"]['flow']['PoolConsol'].tail()" ] }, { "cell_type": "code", "execution_count": 5, "id": "296c91f6", "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", " \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", " \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", "
BalancePrincipalInterestPrepaymentDefaultRecoveryLossWACBorrowerNumPrepayPenaltyCumPrincipalCumPrepayCumDelinqCumDefaultCumRecoveryCumLoss
Date
2022-02-01915.22111.016.8400000.08NoneNone1284.7800000
2022-03-01803.46111.766.1000000.08NoneNone1396.5400000
2022-04-01690.95112.515.3500000.08NoneNone1509.0500000
2022-05-01577.70113.254.6000000.08NoneNone1622.3000000
2022-06-01463.69114.013.8500000.08NoneNone1736.3100000
\n", "
" ], "text/plain": [ " Balance Principal Interest Prepayment Default Recovery Loss \\\n", "Date \n", "2022-02-01 915.22 111.01 6.84 0 0 0 0 \n", "2022-03-01 803.46 111.76 6.10 0 0 0 0 \n", "2022-04-01 690.95 112.51 5.35 0 0 0 0 \n", "2022-05-01 577.70 113.25 4.60 0 0 0 0 \n", "2022-06-01 463.69 114.01 3.85 0 0 0 0 \n", "\n", " WAC BorrowerNum PrepayPenalty CumPrincipal CumPrepay \\\n", "Date \n", "2022-02-01 0.08 None None 1284.78 0 \n", "2022-03-01 0.08 None None 1396.54 0 \n", "2022-04-01 0.08 None None 1509.05 0 \n", "2022-05-01 0.08 None None 1622.30 0 \n", "2022-06-01 0.08 None None 1736.31 0 \n", "\n", " CumDelinq CumDefault CumRecovery CumLoss \n", "Date \n", "2022-02-01 0 0 0 0 \n", "2022-03-01 0 0 0 0 \n", "2022-04-01 0 0 0 0 \n", "2022-05-01 0 0 0 0 \n", "2022-06-01 0 0 0 0 " ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "r[\"B\"][\"pool\"]['flow']['PoolConsol'].tail()" ] }, { "cell_type": "code", "execution_count": null, "id": "13eff999", "metadata": {}, "outputs": [], "source": [] } ], "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 }