<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Yuvaraj Bhole on Medium]]></title>
        <description><![CDATA[Stories by Yuvaraj Bhole on Medium]]></description>
        <link>https://medium.com/@yuvarajbhole?source=rss-51aa4a84f319------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*05NfkXuCKFWr2j7v</url>
            <title>Stories by Yuvaraj Bhole on Medium</title>
            <link>https://medium.com/@yuvarajbhole?source=rss-51aa4a84f319------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 05:32:24 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@yuvarajbhole/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[IFRS 9 Credit Risk Modelling - Part 2: Engineering the 360° Risk Profile]]></title>
            <link>https://medium.com/@yuvarajbhole/part-2-engineering-the-360-risk-profile-22413b1831bf?source=rss-51aa4a84f319------2</link>
            <guid isPermaLink="false">https://medium.com/p/22413b1831bf</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[fintech]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[ifrs-9]]></category>
            <category><![CDATA[credit-risk]]></category>
            <dc:creator><![CDATA[Yuvaraj Bhole]]></dc:creator>
            <pubDate>Sun, 21 Sep 2025 10:19:47 GMT</pubDate>
            <atom:updated>2025-12-29T10:46:02.853Z</atom:updated>
            <content:encoded><![CDATA[<h4>The IFRS 9 Digital Blueprint</h4><h3>IFRS 9 Credit Risk Modelling – Part 2: Engineering the 360° Risk Profile</h3><p><strong>A Defensible Feature Selection Framework</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2Rts1DihB03ONuT_Ua0hig.png" /></figure><p><em>Good news — this article is freely accessible for everyone. No paywall or subscription needed.</em></p><blockquote>This article is Part 2 of a 10-part series:<em><br></em><strong>The Leader’s Guide to Digital Risk Transformation: An End-to-End, PRA-Compliant IFRS 9 Blueprint </strong>[Link]</blockquote><blockquote><strong>Part 1: Architecting a PRA-Compliant Risk Foundation [</strong><a href="https://medium.com/@yuvarajbhole/ifrs9-compliant-credit-risk-model-part-1-architecting-a-pra-compliant-risk-foundation-a9589d189256">Link</a><strong>]</strong></blockquote><blockquote>Part 2: <strong>Engineering the 360° Risk Profile</strong> [this article]</blockquote><h3>🏛️ The Blueprint: A First-Line Framework Built for Second &amp; Third-Line Scrutiny</h3><p>In our foundational article, we established the regulatory context and identified the core risk drivers within our primary application data. However, a world-class risk model cannot operate on a single source of truth. The most powerful insights come from synthesizing a holistic view of a customer’s behaviour across their entire financial life.</p><p>This article demonstrates the methodology to transform fragmented data silos into a single, unified, and powerfully predictive feature set. Our approach is a systematic, two-stage process designed to be robust and auditable:</p><ol><li><strong>Modular Feature Engineering: </strong>We will systematically process six external data sources — from bureau history to credit card usage — engineering hundreds of new, risk-sensitive features. This modular approach mirrors how a modern, enterprise-grade risk feature store is constructed.</li><li><strong>Dual-Filter Selection: </strong>We will then subject this rich feature universe to a rigorous, two-stage selection gauntlet: an initial screening using Information Value (IV) to identify the most predictive signals, followed by a Multicollinearity Analysis to ensure the final feature set is stable and defensible, as mandated by PRA SS1/23.</li></ol><h3><strong>⚙️ Execution &amp; Evidence: The Automated Data Audit and Feature Selection</strong></h3><p>Before engineering can begin, we must perform due diligence on our raw materials. Using the data_profiling_report function from our risk-governance-kit, we conduct an automated data quality audit on all supplementary files. This is a critical first-line governance step to ensure data integrity.</p><blockquote>The notebook “02_Feature_Engineering.ipynb” in my github site [<a href="https://github.com/ykbhole15/credit-risk-modelling-UK">link</a>] demonstrates this process, running the profiling function in a loop over all six external datasets and saving the output reports as auditable artifacts.</blockquote><p><strong>The Verdict:</strong> The automated audit confirms the structural integrity and data quality of our external sources, flagging key characteristics like missingness and data types. With this baseline established, we can proceed with feature engineering, confident in the quality of our raw data.</p><p>After engineering hundreds of features from all data sources and merging them into a “Master Feature Table,” our first selection challenge is to separate the signal from the noise. We use Information Value (IV), the industry standard for measuring the univariate predictive power of a feature, to distinguish between “good” and “bad” customers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*t77XmKrb5onGsqOw96BjZg.png" /><figcaption>Top 40 features by Information Value (IV)</figcaption></figure><p>The IV ranking provides immediate, powerful insights. The analysis confirms that external bureau scores (EXT_SOURCE_3, EXT_SOURCE_1, EXT_SOURCE_2) are by far the most powerful individual predictors. We also see that engineered behavioural features, such as BURO_DAYS_CREDIT_MEAN and BURO_BB_MONTHS_COUNT_MEAN, are highly predictive. Based on this evidence, we establish a threshold of <strong>IV &gt; 0.02</strong>, creating a shortlist of the most promising features to carry forward into the next stage of selection.</p><p>Predictive power alone is not enough; a model built with redundant, highly correlated features is unstable and untrustworthy — a direct violation of the principles in <strong>PRA SS1/23</strong>. Our final selection step is to analyse the correlation between our IV-shortlisted features and remove any redundant variables to create a stable, parsimonious, and defensible final predictor set.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*P1gYLoho-qW2MyitDDfiXQ.png" /><figcaption>Final Feature Set for Corelation Matrix</figcaption></figure><p>The correlation heatmap reveals several areas of high correlation between our shortlisted features. By systematically removing the variable with the lower Information Value from each highly correlated pair (e.g., c<strong>orrelation &gt; 0.7</strong>), we have forged our final, definitive predictor set. This set is now both highly predictive and statistically stable, ensuring that our eventual model will have robust coefficient estimates and will be defensible under regulatory scrutiny.</p><h3><strong>🧭 The Verdict: A Defensible Foundation and the Road Ahead</strong></h3><p>In this article, we have moved from a simple dataset to a rich, holistic customer profile. We have demonstrated a robust, multi-stage methodology for transforming raw data into intelligent risk signals and have produced a final, stable, and highly predictive feature set. This is not just a list of variables; it is a meticulously curated and defensible foundation, ready for modelling.</p><p>With our definitive predictor set now established, we are ready to build our “Glass Box” champion model. In <strong>Part 3: Building the Interpretable PD ‘Champion’ Model</strong>, we will use this feature set to develop a transparent and powerful Logistic Regression model, using advanced techniques like Weight of Evidence (WOE) transformation to create a model that regulators can trust and the business can understand.</p><p>The <strong>ultimate goal</strong> of this project is the creation of “<em>risk-governance-kit”</em>, an open-source Python library designed to automate and standardize PRA-compliant model validation. The mission is to bring the principles of ‘Governance as Code’ to the forefront of the credit risk industry.</p><p>This is an open, community-driven project. Feedback and strategic collaboration from industry leaders and practitioners are <strong>welcome</strong>.</p><p>Follow the live development on <a href="https://github.com/ykbhole15/credit-risk-modelling-UK">GitHub </a>or connect with me on <a href="https://www.linkedin.com/in/yuvarajbhole/">LinkedIn</a> to discuss the future of automated risk governance.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=22413b1831bf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[IFRS 9 Credit Risk Modelling - Part 1: Architecting a PRA-Compliant Risk Foundation]]></title>
            <link>https://medium.com/@yuvarajbhole/ifrs9-compliant-credit-risk-model-part-1-architecting-a-pra-compliant-risk-foundation-a9589d189256?source=rss-51aa4a84f319------2</link>
            <guid isPermaLink="false">https://medium.com/p/a9589d189256</guid>
            <category><![CDATA[ifrs-9-ecl-modelling]]></category>
            <category><![CDATA[fintech]]></category>
            <category><![CDATA[explainable-ai]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[credit-risk]]></category>
            <dc:creator><![CDATA[Yuvaraj Bhole]]></dc:creator>
            <pubDate>Sat, 20 Sep 2025 19:44:27 GMT</pubDate>
            <atom:updated>2025-09-26T19:21:23.905Z</atom:updated>
            <content:encoded><![CDATA[<h4>The IFRS 9 Digital Blueprint</h4><p><strong>The Blueprint for a Digital-First ECL Framework</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2Rts1DihB03ONuT_Ua0hig.png" /></figure><p><em>Good news — this article is freely accessible for everyone. No paywall or subscription needed.</em></p><blockquote>This article is Part 1 of a 10-part series:<br><strong>The Leader’s Guide to Digital Risk Transformation: An End-to-End, PRA-Compliant IFRS 9 Blueprint </strong>[Link]</blockquote><blockquote><strong><em>Part 1: Architecting a PRA-Compliant Risk Foundation </em></strong><em>(this article)</em></blockquote><blockquote><strong><em>Part 2:</em></strong><em> Title [Link]</em></blockquote><h3><strong>🚀 </strong>The Mandate: From Regulatory Burden to Strategic Imperative</h3><p>For any UK-regulated lender, the IFRS 9 standard is not merely an accounting exercise; it is a foundational pillar of risk management that directly impacts capital adequacy and reported profitability. Building a model that is simply predictive is no longer enough. A modern Expected Credit Loss (ECL) framework must be robust, auditable, and fully defensible under the rigorous scrutiny of the Prudential Regulation Authority (PRA).</p><p>This 10-part series documents the creation of a world-class, AI-driven IFRS 9 framework for a hypothetical UK fintech, “Credora Lending.”. We will move beyond theory to implementation, building a complete, PRA-compliant risk engine.</p><p>This journey will culminate in the creation of <strong>four key, high-impact assets</strong>: a live interactive strategy dashboard, a “Second Line” mock validation report, a final consolidated whitepaper, and risk-governance-kit, a new open-source Python library for automating model validation.</p><p>This first article establishes the critical foundation. We will deconstruct the regulatory mandate, establish an auditable data quality baseline, and conduct a strategic Exploratory Data Analysis (EDA) to uncover the core risk drivers that will anchor our entire framework.</p><h3><strong>🏛️</strong>The Blueprint: A First-Line Framework Built for Second &amp; Third-Line Scrutiny</h3><p>Our methodology for building this foundation is rooted in the “Three Lines of Defence” model used across the UK financial industry. This article simulates the work of a First Line model development team, creating a robust framework designed to withstand challenge from the <strong>Second Line (Risk &amp; Compliance)</strong> and <strong>Third Line (Internal Audit)</strong>.</p><blockquote>Crucially, this framework is designed as a <strong>dual-time model</strong>, separating the analysis of ‘through-the-cycle’ vintage performance from the impact of ‘point-in-time’ macroeconomic conditions, a best practice for building robust, forward-looking ECL models.</blockquote><h4>Our approach consists of three strategic phases:</h4><p><strong>Deconstructing the Regulatory Mandate:</strong> We will translate the IFRS 9 principles into a concrete modelling plan, defining the core ECL components (PD, LGD, EAD) and the critical staging logic.</p><p><strong>Automated Data Integrity Audit:</strong> We will use a custom-built, reusable function from our risk-governance-kit to perform a comprehensive data profiling and quality assessment, identifying potential risks like missing data and skewed distributions upfront.</p><p><strong>Strategic Bivariate Analysis:</strong> We will move beyond a simple data overview to conduct a targeted investigation, using visualizations to confirm the predictive power of key features and establish their relationship with the likelihood of default.</p><h3><strong>⚙️</strong>Execution &amp; Evidence: The Automated Data Audit and Core Risk Drivers</h3><p>Before any code is written, we must define the problem. IFRS 9 requires firms to provision for Expected Credit Losses using a forward-looking, three-stage model. The core formula is</p><h4>ECL = PD x LGD x EAD.</h4><p>Our goal is to build robust, data-driven models for each of these components, starting with the Probability of Default (PD).</p><p>The staging of a loan is the heart of the IFRS 9 engine, as it determines whether we provision for a 12-month or a lifetime loss. This has a material impact on a firm’s financial statements and capital reserves.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LjMw7Ub1aQ5j0DLqKqw2Bg.png" /><figcaption>The flow from Stage 1 to Stage 2 (upon a Significant Increase in Credit Risk — SICR) and Stage 3</figcaption></figure><p>Banks need to provision as per the <strong>loan’s health check-up</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/744/1*vbqj3t-PyB3SLkPM89k8RQ.png" /></figure><p>A model is only as strong as its data foundation. To ensure our data is fit for purpose — a key principle of <strong>PRA SS1/23 </strong>— we begin with a comprehensive, automated data quality audit using a function from our risk-governance-kit.</p><p><strong>Code:</strong></p><pre>def data_profiling_report(df: pd.DataFrame, df_name: str = &quot;&quot;, unique_value_threshold: int = 15) -&gt; pd.DataFrame:<br>    &quot;&quot;&quot;<br>    Generates a definitive data profiling report.<br><br>    This report provides a comprehensive overview of a DataFrame, including:<br>    1.  Standard descriptive statistics for all data types.<br>    2.  Data type, percentage of missing values, and unique value counts.<br>    3.  Coefficient of Variation for numerical columns to flag high volatility/skew.<br>    4.  A list of unique values for low-cardinality categorical columns.<br>    &quot;&quot;&quot;<br><br>    # STEP 1: Get the comprehensive summary for ALL columns<br>    summary_stats = df.describe(include=&#39;all&#39;).T<br>    <br>    # STEP 2: Get core non-statistical info<br>    info_df = pd.DataFrame({<br>        &#39;Data Type&#39;: df.dtypes,<br>        &#39;% Missing&#39;: df.isnull().sum() / len(df) * 100,<br>        &#39;# Unique&#39;: df.nunique()<br>    })<br>    <br>    # STEP 3: Combine them<br>    final_report = summary_stats.join(info_df)<br><br>    # Add Coefficient of Variation (std/mean) for numeric columns<br>    final_report[&#39;Coeff of Var&#39;] = final_report.apply(<br>        lambda row: abs(row[&#39;std&#39;] / row[&#39;mean&#39;]) if pd.notnull(row[&#39;mean&#39;]) and row[&#39;mean&#39;] != 0 else np.nan,<br>        axis=1<br>    )<br><br>    # Add Unique Categorical Entries<br>    unique_entries = {}<br>    for col in df.columns:<br>        if isinstance(df[col].dtype, pd.CategoricalDtype) or df[col].dtype == &#39;object&#39;:<br>            # Use the consistent &#39;# Unique&#39; column for the check<br>            if final_report.loc[col, &#39;# Unique&#39;] &lt;= unique_value_threshold:<br>                unique_entries[col] = df[col].unique().tolist()<br>            else:<br>                unique_entries[col] = &quot;[High Cardinality]&quot;<br>        else:<br>            unique_entries[col] = np.nan<br>            <br>    final_report[&#39;Unique Values&#39;] = pd.Series(unique_entries)   <br> <br><br>    # Define the final column order<br>    core_cols = [&#39;Data Type&#39;, &#39;% Missing&#39;, &#39;# Unique&#39;]<br>    stat_cols = [&#39;count&#39;, &#39;mean&#39;, &#39;std&#39;, &#39;Coeff of Var&#39;, &#39;min&#39;, &#39;25%&#39;, &#39;Median (50%)&#39;, &#39;75%&#39;, &#39;max&#39;, &#39;top&#39;, &#39;freq&#39;]<br>   <br>    # Filter only for columns that actually exist to handle pure numeric/categorical cases<br>    existing_stat_cols = [c for c in stat_cols if c in final_report.columns]<br>    final_report = final_report[core_cols + existing_stat_cols + [&#39;Unique Values&#39;]]<br>    <br>    # Sort by the most critical metric<br>    return final_report.sort_values(by=&#39;% Missing&#39;, ascending=False)</pre><pre># 1. Generate the full report for all 122 columns using the above defined function<br>quality_report = data_profiling_report(application_train, df_name=&quot;Application Train Data&quot;)</pre><p>View the complete code <a href="https://github.com/ykbhole15/credit-risk-modelling-UK?tab=readme-ov-file">here</a></p><p><strong>Output of the code:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CYK7X6tOy6IL36JhFp0MJA.png" /><figcaption>Data profiling report</figcaption></figure><p>The automated report provides immediate, actionable insights across all 122 features. It flags two key areas of risk for our project:</p><p><strong>High Missingness: </strong>A cluster of features related to property specifics (e.g., APARTMENTS_AVG) have over 50% missing data, rendering them unusable without a robust imputation strategy, which could be difficult to defend in an audit. These will likely be excluded.</p><p><strong>High Volatility:</strong> Features like AMT_INCOME_TOTAL show a high Coefficient of Variation, signalling the presence of extreme outliers. This foreshadows a potential source of instability in a linear model, which we will need to address during the model refinement stage in Article 4.</p><p>With a high-level understanding of data quality, we now conduct a targeted analysis to confirm the predictive power of key variables. We will present three illustrative examples.</p><p>We hypothesize that external credit bureau scores will be among the most powerful predictors.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2-Slq5xW74tXnzPUwLTqUw.png" /></figure><p><strong>The Verdict:</strong> The analysis confirms a strong, monotonic negative relationship between EXT_SOURCE_3 and the default rate. As the external score increases, the likelihood of default decreases predictably. This confirms the feature is a critical predictor of creditworthiness and will be a cornerstone of our PD model.</p><p>We investigate whether an applicant’s level of education has a discernible relationship with their risk profile.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rYS0EdTVYvXIQBxbDyQZOA.png" /></figure><p><strong>The Verdict:</strong> The data reveals a clear risk ordering. Applicants with a “Lower secondary” education have a default rate nearly three times higher than those with an “Academic degree.” This provides a strong business rationale for including education as a key demographic feature.</p><p>We assess the default rate across genders to check for any significant divergence.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ppG4UXN8iy4kpLMQq-NS_g.png" /></figure><p><strong>The Verdict:</strong> The analysis shows that females in this portfolio have a default rate of approximately 7%, compared to over 10% for males. While the underlying drivers of this difference are complex, the data confirms that gender is a statistically significant feature. Under UK regulation (FCA-TCF), this feature must be handled carefully to ensure it does not lead to unfair outcomes, a topic we will address in “Fairness &amp; Bias Audit” in Article 5.</p><p>Our approach to data cleaning is guided by the principle of transparency. For example, for the OCCUPATION_TYPE feature, which has a significant number of missing values, we will not impute them. Instead, we treat missingness as a distinct category (‘Unknown’).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Itlqiazu4s828ghfJ6dqHw.png" /></figure><p><strong>The Verdict:</strong> This approach ensures we do not introduce artificial data into our model, creating a clear and defensible audit trail. Our EDA reveals that the ‘Unknown’ category has its own unique risk profile, making this a more robust strategy than simple imputation.</p><h3><strong>✅</strong>The Verdict: A Defensible Foundation and the Road Ahead</h3><p>In this article, we have laid the indispensable groundwork for our IFRS 9 framework. We have translated a complex regulatory standard into a clear modelling plan, established the integrity of our core dataset, and identified the powerful, foundational signals that drive credit risk within our portfolio.</p><p>We have established a robust, auditable foundation. The next challenge is to build upon it. In Part 2: From Raw Data to Intelligent Risk Signals, we will move beyond this single dataset to systematically engineer hundreds of new, high-impact features from six supplementary data sources, constructing the comprehensive 360° risk profile that a world-class model demands.</p><p>The <strong>ultimate goal</strong> of this project is the creation of “<em>risk-governance-kit”</em>, an open-source Python library designed to automate and standardize PRA-compliant model validation. The mission is to bring the principles of ‘Governance as Code’ to the forefront of the credit risk industry.</p><p>This is an open, community-driven project. Feedback and strategic collaboration from industry leaders and practitioners are <strong>welcome</strong>.</p><p>Follow the live development on <a href="https://github.com/ykbhole15/credit-risk-modelling-UK">GitHub </a>or connect with me on <a href="https://www.linkedin.com/in/yuvarajbhole/">LinkedIn</a> to discuss the future of automated risk governance.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a9589d189256" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[IFRS 9 Credit Risk Modelling  - Part 3: Building the Benchmark PD Model with Logistic Regression]]></title>
            <link>https://medium.com/@yuvarajbhole/credit-risk-modelling-part-3-building-the-benchmark-pd-model-with-logistic-regression-94d6f99b22d2?source=rss-51aa4a84f319------2</link>
            <guid isPermaLink="false">https://medium.com/p/94d6f99b22d2</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[credit-risk]]></category>
            <category><![CDATA[risk-management]]></category>
            <category><![CDATA[ifrs-9]]></category>
            <category><![CDATA[logistic-regression]]></category>
            <dc:creator><![CDATA[Yuvaraj Bhole]]></dc:creator>
            <pubDate>Thu, 14 Aug 2025 13:44:20 GMT</pubDate>
            <atom:updated>2025-12-29T11:48:25.357Z</atom:updated>
            <content:encoded><![CDATA[<h3>IFRS 9 Credit Risk Modelling — Part 3: Building Champion Model with Logistic Regression and WOE</h3><p>How Weight of Evidence (WOE) unlocks a transparent, PRA-ready credit risk model.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2Rts1DihB03ONuT_Ua0hig.png" /></figure><p><em>Good news — this article is freely accessible for everyone. No paywall or subscription needed.</em></p><blockquote>This article is Part 3 of a 10-part series:<em><br></em><strong>The Leader’s Guide to Digital Risk Transformation: An End-to-End, PRA-Compliant IFRS 9 Blueprint </strong>[Link]</blockquote><blockquote><strong>Part 1: Architecting a PRA-Compliant Risk Foundation [</strong><a href="https://medium.com/@yuvarajbhole/ifrs9-compliant-credit-risk-model-part-1-architecting-a-pra-compliant-risk-foundation-a9589d189256">Link</a><strong>]</strong></blockquote><blockquote><strong>Part 2: Engineering the 360° Risk Profile</strong> [<a href="https://medium.com/@yuvarajbhole/part-2-engineering-the-360-risk-profile-22413b1831bf">Link</a>]</blockquote><blockquote><strong>Part 3: Building Champion Model with Logistic Regression and WOE </strong>[this article]</blockquote><p>Now, we enter the core of the <strong>Architect</strong> phase of our Model Risk Management (MRM) Flywheel. It’s time to build our first predictive model.</p><p>In an era of complex machine learning, why are we starting with a decades-old statistical technique? Because in the world of regulated financial services, <strong>transparency is not a preference; it is a prerequisite.</strong> Our goal is to build a “Champion” model — a highly interpretable, regulator-friendly benchmark that serves as the bedrock of our risk assessment.</p><h3>1. The Champion Model: Why Logistic Regression is the Regulatory Gold Standard</h3><p>Before deploying a high-performance “black box” model, a financial institution must first establish a robust, transparent benchmark. Logistic Regression is the undisputed champion for this role for three critical reasons:</p><p><strong>1. Inherent Interpretability: </strong>Each coefficient in the model has a precise, direct, and explainable impact on the final prediction. It is a “glass-box” model, allowing risk managers to answer exactly why an applicant was assigned a certain level of risk.</p><p><strong>2. Regulatory Precedent:</strong> Regulators like the PRA are deeply familiar with and have established frameworks for validating logistic regression models. Their transparency makes them straightforward to audit and govern.</p><p><strong>3. Business Alignment: </strong>The model’s outputs (log-odds) can be directly translated into probabilities of default (PD), which align perfectly with the language of business strategy, risk appetite, and financial reporting under IFRS 9.</p><p>However, logistic regression has a key weakness: it assumes a linear relationship between the input features and the outcome. The real world is rarely that simple. This is where a powerful technique, Weight of Evidence (WOE), becomes essential.</p><h3><strong>2. Weight of Evidence (WOE): The Bridge Between Raw Data and a Robust Model</strong></h3><p>Weight of Evidence is a transformation technique that solves several problems at once. It converts raw features into a format that is perfectly suited for a logistic regression model.</p><p><strong>What is it?</strong> For each feature, we group its values into bins (e.g., age brackets). For each bin, we calculate the ratio of “Goods” (non-defaulters) to “Bads” (defaulters) and take the natural logarithm of that ratio. The result is the “Weight of Evidence” for that bin.</p><p><strong>Why is it powerful?</strong></p><p><strong>&gt; Handles Non-Linearity:</strong> It captures the non-linear relationship between a feature like age and risk, converting it into a simple, linear WOE value.</p><p><strong>&gt; Standardizes Variables:</strong> It puts all variables onto the same log-odds scale, making their coefficients comparable.</p><p><strong>&gt; Manages Outliers:</strong> It groups outliers into bins, reducing their impact on the model.</p><p>Instead of creating a one-off script, we will build this logic into a professional, reusable Python class — a core component of our risk-governance-kit. This ensures that the exact same transformation logic can be saved and applied consistently during training, validation, and future deployment.</p><h3><strong>3. The Build: From Clean Data to a Trained Model</strong></h3><p>Our workflow is designed to be clean, auditable, and production-ready from the start.</p><h4><strong>Step 3.1: Setup and Data Loading</strong></h4><p>First, we establish our environment and load the final, curated modeling dataset we meticulously crafted in Article 2. This is our single source of truth.</p><p>As noted previously, the environment lacks certain libraries, but this will not affect the integrity of the final article draft.</p><h4><strong>Step 3.2: Building the WOE Transformer Engine</strong></h4><p>This is the intellectual property of our project — a reusable, auditable class that will become a core part of the risk-governance-kit library. It learns the optimal binning and WOE “recipes” and can be saved and reused indefinitely.</p><figure><a href="https://gist.github.com/ykbhole15/0a28c0c3e40be434f9a3e4dfaebc8b3d"><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DxMAf597IufvX7zENgw4RQ.png" /></a></figure><h4>Step 3.3: Data Splitting and WOE Transformation</h4><p>To build a generalizable model, we separate our data into a training set and a testing set. We use a <strong>stratified split</strong> to ensure the percentage of defaulters is identical in both. Crucially, the WOETransformer is <strong>fitted only on the training data</strong> to prevent data leakage.</p><figure><a href="https://gist.github.com/ykbhole15/3aee6de09870780424c6f262734df8ee"><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Szyy_3Vtvp1BksCfI-XLsA.png" /></a></figure><p>The raw statsmodels output is dense but invaluable. For an executive audience, we distill this into a clear, actionable Coefficient Analysis Table. This table is the bridge between the statistical model and the business narrative.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gvXpLd_1DL0sGx8zO41-tQ.png" /><figcaption>Coefficients and their business interpretation</figcaption></figure><p>The P-Values for all our key features are effectively zero, indicating that their relationship with the target is statistically significant. The signs of the coefficients for EXT_SOURCE_3_WOE and CREDIT_TO_ANNUITY_RATIO_WOE are intuitive and defensible.</p><p>However, we have also uncovered a potential issue. The YEARS_EMPLOYED_WOE coefficient, while logical, is flagged for investigation. This is a perfect example of how an interpretable model provides not just predictions, but deep diagnostic insights. This finding is not a failure; it is a critical piece of intelligence that will guide our next steps.</p><h3><strong>5. Ensuring the Flywheel Turns: Saving the Artifacts</strong></h3><p>Our work is not complete until it is saved in a way that ensures reproducibility and auditability for the next stages of the MRM Flywheel — Validation and Governance. We save three critical artifacts:</p><p>The WOE Transformer (woe_transformer.pkl): The exact “recipe” used to transform our data. This ensures any new data is processed with identical logic.</p><p>The Trained Model (pd_champion_model.pkl): The statsmodels object containing all coefficients and statistical properties.</p><p>The Feature List (final_model_features.pkl): The definitive list of variables the model expects, preventing any errors in future use.</p><h3>Conclusion: A Robust Benchmark and a Clear Path Forward</h3><p>We have successfully built, interpreted, and packaged our “Champion” PD model. We created a transparent, regulator-friendly benchmark that is not only predictive but also provides deep diagnostic insights into our data. We professionalized our workflow by creating a reusable WOETransformer and have auditable artifacts ready for the validation phase.</p><p>Most importantly, our Champion model has done its job perfectly: it has given us a robust baseline and highlighted a specific area of instability (YEARS_EMPLOYED_WOE) that warrants further investigation.</p><h3>What’s Next?</h3><p>Our Champion model values transparency over raw predictive power. But could a more powerful model capture complex patterns we’re currently missing? And could it solve the instability we just identified?</p><p>In <strong>Part 4</strong>, we will build a high-performance “Challenger” model using XGBoost. We will compare its performance directly against our Champion and introduce the techniques required to interpret these more complex, powerful models, moving one step closer to a truly dual-model risk management framework.</p><p>The <strong>ultimate goal</strong> of this project is the creation of “<em>risk-governance-kit”</em>, an open-source Python library designed to automate and standardize PRA-compliant model validation. The mission is to bring the principles of ‘Governance as Code’ to the forefront of the credit risk industry.</p><p>This is an open, community-driven project. Feedback and strategic collaboration from industry leaders and practitioners are <strong>welcome</strong>.</p><p>Follow the live development on <a href="https://github.com/ykbhole15/credit-risk-modelling-UK">GitHub </a>or connect with me on <a href="https://www.linkedin.com/in/yuvarajbhole/">LinkedIn</a> to discuss the future of automated risk governance.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=94d6f99b22d2" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>