From 41c443818b54873ba56e512352691c8bf35c98b1 Mon Sep 17 00:00:00 2001 From: Yeo Hui Fang <35210495+HuifangYeo@users.noreply.github.com> Date: Wed, 30 Nov 2022 22:41:50 +0800 Subject: [PATCH] Upgrade to v0.7.2 (#385) * fixed docker topic creation command for real-time risk * upgrade notebook to v0.7.2 * Update price elasticity to remove deprecated methods * Update IFRS9 for https://github.com/activeviam/atoti/issues/3819 * Upgrade security function according to v0.7.2 --- .../real-time-risk/content/content.mv.db | Bin 155648 -> 221184 bytes .../front-office/real-time-risk/main.ipynb | 171 +-- .../insurance/price-elasticity/main.ipynb | 330 ++--- .../credit-risk/ifrs9/main.ipynb | 356 +++--- .../01-Basic-authentication.ipynb | 297 ++--- .../02-OIDC-Auth0.ipynb | 244 ++-- .../03-OIDC-Google.ipynb | 244 ++-- .../security-implementation/04-LDAP.ipynb | 245 ++-- .../security-implementation/main.ipynb | 308 ++--- poetry.lock | 1064 +++++++++-------- pyproject.toml | 2 +- 11 files changed, 1689 insertions(+), 1572 deletions(-) diff --git a/notebooks/01-use-cases/finance/front-office/real-time-risk/content/content.mv.db b/notebooks/01-use-cases/finance/front-office/real-time-risk/content/content.mv.db index 9e48305bb253fd8691fc449cbf2f7f0b1eae770e..57bda2255a2cd067eb38d442c117e0eedf534991 100644 GIT binary patch delta 21586 zcmeIad$1%~eI9tLrf0f)W)KVrm>FpvGfsl9Ge%|##~@el%G8DWfDvAeMzhhjrs>xsQ9uT4lRw01}*T3(zVG{ezjMyB&s}}?xfi`!yn$Y~1$F#~Z~N!RLidezi$4C6^*AU# z+pycU2go{39UWcz`juDLPaaolPn~@2U)QeQPhB}{=%+3EGV6GJ^1?R z!SL)0z>ipynIb#HYn`mAGNhmOUZbu5el4|UeD5aL$PB5(C9`>bbKIOAUE zS+wO47kZX^_K2wGkl+J_*MXjO^f>svT&o=&y%xN{r$EV~A^(&_z^m@=h?=;Rn=+Zy^ z!>3+-TqE9i{JSZA`DKF|eb1FwpS%zzVDvTy}SOkOQ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sDV@c3jxt$j0lHk*Q772czaseehc8o8v2FqtUIxdIU zIF%|Y7tAF#W57#sV@edomOqRi}J6sJ*=mCjPwyIecRyQSiRCk zt_(sF*Us28(A!+drso_5`E%+YbF*d;H@!Fse`l$u*mlEKkZeH<})XP1^(9zuY9xaw-|eJjcl2Hb6fdBs<%orj(cEQNEoVX@|S7^GM zhwZP;*Ncq5HWN_{ieqQmx<`#QE7aInNmP^!e?5v^Z9{YCa&x9B!YQ@3AkX#P2FIej zU-;B`g1nBIP8JId^b|jM%g3Y{P#}}6vo_iszMJ^UG)NzyH{qV72RxD=?lnzEY>lTEbe9PxI z$fBsFRO;g}b(rtc|v)Hcj5h`mO+ps@ux|MXT> zrD>R5J3J?-VWz%k-lrUL$wJ@LPEX|+ni$U^&v!9%{pqd0h3~ovwYPT=?i8$X1_XEE X)U09+k;m?bOHWm_LAs)idAImKv1iKE diff --git a/notebooks/01-use-cases/finance/front-office/real-time-risk/main.ipynb b/notebooks/01-use-cases/finance/front-office/real-time-risk/main.ipynb index 9be3509a..2d579072 100644 --- a/notebooks/01-use-cases/finance/front-office/real-time-risk/main.ipynb +++ b/notebooks/01-use-cases/finance/front-office/real-time-risk/main.ipynb @@ -138,8 +138,8 @@ "application/vnd.atoti.link.v0+json": { "path": "", "sessionLocation": { - "https": null, - "port": 56321 + "https": false, + "port": 56136 } }, "text/plain": [ @@ -384,15 +384,15 @@ "data": { "application/vnd.atoti.widget.v0+json": { "name": "Initial risk data", - "sessionId": "1664105993_7X77PT", + "sessionId": "1669704981_M8UKJB", "sessionLocation": { - "https": null, - "port": 56321 + "https": false, + "port": 56136 }, "widgetCreationCode": "session.visualize()" }, "text/html": [ - "" + "" ], "text/plain": [ "Open the notebook in JupyterLab with the atoti extension enabled to build this widget." @@ -490,6 +490,14 @@ "execution_count": 16, "metadata": {}, "output_type": "execute_result" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "New file received risk_data_previous_cob.csv\n", + "File loaded ./dynamic-input-files\\risk_data_previous_cob.csv\n" + ] } ], "source": [ @@ -539,15 +547,15 @@ "data": { "application/vnd.atoti.widget.v0+json": { "name": "Risk data after uploading 8th of July", - "sessionId": "1664105993_7X77PT", + "sessionId": "1669704981_M8UKJB", "sessionLocation": { - "https": null, - "port": 56321 + "https": false, + "port": 56136 }, "widgetCreationCode": "session.visualize()" }, "text/html": [ - "" + "" ], "text/plain": [ "Open the notebook in JupyterLab with the atoti extension enabled to build this widget." @@ -681,7 +689,16 @@ "cell_type": "code", "execution_count": 19, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "File modified risk_data_previous_cob.csv\n", + "Modified file loaded ./dynamic-input-files\\risk_data_previous_cob.csv\n" + ] + } + ], "source": [ "previous_cob_df.to_csv(\n", " \"./dynamic-input-files/risk_data_previous_cob.csv\",\n", @@ -731,15 +748,15 @@ "data": { "application/vnd.atoti.widget.v0+json": { "name": "Risk data after data file modification", - "sessionId": "1664105993_7X77PT", + "sessionId": "1669704981_M8UKJB", "sessionLocation": { - "https": null, - "port": 56321 + "https": false, + "port": 56136 }, "widgetCreationCode": "session.visualize()" }, "text/html": [ - "" + "" ], "text/plain": [ "Open the notebook in JupyterLab with the atoti extension enabled to build this widget." @@ -783,16 +800,7 @@ "cell_type": "code", "execution_count": 22, "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "New file received risk_data_previous_cob.csv\n", - "File loaded ./dynamic-input-files\\risk_data_previous_cob.csv\n" - ] - } - ], + "outputs": [], "source": [ "market_data_table = session.read_csv(\n", " \"s3://data.atoti.io/notebooks/real-time-risk/static-input-files/market_data.csv\",\n", @@ -1138,13 +1146,16 @@ "data": { "application/vnd.atoti.widget.v0+json": { "name": "Quotes next to Deltas and MarketValues", - "sessionId": "1664105993_7X77PT", + "sessionId": "1669704981_M8UKJB", "sessionLocation": { - "https": null, - "port": 56321 + "https": false, + "port": 56136 }, "widgetCreationCode": "session.visualize()" }, + "text/html": [ + "" + ], "text/plain": [ "Open the notebook in JupyterLab with the atoti extension enabled to build this widget." ] @@ -1615,15 +1626,15 @@ "data": { "application/vnd.atoti.widget.v0+json": { "name": null, - "sessionId": "1664105993_7X77PT", + "sessionId": "1669704981_M8UKJB", "sessionLocation": { - "https": null, - "port": 56321 + "https": false, + "port": 56136 }, "widgetCreationCode": "session.visualize()" }, "text/html": [ - "" + "" ], "text/plain": [ "Open the notebook in JupyterLab with the atoti extension enabled to build this widget." @@ -1833,7 +1844,7 @@ }, { "cell_type": "code", - "execution_count": 36, + "execution_count": 37, "metadata": {}, "outputs": [], "source": [ @@ -1845,7 +1856,7 @@ }, { "cell_type": "code", - "execution_count": 37, + "execution_count": 38, "metadata": {}, "outputs": [], "source": [ @@ -1861,7 +1872,7 @@ }, { "cell_type": "code", - "execution_count": 38, + "execution_count": 39, "metadata": {}, "outputs": [ { @@ -1869,15 +1880,15 @@ "application/vnd.atoti.link.v0+json": { "path": "#/dashboard/8b4", "sessionLocation": { - "https": null, - "port": 61379 + "https": false, + "port": 56136 } }, "text/plain": [ "Open the notebook in JupyterLab with the atoti extension enabled to see this link." ] }, - "execution_count": 38, + "execution_count": 39, "metadata": {}, "output_type": "execute_result" } @@ -1895,7 +1906,7 @@ }, { "cell_type": "code", - "execution_count": 39, + "execution_count": 45, "metadata": {}, "outputs": [], "source": [ @@ -1973,7 +1984,7 @@ }, { "cell_type": "code", - "execution_count": 40, + "execution_count": 46, "metadata": { "tags": [] }, @@ -1982,7 +1993,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "(datetime.date(2020, 7, 9), 'OXY', 16.37)\n" + "(datetime.date(2020, 7, 9), 'AAPL', 394.22)\n" ] } ], @@ -1995,9 +2006,19 @@ }, { "cell_type": "code", - "execution_count": 41, + "execution_count": 47, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "File modified risk_data.csv\n", + "Modified file loaded ./dynamic-input-files\\risk_data.csv\n", + "awaiting for publishing update 2020-07-09 13:34:00" + ] + } + ], "source": [ "# pause publishing\n", "should_publish.clear()" @@ -2014,7 +2035,7 @@ }, { "cell_type": "code", - "execution_count": 42, + "execution_count": 48, "metadata": {}, "outputs": [], "source": [ @@ -2034,7 +2055,7 @@ "metadata": {}, "source": [ "```\n", - "docker exec -it real-time-risk_kafka_1 /opt/bitnami/kafka/bin/kafka-topics.sh --create --bootstrap-server 127.0.0.1:9092 --topic trades\n", + "docker exec -it real-time-risk-kafka-1 /opt/bitnami/kafka/bin/kafka-topics.sh --create --bootstrap-server 127.0.0.1:9092 --topic trades\n", "```\n", "\n", "The above real-time feeds are illustrating the file **watch** and the **append** command. Now let's have a quick look at enabling a **kafka feed** for a datastore.\n", @@ -2064,9 +2085,9 @@ "And then creating a topic for trades and sensitivites:\n", "\n", "```\n", - "docker exec -it real-time-risk_kafka_1 /opt/bitnami/kafka/bin/kafka-topics.sh --create --bootstrap-server 127.0.0.1:9092 --topic trades --partitions 3 --replication-factor 1\n", + "docker exec -it real-time-risk-kafka-1 /opt/bitnami/kafka/bin/kafka-topics.sh --create --bootstrap-server 127.0.0.1:9092 --topic trades --partitions 3 --replication-factor 1\n", "\n", - "docker exec -it real-time-risk_kafka_1 /opt/bitnami/kafka/bin/kafka-topics.sh --create --bootstrap-server 127.0.0.1:9092 --topic sensitivities --partitions 3 --replication-factor 1\n", + "docker exec -it real-time-risk-kafka-1 /opt/bitnami/kafka/bin/kafka-topics.sh --create --bootstrap-server 127.0.0.1:9092 --topic sensitivities --partitions 3 --replication-factor 1\n", "```" ] }, @@ -2079,7 +2100,7 @@ }, { "cell_type": "code", - "execution_count": 43, + "execution_count": 49, "metadata": {}, "outputs": [], "source": [ @@ -2097,7 +2118,7 @@ }, { "cell_type": "code", - "execution_count": 46, + "execution_count": 50, "metadata": {}, "outputs": [], "source": [ @@ -2112,7 +2133,7 @@ }, { "cell_type": "code", - "execution_count": 47, + "execution_count": 51, "metadata": {}, "outputs": [], "source": [ @@ -2134,7 +2155,7 @@ }, { "cell_type": "code", - "execution_count": 48, + "execution_count": 52, "metadata": {}, "outputs": [], "source": [ @@ -2146,7 +2167,7 @@ }, { "cell_type": "code", - "execution_count": 49, + "execution_count": 53, "metadata": { "tags": [] }, @@ -2170,7 +2191,7 @@ }, { "cell_type": "code", - "execution_count": 50, + "execution_count": 54, "metadata": {}, "outputs": [ { @@ -2178,15 +2199,15 @@ "application/vnd.atoti.link.v0+json": { "path": "#/dashboard/8b4", "sessionLocation": { - "https": null, - "port": 61379 + "https": false, + "port": 56136 } }, "text/plain": [ "Open the notebook in JupyterLab with the atoti extension enabled to see this link." ] }, - "execution_count": 50, + "execution_count": 54, "metadata": {}, "output_type": "execute_result" } @@ -2205,7 +2226,7 @@ }, { "cell_type": "code", - "execution_count": 51, + "execution_count": 55, "metadata": {}, "outputs": [ { @@ -2214,7 +2235,7 @@ "['AsOfDate', 'TradeId', 'RiskFactor', 'MarketValue', 'Delta']" ] }, - "execution_count": 51, + "execution_count": 55, "metadata": {}, "output_type": "execute_result" } @@ -2232,7 +2253,7 @@ }, { "cell_type": "code", - "execution_count": 52, + "execution_count": 56, "metadata": {}, "outputs": [], "source": [ @@ -2257,7 +2278,7 @@ }, { "cell_type": "code", - "execution_count": 53, + "execution_count": 57, "metadata": {}, "outputs": [ { @@ -2273,7 +2294,7 @@ " 'OptionType']" ] }, - "execution_count": 53, + "execution_count": 57, "metadata": {}, "output_type": "execute_result" } @@ -2291,7 +2312,7 @@ }, { "cell_type": "code", - "execution_count": 54, + "execution_count": 58, "metadata": { "tags": [] }, @@ -2334,7 +2355,7 @@ }, { "cell_type": "code", - "execution_count": 55, + "execution_count": 59, "metadata": {}, "outputs": [], "source": [ @@ -2384,7 +2405,7 @@ }, { "cell_type": "code", - "execution_count": 56, + "execution_count": 60, "metadata": {}, "outputs": [ { @@ -2392,15 +2413,15 @@ "application/vnd.atoti.link.v0+json": { "path": "#/dashboard/8b4", "sessionLocation": { - "https": null, - "port": 61379 + "https": false, + "port": 56136 } }, "text/plain": [ "Open the notebook in JupyterLab with the atoti extension enabled to see this link." ] }, - "execution_count": 56, + "execution_count": 60, "metadata": {}, "output_type": "execute_result" } @@ -2418,7 +2439,7 @@ }, { "cell_type": "code", - "execution_count": 57, + "execution_count": 64, "metadata": {}, "outputs": [ { @@ -2428,11 +2449,11 @@ "A new trade generated:\n", "{\n", " \"TradeId\": \"New_Trade_1\",\n", - " \"Ticker\": \"AAPL\",\n", - " \"Book\": \"EQ_LARG_DM\",\n", + " \"Ticker\": \"MSFT\",\n", + " \"Book\": \"EQ_SMAL_EM\",\n", " \"Product\": \"EQ_Option\",\n", - " \"Quantity\": 90,\n", - " \"Strike\": -52.88694789890223,\n", + " \"Quantity\": -63,\n", + " \"Strike\": -26.871216332703753,\n", " \"Maturity\": \"2022-10-01\",\n", " \"OptionType\": \"put\"\n", "}\n", @@ -2440,9 +2461,9 @@ "{\n", " \"AsOfDate\": \"2020-07-09\",\n", " \"TradeId\": \"New_Trade_1\",\n", - " \"RiskFactor\": \"AAPL\",\n", - " \"MarketValue\": 25.592967160657267,\n", - " \"Delta\": -4.726477195847423\n", + " \"RiskFactor\": \"MSFT\",\n", + " \"MarketValue\": 25.447715585254343,\n", + " \"Delta\": 53.37247432097948\n", "}\n", "Published.\n", "\n" diff --git a/notebooks/01-use-cases/finance/insurance/price-elasticity/main.ipynb b/notebooks/01-use-cases/finance/insurance/price-elasticity/main.ipynb index 8f0716fa..13f6ce57 100644 --- a/notebooks/01-use-cases/finance/insurance/price-elasticity/main.ipynb +++ b/notebooks/01-use-cases/finance/insurance/price-elasticity/main.ipynb @@ -671,7 +671,7 @@ "knn = KNeighborsClassifier(n_jobs=-1)\n", "nb = GaussianNB()\n", "svm = SVC()\n", - "xgbc = XGBClassifier(use_label_encoder=False)" + "xgbc = XGBClassifier()" ] }, { @@ -745,9 +745,9 @@ " \n", " 0\n", " (DecisionTreeClassifier(max_features='sqrt', r...\n", - " 0.930810\n", - " 0.867465\n", - " 0.951172\n", + " 0.931087\n", + " 0.869161\n", + " 0.950000\n", " \n", " \n", " 1\n", @@ -783,14 +783,14 @@ ], "text/plain": [ " model_name f1_score roc_auc_score \\\n", - "0 (DecisionTreeClassifier(max_features='sqrt', r... 0.930810 0.867465 \n", + "0 (DecisionTreeClassifier(max_features='sqrt', r... 0.931087 0.869161 \n", "1 KNeighborsClassifier(n_jobs=-1) 0.860897 0.731611 \n", "2 GaussianNB() 0.907729 0.853806 \n", "3 SVC() 0.893333 0.751059 \n", "4 XGBClassifier(base_score=0.5, booster='gbtree'... 0.936097 0.879652 \n", "\n", " recall \n", - "0 0.951172 \n", + "0 0.950000 \n", "1 0.895703 \n", "2 0.899219 \n", "3 0.968359 \n", @@ -838,16 +838,16 @@ "name": "stdout", "output_type": "stream", "text": [ - "['Price', 0.20924321]\n", - "['Driver_Age', 0.06532796]\n", - "['Employed', 0.061190005]\n", - "['Personal Auto', 0.056500446]\n", + "['Price', 0.2092432]\n", + "['Driver_Age', 0.065327965]\n", + "['Employed', 0.06118999]\n", + "['Personal Auto', 0.056500454]\n", "['Suburban', 0.04785541]\n", - "['Special Auto', 0.0455167]\n", - "['Premium', 0.036693245]\n", - "['Unemployed', 0.034293536]\n", - "['Basic', 0.033415023]\n", - "['Master', 0.032274764]\n" + "['Special Auto', 0.045516685]\n", + "['Premium', 0.03669324]\n", + "['Unemployed', 0.03429353]\n", + "['Basic', 0.033415027]\n", + "['Master', 0.032274768]\n" ] } ], @@ -902,10 +902,10 @@ " Method: Least Squares F-statistic: 1299. \n", "\n", "\n", - " Date: Mon, 08 Aug 2022 Prob (F-statistic): 0.00 \n", + " Date: Tue, 29 Nov 2022 Prob (F-statistic): 0.00 \n", "\n", "\n", - " Time: 17:28:44 Log-Likelihood: -7876.8 \n", + " Time: 15:22:22 Log-Likelihood: -7876.8 \n", "\n", "\n", " No. Observations: 33264 AIC: 1.582e+04\n", @@ -1068,8 +1068,8 @@ "Dep. Variable: Sale R-squared: 0.556\n", "Model: OLS Adj. R-squared: 0.555\n", "Method: Least Squares F-statistic: 1299.\n", - "Date: Mon, 08 Aug 2022 Prob (F-statistic): 0.00\n", - "Time: 17:28:44 Log-Likelihood: -7876.8\n", + "Date: Tue, 29 Nov 2022 Prob (F-statistic): 0.00\n", + "Time: 15:22:22 Log-Likelihood: -7876.8\n", "No. Observations: 33264 AIC: 1.582e+04\n", "Df Residuals: 33231 BIC: 1.610e+04\n", "Df Model: 32 \n", @@ -1335,92 +1335,48 @@ " \n", " \n", " \n", - " 3205793800425\n", - " 33.0\n", - " 7000.0\n", - " 660.26\n", + " 9976814432768\n", + " 35.0\n", " 9000.0\n", - " 247.08\n", - " 8.14\n", + " 707.79\n", + " 6000.0\n", + " 371.25\n", + " 6.63\n", " M\n", - " 66.03\n", - " Washington\n", - " 36860.7\n", - " Premium\n", - " College\n", - " Disabled\n", - " Rural\n", - " Call Center\n", - " 95\n", - " Corporate Auto\n", - " 1\n", - " 0.981653\n", - " \n", - " \n", - " 7168050486847\n", - " 23.0\n", - " 8000.0\n", - " 504.30\n", - " 8000.0\n", - " 319.14\n", - " 2.02\n", - " S\n", - " 25.21\n", - " Oregon\n", - " 2354.5\n", + " 70.78\n", + " Arizona\n", + " 7408.2\n", " Extended\n", " College\n", - " Unemployed\n", + " Retired\n", " Suburban\n", - " Call Center\n", - " 51\n", - " Special Auto\n", + " Agent\n", " 1\n", - " 0.855267\n", - " \n", - " \n", - " 1364086703071\n", - " 36.0\n", - " 10000.0\n", - " 613.51\n", - " 6000.0\n", - " 392.17\n", - " 9.75\n", - " M\n", - " 61.35\n", - " Nevada\n", - " 5386.5\n", - " Premium\n", - " High School or Below\n", - " Medical Leave\n", - " Rural\n", - " Branch\n", - " 99\n", - " Personal Auto\n", + " Special Auto\n", " 1\n", - " 0.977322\n", + " 0.999179\n", " \n", " \n", - " 7738460191121\n", - " 34.0\n", - " 9000.0\n", - " 729.53\n", + " 9845810226551\n", + " 51.0\n", + " 5000.0\n", + " 821.07\n", " 7000.0\n", - " 518.55\n", - " 8.63\n", - " M\n", - " 72.95\n", + " 450.49\n", + " 9.34\n", + " S\n", + " 82.11\n", " Oregon\n", - " 2378.7\n", - " Basic\n", - " Doctor\n", - " Medical Leave\n", - " Urban\n", - " Agent\n", - " 74\n", + " 2688.9\n", + " Extended\n", + " Master\n", + " Disabled\n", + " Suburban\n", + " Web\n", + " 75\n", " Personal Auto\n", " 1\n", - " 0.997727\n", + " 0.998984\n", " \n", " \n", " 2310686127723\n", @@ -1444,6 +1400,50 @@ " 0\n", " 0.252746\n", " \n", + " \n", + " 6203013183621\n", + " 25.0\n", + " 7000.0\n", + " 684.66\n", + " 7000.0\n", + " 534.85\n", + " 4.99\n", + " S\n", + " 34.23\n", + " Washington\n", + " 7661.4\n", + " Extended\n", + " Bachelor\n", + " Medical Leave\n", + " Rural\n", + " Web\n", + " 12\n", + " Corporate Auto\n", + " 1\n", + " 0.998522\n", + " \n", + " \n", + " 3861044483665\n", + " 36.0\n", + " 7000.0\n", + " 527.84\n", + " 9000.0\n", + " 338.83\n", + " 13.28\n", + " S\n", + " 26.39\n", + " California\n", + " 2274.8\n", + " Extended\n", + " High School or Below\n", + " Unemployed\n", + " Suburban\n", + " Call Center\n", + " 61\n", + " Special Auto\n", + " 1\n", + " 0.869075\n", + " \n", " \n", "\n", "" @@ -1451,51 +1451,51 @@ "text/plain": [ " Driver_Age Vehicle_Value Price Vehicle_Mileage \\\n", "cust_id \n", - "3205793800425 33.0 7000.0 660.26 9000.0 \n", - "7168050486847 23.0 8000.0 504.30 8000.0 \n", - "1364086703071 36.0 10000.0 613.51 6000.0 \n", - "7738460191121 34.0 9000.0 729.53 7000.0 \n", + "9976814432768 35.0 9000.0 707.79 6000.0 \n", + "9845810226551 51.0 5000.0 821.07 7000.0 \n", "2310686127723 37.0 7000.0 405.18 6000.0 \n", + "6203013183621 25.0 7000.0 684.66 7000.0 \n", + "3861044483665 36.0 7000.0 527.84 9000.0 \n", "\n", " Credit_Score Licence_Length_Years Marital_Status Tax \\\n", "cust_id \n", - "3205793800425 247.08 8.14 M 66.03 \n", - "7168050486847 319.14 2.02 S 25.21 \n", - "1364086703071 392.17 9.75 M 61.35 \n", - "7738460191121 518.55 8.63 M 72.95 \n", + "9976814432768 371.25 6.63 M 70.78 \n", + "9845810226551 450.49 9.34 S 82.11 \n", "2310686127723 397.26 8.20 S 20.26 \n", + "6203013183621 534.85 4.99 S 34.23 \n", + "3861044483665 338.83 13.28 S 26.39 \n", "\n", - " State CLTV Coverage_Type Education \\\n", - "cust_id \n", - "3205793800425 Washington 36860.7 Premium College \n", - "7168050486847 Oregon 2354.5 Extended College \n", - "1364086703071 Nevada 5386.5 Premium High School or Below \n", - "7738460191121 Oregon 2378.7 Basic Doctor \n", - "2310686127723 Nevada 6810.5 Extended Bachelor \n", + " State CLTV Coverage_Type Education \\\n", + "cust_id \n", + "9976814432768 Arizona 7408.2 Extended College \n", + "9845810226551 Oregon 2688.9 Extended Master \n", + "2310686127723 Nevada 6810.5 Extended Bachelor \n", + "6203013183621 Washington 7661.4 Extended Bachelor \n", + "3861044483665 California 2274.8 Extended High School or Below \n", "\n", " Employment_Status Location_Code Sales_Channel \\\n", "cust_id \n", - "3205793800425 Disabled Rural Call Center \n", - "7168050486847 Unemployed Suburban Call Center \n", - "1364086703071 Medical Leave Rural Branch \n", - "7738460191121 Medical Leave Urban Agent \n", + "9976814432768 Retired Suburban Agent \n", + "9845810226551 Disabled Suburban Web \n", "2310686127723 Employed Rural Web \n", + "6203013183621 Medical Leave Rural Web \n", + "3861044483665 Unemployed Suburban Call Center \n", "\n", " Months_Policy_Inception Policy_Type Sales_prediction \\\n", "cust_id \n", - "3205793800425 95 Corporate Auto 1 \n", - "7168050486847 51 Special Auto 1 \n", - "1364086703071 99 Personal Auto 1 \n", - "7738460191121 74 Personal Auto 1 \n", + "9976814432768 1 Special Auto 1 \n", + "9845810226551 75 Personal Auto 1 \n", "2310686127723 65 Special Auto 0 \n", + "6203013183621 12 Corporate Auto 1 \n", + "3861044483665 61 Special Auto 1 \n", "\n", " sales_prediction_probability \n", "cust_id \n", - "3205793800425 0.981653 \n", - "7168050486847 0.855267 \n", - "1364086703071 0.977322 \n", - "7738460191121 0.997727 \n", - "2310686127723 0.252746 " + "9976814432768 0.999179 \n", + "9845810226551 0.998984 \n", + "2310686127723 0.252746 \n", + "6203013183621 0.998522 \n", + "3861044483665 0.869075 " ] }, "execution_count": 22, @@ -1600,15 +1600,15 @@ "data": { "application/vnd.atoti.widget.v0+json": { "name": "Sales propotion by channel and coverage type", - "sessionId": "1659950924_Q5WXBP", + "sessionId": "1669706542_62K7HA", "sessionLocation": { - "https": null, - "port": 63222 + "https": false, + "port": 58178 }, "widgetCreationCode": "session.visualize()" }, "text/html": [ - "" + "" ], "text/plain": [ "Open the notebook in JupyterLab with the atoti extension enabled to build this widget." @@ -1658,15 +1658,15 @@ "data": { "application/vnd.atoti.widget.v0+json": { "name": "Revenue realized by State and location code", - "sessionId": "1659950924_Q5WXBP", + "sessionId": "1669706542_62K7HA", "sessionLocation": { - "https": null, - "port": 63222 + "https": false, + "port": 58178 }, "widgetCreationCode": "session.visualize()" }, "text/html": [ - "" + "" ], "text/plain": [ "Open the notebook in JupyterLab with the atoti extension enabled to build this widget." @@ -1717,15 +1717,15 @@ "data": { "application/vnd.atoti.widget.v0+json": { "name": "Sales by policy types", - "sessionId": "1659950924_Q5WXBP", + "sessionId": "1669706542_62K7HA", "sessionLocation": { - "https": null, - "port": 63222 + "https": false, + "port": 58178 }, "widgetCreationCode": "session.visualize()" }, "text/html": [ - "" + "" ], "text/plain": [ "Open the notebook in JupyterLab with the atoti extension enabled to build this widget." @@ -1780,15 +1780,15 @@ "data": { "application/vnd.atoti.widget.v0+json": { "name": "Revenue and sales by policy and coverage type", - "sessionId": "1659950924_Q5WXBP", + "sessionId": "1669706542_62K7HA", "sessionLocation": { - "https": null, - "port": 63222 + "https": false, + "port": 58178 }, "widgetCreationCode": "session.visualize()" }, "text/html": [ - "" + "" ], "text/plain": [ "Open the notebook in JupyterLab with the atoti extension enabled to build this widget." @@ -1837,15 +1837,15 @@ "data": { "application/vnd.atoti.widget.v0+json": { "name": "Revenue realised gauge", - "sessionId": "1659950924_Q5WXBP", + "sessionId": "1669706542_62K7HA", "sessionLocation": { - "https": null, - "port": 63222 + "https": false, + "port": 58178 }, "widgetCreationCode": "session.visualize()" }, "text/html": [ - "" + "" ], "text/plain": [ "Open the notebook in JupyterLab with the atoti extension enabled to build this widget." @@ -1880,8 +1880,8 @@ "application/vnd.atoti.link.v0+json": { "path": "#/dashboard/39f", "sessionLocation": { - "https": null, - "port": 63222 + "https": false, + "port": 58178 } }, "text/plain": [ @@ -2179,15 +2179,15 @@ "data": { "application/vnd.atoti.widget.v0+json": { "name": "Scenarios: Sales propotion by channel and coverage type", - "sessionId": "1659950924_Q5WXBP", + "sessionId": "1669706542_62K7HA", "sessionLocation": { - "https": null, - "port": 63222 + "https": false, + "port": 58178 }, "widgetCreationCode": "session.visualize()" }, "text/html": [ - "" + "" ], "text/plain": [ "Open the notebook in JupyterLab with the atoti extension enabled to build this widget." @@ -2243,15 +2243,15 @@ "data": { "application/vnd.atoti.widget.v0+json": { "name": "Scenarios: Revenue realised by State and location code", - "sessionId": "1659950924_Q5WXBP", + "sessionId": "1669706542_62K7HA", "sessionLocation": { - "https": null, - "port": 63222 + "https": false, + "port": 58178 }, "widgetCreationCode": "session.visualize()" }, "text/html": [ - "" + "" ], "text/plain": [ "Open the notebook in JupyterLab with the atoti extension enabled to build this widget." @@ -2306,15 +2306,15 @@ "data": { "application/vnd.atoti.widget.v0+json": { "name": "Scenarios: Revenue realized by policy types", - "sessionId": "1659950924_Q5WXBP", + "sessionId": "1669706542_62K7HA", "sessionLocation": { - "https": null, - "port": 63222 + "https": false, + "port": 58178 }, "widgetCreationCode": "session.visualize()" }, "text/html": [ - "" + "" ], "text/plain": [ "Open the notebook in JupyterLab with the atoti extension enabled to build this widget." @@ -2375,15 +2375,15 @@ "data": { "application/vnd.atoti.widget.v0+json": { "name": "Scenario: Revenue and sales by policy and coverage type", - "sessionId": "1659950924_Q5WXBP", + "sessionId": "1669706542_62K7HA", "sessionLocation": { - "https": null, - "port": 63222 + "https": false, + "port": 58178 }, "widgetCreationCode": "session.visualize()" }, "text/html": [ - "" + "" ], "text/plain": [ "Open the notebook in JupyterLab with the atoti extension enabled to build this widget." @@ -2434,15 +2434,15 @@ "data": { "application/vnd.atoti.widget.v0+json": { "name": "Scenarios: Revenue realised gauge", - "sessionId": "1659950924_Q5WXBP", + "sessionId": "1669706542_62K7HA", "sessionLocation": { - "https": null, - "port": 63222 + "https": false, + "port": 58178 }, "widgetCreationCode": "session.visualize()" }, "text/html": [ - "" + "" ], "text/plain": [ "Open the notebook in JupyterLab with the atoti extension enabled to build this widget." @@ -2475,8 +2475,8 @@ "application/vnd.atoti.link.v0+json": { "path": "#/dashboard/39f", "sessionLocation": { - "https": null, - "port": 63222 + "https": false, + "port": 58178 } }, "text/plain": [ @@ -2525,7 +2525,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.12" + "version": "3.9.13" } }, "nbformat": 4, diff --git a/notebooks/01-use-cases/finance/risk-management/credit-risk/ifrs9/main.ipynb b/notebooks/01-use-cases/finance/risk-management/credit-risk/ifrs9/main.ipynb index 4af29b42..ff64f887 100644 --- a/notebooks/01-use-cases/finance/risk-management/credit-risk/ifrs9/main.ipynb +++ b/notebooks/01-use-cases/finance/risk-management/credit-risk/ifrs9/main.ipynb @@ -64,7 +64,7 @@ "path": "", "sessionLocation": { "https": false, - "port": 49765 + "port": 59743 } }, "text/plain": [ @@ -233,52 +233,51 @@ " \n", " \n", " \n", - " 83979\n", - " 2007-09-01\n", + " 83979\n", + " 2007-10-01\n", + " 0.009044\n", + " 0.010853\n", + " 3296.043221\n", + " 0.7\n", + " 1\n", " 0.010798\n", " 0.012958\n", " 3218.853834\n", " 0.7\n", " 1\n", - " 0.010321\n", - " 0.012385\n", - " 3115.824071\n", - " 0.7\n", - " 1\n", " NaN\n", - " 3\n", + " 4\n", " \n", " \n", - " 121673\n", - " 2008-01-01\n", - " 0.023435\n", - " 0.028122\n", - " 4900.635234\n", - " 0.6\n", + " 2007-06-01\n", + " 0.011905\n", + " 0.014286\n", + " 3000.000000\n", + " 0.8\n", " 1\n", - " 0.024489\n", - " 0.029386\n", - " 5214.762451\n", - " 0.6\n", + " 0.011905\n", + " 0.014286\n", + " 3000.000000\n", + " 0.8\n", " 1\n", " NaN\n", - " 5\n", + " 0\n", " \n", " \n", - " 118533\n", - " 2007-09-01\n", - " 0.056348\n", - " 0.067618\n", - " 2582.666544\n", - " 0.7\n", + " 155218\n", + " 2008-02-01\n", + " 0.126738\n", + " 0.152086\n", + " 9806.929770\n", + " 0.6\n", " 2\n", - " 0.063748\n", - " 0.076497\n", - " 2500.000000\n", - " 0.8\n", + " 0.150825\n", + " 0.180990\n", + " 9892.029445\n", + " 0.6\n", " 2\n", " NaN\n", - " 1\n", + " 3\n", " \n", " \n", "\n", @@ -287,27 +286,27 @@ "text/plain": [ " PD12 PDLT EAD LGD Stage \\\n", "id Reporting Date \n", - "83979 2007-09-01 0.010798 0.012958 3218.853834 0.7 1 \n", - "121673 2008-01-01 0.023435 0.028122 4900.635234 0.6 1 \n", - "118533 2007-09-01 0.056348 0.067618 2582.666544 0.7 2 \n", + "83979 2007-10-01 0.009044 0.010853 3296.043221 0.7 1 \n", + " 2007-06-01 0.011905 0.014286 3000.000000 0.8 1 \n", + "155218 2008-02-01 0.126738 0.152086 9806.929770 0.6 2 \n", "\n", " Previous PD12 Previous PDLT Previous EAD \\\n", "id Reporting Date \n", - "83979 2007-09-01 0.010321 0.012385 3115.824071 \n", - "121673 2008-01-01 0.024489 0.029386 5214.762451 \n", - "118533 2007-09-01 0.063748 0.076497 2500.000000 \n", + "83979 2007-10-01 0.010798 0.012958 3218.853834 \n", + " 2007-06-01 0.011905 0.014286 3000.000000 \n", + "155218 2008-02-01 0.150825 0.180990 9892.029445 \n", "\n", " Previous LGD Previous Stage DaysPastDue \\\n", "id Reporting Date \n", - "83979 2007-09-01 0.7 1 NaN \n", - "121673 2008-01-01 0.6 1 NaN \n", - "118533 2007-09-01 0.8 2 NaN \n", + "83979 2007-10-01 0.7 1 NaN \n", + " 2007-06-01 0.8 1 NaN \n", + "155218 2008-02-01 0.6 2 NaN \n", "\n", " Months Since Inception \n", "id Reporting Date \n", - "83979 2007-09-01 3 \n", - "121673 2008-01-01 5 \n", - "118533 2007-09-01 1 " + "83979 2007-10-01 4 \n", + " 2007-06-01 0 \n", + "155218 2008-02-01 3 " ] }, "execution_count": 7, @@ -476,52 +475,52 @@ " 2018-07-01\n", " \n", " \n", - " 54057516\n", - " 57598247\n", - " 15000.0\n", - " 15000.0\n", - " 15000.0\n", - " 36 months\n", - " 12.69\n", - " 503.18\n", - " C\n", - " C2\n", - " Human resources specialist\n", + " 8295031\n", + " 10037157\n", + " 12000.0\n", + " 12000.0\n", + " 12000.0\n", + " 60 months\n", + " 10.99\n", + " 260.85\n", + " B\n", + " B2\n", + " Case manager\n", " ...\n", " NaN\n", " NaN\n", - " 22700.0\n", + " 74900.0\n", " NaN\n", " NaN\n", " NaN\n", - " 2015\n", - " 7\n", + " 2013\n", + " 10\n", " 1\n", - " 2018-07-01\n", - " \n", - " \n", - " 47592325\n", - " 50811048\n", - " 34750.0\n", - " 34750.0\n", - " 34750.0\n", - " 36 months\n", - " 19.52\n", - " 1282.96\n", - " E\n", - " E3\n", - " Accounts Director\n", + " 2018-10-01\n", + " \n", + " \n", + " 55253847\n", + " 58834764\n", + " 10400.0\n", + " 10400.0\n", + " 10400.0\n", + " 60 months\n", + " 21.99\n", + " 287.18\n", + " F\n", + " F1\n", + " License Mortgage Loan officer\n", " ...\n", " NaN\n", " NaN\n", - " 76100.0\n", + " 37000.0\n", " NaN\n", " NaN\n", " NaN\n", " 2015\n", - " 5\n", + " 7\n", " 1\n", - " 2018-05-01\n", + " 2020-07-01\n", " \n", " \n", "\n", @@ -532,26 +531,32 @@ " member_id loan_amnt funded_amnt funded_amnt_inv term \\\n", "id \n", "55959171 59620924 14000.0 14000.0 14000.0 36 months \n", - "54057516 57598247 15000.0 15000.0 15000.0 36 months \n", - "47592325 50811048 34750.0 34750.0 34750.0 36 months \n", + "8295031 10037157 12000.0 12000.0 12000.0 60 months \n", + "55253847 58834764 10400.0 10400.0 10400.0 60 months \n", + "\n", + " int_rate installment grade sub_grade \\\n", + "id \n", + "55959171 12.69 469.63 C C2 \n", + "8295031 10.99 260.85 B B2 \n", + "55253847 21.99 287.18 F F1 \n", "\n", - " int_rate installment grade sub_grade emp_title \\\n", - "id \n", - "55959171 12.69 469.63 C C2 Truck Driver \n", - "54057516 12.69 503.18 C C2 Human resources specialist \n", - "47592325 19.52 1282.96 E E3 Accounts Director \n", + " emp_title ... max_bal_bc all_util \\\n", + "id ... \n", + "55959171 Truck Driver ... NaN NaN \n", + "8295031 Case manager ... NaN NaN \n", + "55253847 License Mortgage Loan officer ... NaN NaN \n", "\n", - " ... max_bal_bc all_util total_rev_hi_lim inq_fi total_cu_tl \\\n", - "id ... \n", - "55959171 ... NaN NaN 8400.0 NaN NaN \n", - "54057516 ... NaN NaN 22700.0 NaN NaN \n", - "47592325 ... NaN NaN 76100.0 NaN NaN \n", + " total_rev_hi_lim inq_fi total_cu_tl inq_last_12m Opening Year \\\n", + "id \n", + "55959171 8400.0 NaN NaN NaN 2015 \n", + "8295031 74900.0 NaN NaN NaN 2013 \n", + "55253847 37000.0 NaN NaN NaN 2015 \n", "\n", - " inq_last_12m Opening Year Opening Month Opening Day maturity_date \n", - "id \n", - "55959171 NaN 2015 7 1 2018-07-01 \n", - "54057516 NaN 2015 7 1 2018-07-01 \n", - "47592325 NaN 2015 5 1 2018-05-01 \n", + " Opening Month Opening Day maturity_date \n", + "id \n", + "55959171 7 1 2018-07-01 \n", + "8295031 10 1 2018-10-01 \n", + "55253847 7 1 2020-07-01 \n", "\n", "[3 rows x 77 columns]" ] @@ -638,33 +643,33 @@ " \n", " \n", " \n", - " 16491451\n", + " 445007\n", " N/A\n", - " 0.057929\n", - " 0.069515\n", + " 0.078235\n", + " 0.093882\n", " \n", " \n", - " 32058330\n", + " 28743305\n", " N/A\n", - " 0.083669\n", - " 0.100402\n", + " 0.135286\n", + " 0.162343\n", " \n", " \n", - " 5036924\n", - " 2014-11-12 00:00:00\n", - " 0.029353\n", - " 0.035223\n", + " 63661236\n", + " N/A\n", + " 0.074856\n", + " 0.089827\n", " \n", " \n", "\n", "" ], "text/plain": [ - " default_date Opening PD12 Opening PDLT\n", - "id \n", - "16491451 N/A 0.057929 0.069515\n", - "32058330 N/A 0.083669 0.100402\n", - "5036924 2014-11-12 00:00:00 0.029353 0.035223" + " default_date Opening PD12 Opening PDLT\n", + "id \n", + "445007 N/A 0.078235 0.093882\n", + "28743305 N/A 0.135286 0.162343\n", + "63661236 N/A 0.074856 0.089827" ] }, "execution_count": 10, @@ -1419,11 +1424,6 @@ "outputs": [ { "data": { - "application/vnd.atoti.convert-query-result-to-widget.v0+json": { - "mdx": "SELECT {[Measures].[EAD], [Measures].[Previous EAD], [Measures].[EAD (Chg)], [Measures].[EAD (Chg %)]} ON COLUMNS, NON EMPTY [Credit Risk].[Reporting Date].[Reporting Date].Members ON ROWS FROM [IFRS9]", - "sessionId": "1666698770_DY3ITH", - "widgetCreationCode": "session.visualize()" - }, "text/html": [ "
\n", "