deepakraj08/Dynamic-MSME-Credit-Scoring
title: MSME Credit Engine emoji: 🏦 colorFrom: blue colorTo: gree--- title: MSME Credit Engine emoji: 🏦 colorFrom: blue colorTo: green sdk: streamlit sdkversion: "1.31.0" appfile: app.py pinned: false pythonversion: "3.10" --- sdk: streamlit sdkversion: "1.31.0" app_file: app.py pinned: false ---
🏦 Dynamic MSME Credit Scoring & Explainable AI (XAI) Engine
   
📊 Executive Summary
India currently faces a $300 billion+ credit gap in the MSME sector. Traditional underwriting models heavily penalize "thin-file" MSMEs due to a lack of historical credit data, while financial institutions hesitate to lend due to high NPA (Non-Performing Asset) risks.
This project is an enterprise-grade prototype designed to bridge this gap by leveraging alternative data streams—specifically GST compliance metrics and cash-flow analytics—aligned with India's Account Aggregator (AA) framework and the Open Credit Enablement Network (OCEN).
🎯 Business Value & Problem Solved
- Financial Inclusion via Alternative Data: Moves beyond traditional bureau scores by analyzing real-time business health indicators (e.g., GSTR-1 vs. 3B mismatch frequency, working capital cycles).
- Regulatory Compliance (Algorithmic Transparency): Black-box AI models are heavily scrutinized in financial services. This engine integrates SHAP (SHapley Additive exPlanations) to provide mathematical transparency for every loan rejection or approval, satisfying regulatory demands for Explainable AI (XAI).
- Risk Mitigation: Accurately isolates high-risk applicants by detecting early-warning signals in tax filing behaviors and cash flow volatility.
🧠 Methodology & Architecture
This engine treats credit risk assessment as a binary classification problem, estimating the probability of default $P(Y=1|X)$ given a feature matrix $X$ of financial indicators.
- Data Simulation: Synthetically generated enterprise data mirroring Indian MSME financial landscapes.
- Core Algorithm (XGBoost): Utilizes extreme gradient boosting, the industry standard for non-linear, tabular financial data.
- Explainability (SHAP): Decomposes the model's prediction to show the exact contribution of each feature to the final risk score.
- Interface (Streamlit): A dual-view architecture simulating the data ingestion from an Account Aggregator API (Applicant View) and the decision support interface for bank managers (Loan Officer View).
🚀 How to Use the Application
- Navigate to the Applicant Portal via the sidebar.
- Adjust the financial parameters (simulating an OCEN/AA data fetch).
- Click Submit via Account Aggregator.
- Switch to the Loan Officer Dashboard to view the algorithmic risk assessment, probability of default, and the SHAP waterfall chart explaining the specific risk drivers.
👨💻 About the Developer
Deepak M.Sc. Finance and Analytics
- Developed as part of an advanced analytics live project focusing on AI-driven capital allocation and decision support systems for finance leaders.
*Disclaimer: This is a prototype application built for educational and portfolio purposes. The data utilized is synthetically generated to mimic real-world
