{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Credit Corp's Consumer Lending Segment\n", "\n", "Note: All numbers are in the form of $'000 unless otherwise stated\n", "\n", "Let's import some libraries first..." ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "import pandas\n", "from pandas.plotting import scatter_matrix\n", "\n", "from sklearn import datasets\n", "from sklearn import model_selection\n", "from sklearn import linear_model\n", "\n", "# models\n", "from sklearn.ensemble import RandomForestRegressor\n", "from sklearn.neighbors import KNeighborsRegressor\n", "from sklearn.preprocessing import StandardScaler, PolynomialFeatures\n", "from sklearn.linear_model import LinearRegression, Ridge\n", "from sklearn.tree import DecisionTreeRegressor\n", "from sklearn.metrics import mean_squared_error, r2_score\n", "\n", "import matplotlib.pyplot as plt" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Load the past few years of relevant data." ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ " period revenue npbt gross_book_average net_lending\n", "0 FY14 19104 -3522 41465.5 49130\n", "1 FY15 35826 1401 81343.0 51063\n", "2 FY16 52418 8709 117278.5 55077\n", "3 FY17 66374 17596 147714.5 46184\n", "4 FY18 79336 23028 171786.0 52405\n" ] } ], "source": [ "dataset = pandas.read_csv(\"data/ccp-consumer-lending-full-year.csv\")\n", "print (dataset)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Let us create a linear regression model with the whole dataset." ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Coefficients: \t[ 0.2111212 -0.28462548]\n", "Intercept: \t265.191305252\n", "\n", "The equation would look like...\n", "p = 0.211121197019r + -0.284625478565l + 265.191305252\n" ] } ], "source": [ "array = dataset.values\n", " \n", "X = array[:,3:5] # data = avg_gross_loan_book, net_lending\n", "Y = array[:,2] # result = NPAT\n", "\n", "model = LinearRegression()\n", "model.fit(X, Y) # train model\n", "\n", "# the model's linear regression coefficients\n", "print(\"Coefficients: \\t%s\" % model.coef_)\n", "print(\"Intercept: \\t%s\" % model.intercept_)\n", "\n", "print(\"\\nThe equation would look like...\")\n", "print(\"p = %sr + %sl + %s\" % (model.coef_[0], model.coef_[1], model.intercept_))" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Where\n", "```\n", "p = Net profit before tax (npbt)\n", "b = Average gross loan book (gross_book_average)\n", "l = Net lending for the period (net_lending)\n", "```" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "# FY19 Predictions\n", "\n", "## Based on management's forecasts\n", "\n", "Assumptions:\n", "\n", "* Gross loan book to end the year at $199.896m (long story on how I got to something so specific)\n", "\n", "* Average gross loan book will be $191.496m\n", "\n", "* Net lending will be $50m, on the upper range of the forecast. Quoting a high number here will actually reduce NPBT.\n" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "EBIT = $26.4627821213m\n", "NPAT = $18.5239474849m\n" ] } ], "source": [ "gross_book_average = 191496\n", "net_lending = 50000\n", "\n", "npbt = model.predict([[gross_book_average, net_lending]])[0]\n", "\n", "print(\"EBIT = $%sm\" % (npbt/1000))\n", "print(\"NPAT = $%sm\" % (npbt/1000 * 0.7))" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "This sits inside the $17 - 19m range forecast by management, so our model is not crazy bad!" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "\n", "## Based on a zero-growth scenario\n", "\n", "The higher the Net Lending completed by the company, the lower the reported Net Profit due to the way the company provisions the expected lossed upfront. So you get a situation where the NPAT is under-reported, unless the company stops growing its loan book. So what happens with NPAT when the loan book stops growing?\n", "\n", "* Assume 17.34% of gross loan book is the required net lending to maintain the loan book.\n", "* Last 5 years (FY14 - FY18) this figure has been: 14.22%, 17.88%, 16.82%, 13.99%, 17.34%." ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\n", "Net Lending Assumption = 33205.4064\n", "\n", "EBIT: $31.242951362m\n", "NPAT: $21.8700659534m\n", "\n", "NPAT buffer: $4.7801692407m\n" ] } ], "source": [ "net_lending = gross_book_average * 0.1734\n", "\n", "print(\"\\nNet Lending Assumption = %s\\n\" % net_lending)\n", "\n", "npbt_zero_growth = model.predict([[gross_book_average, net_lending]])[0]\n", "\n", "print(\"EBIT: $%sm\" % (npbt_zero_growth / 1000))\n", "print(\"NPAT: $%sm\" % (npbt_zero_growth * 0.7 / 1000))\n", "\n", "print(\"\\nNPAT buffer: $%sm\" % ((npbt_zero_growth - npbt) / 1000))" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "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.6.6" } }, "nbformat": 4, "nbformat_minor": 2 }