An end-to-end data engineering and supervisory analytics platform simulating RBI-grade consumer protection and market intelligence operations.
FinCompass is a full-stack data engineering and analytics platform that simulates the Reserve Bank of India's (RBI) consumer protection and market intelligence operations end-to-end. It ingests synthetic grievance records, cleans and structures them into a relational database, applies statistical hypothesis testing and time-series forecasting, trains an NLP classifier on raw complaint text, builds a vector search index for semantic Q&A, and serves everything through an interactive 6-page Streamlit supervisory dashboard β complete with automated PDF/Word/Excel brief generation.
This project was purpose-built to demonstrate the core competencies required for RBI Young Professional (YP) roles in Data Analytics and Policy Research: data pipeline engineering, statistical inference, forecasting, applied ML/NLP, and translating quantitative findings into policy-ready supervisory briefs.
βββββββββββββββββββββββββββββ
β 15,000 Complaints β
β (Synthetic Raw Data) β
ββββββββββββββββ¬βββββββββββββββ
β ETL Pipeline (pandas & NumPy)
βΌ
βββββββββββββββββββββββββββββ
β clean_validate.py β
β (Z-score outliers, DQ) β
ββββββββββββββββ¬βββββββββββββββ
β Ingestion (SQLAlchemy)
βΌ
βββββββββββββββββββββββββββββ
β fincompass.db β
β (SQLite3 Relational DB) β
ββββββββ¬ββββββββββββββ¬βββββββββ
β β
ML & NLP βΌ βΌ Analytics & Time-Series
βββββββββββββββββββββββββ βββββββββββββββββββββββββ
β train_classifier.py β β stats_analysis.py β
β (TF-IDF + LogReg) β β (Welch's t-test, OLS) β
ββββββββββββββ¬βββββββββββ ββββββββββββββ¬βββββββββββ
βΌ βΌ
βββββββββββββββββββββββββ βββββββββββββββββββββββββ
β complaint_classifier β β forecasting.py β
β (Saved .pkl) β β (SARIMA Forecast JSON) β
ββββββββββββββ¬βββββββββββ ββββββββββββββ¬βββββββββββ
β β
βββββββββββββββ¬βββββββββββββββ
βΌ
βββββββββββββββββββββββββββββ
β streamlit_app βββββ RAG Assistant
β (6-Page App) β β
ββββββββββββββββ¬βββββββββββββββ β
β β
βΌ ββββββββββββ΄βββββββββββ
βββββββββββββββββββββββββ β chatbot.py β
β Word / Excel MIS β β (LangChain + Chroma) β
β Generators β ββββββββββββ¬βββββββββββ
βββββββββββββββββββββββββ β
βΌ
βββββββββββββββββββββββ
β Gemini Flash API β
βββββββββββββββββββββββ
| Layer | Technologies | Purpose |
|---|---|---|
| π Core Language | Python 3.10+ | Primary language for pipeline, analytics, and modeling |
| ποΈ Database | SQLite3, SQLAlchemy | Relational storage with window functions, JOINs |
| βοΈ Pipeline | Pandas, NumPy | Structured ETL validation, cleaning, log generation |
| π Statistics | SciPy, StatsModels | Welch's t-test, OLS regression, Mann-Kendall trend test |
| π Time-Series | statsmodels SARIMAX | 6-month seasonal complaint volume forecasting |
| π€ ML / NLP | scikit-learn | TF-IDF pipeline + Multinomial Logistic Regression |
| π§ GenAI / RAG | LangChain, ChromaDB, Gemini Flash | Semantic vector search & Q&A over supervisory briefs |
| π Automation | python-docx, openpyxl, APScheduler | Automated Word briefs, conditional-formatted Excel MIS |
| π¨ Visualization | Plotly, Streamlit | Interactive multi-page dashboard |
Synthetic data is modeled to reflect realistic system loads under the Integrated Ombudsman Scheme, rather than uniform random distributions:
- Market share weighting β SBI accounts for ~20% of complaints, matching its domestic footprint, followed by public sector peers.
- Macroeconomic trends β Digital Banking Fraud is modeled with a 25% YoY compound growth rate, simulating post-COVID digital transaction growth.
- Supervisory discrepancy β Public sector banks are assigned a gamma distribution for
resolution_days, yielding a ~43-day mean (~40% slower than private counterparts).
- Outliers in
resolution_daysflagged via a standard Z-score threshold (Z > 3). - Inconsistencies repaired β e.g.,
resolution_daysset to null for pending complaints, and resolved entries missing day counts filled with the bank type's median. - Full execution steps and metrics exported to
etl/etl_log.txt.
- Welch's t-test β independent two-sample test with unequal variances, comparing public vs. private bank resolution days.
- OLS Regression β predicts resolution days from bank type, channel, and complaint category to isolate systemic friction points.
- Mann-Kendall Test β non-parametric test for a monotonic upward trend in Digital Banking Fraud.
- Python 3.10+
# 1. Clone the repository
git clone https://github.com/yourusername/FinCompass.git
cd FinCompass
# 2. Install dependencies
pip install -r requirements.txt
# 3. Run the end-to-end orchestrator
# (data generation β validation β DB load β ML training β stats β vector store β MIS generation)
python run_all.pyCreate a .env file at the project root:
GEMINI_API_KEY=your_google_studio_api_key_here
If no key is provided, the chatbot gracefully falls back to a local semantic synthesis mode.
streamlit run app/streamlit_app.py| Finding | Statistical Evidence |
|---|---|
| ποΈ Systemic backlogs in public sector banks | Welch's t-test: p < 0.001 (null hypothesis rejected) |
| π± Digital Banking Fraud rising sharply | Mann-Kendall Tau: +0.84, p < 0.0001 |
| π’ Branch-filed complaints add friction | OLS regression: +14.2 days vs. online filings |
I. Institutional Action Plan The persistent gap in grievance redressal velocity between public and private sector banks points to a structural bottleneck in consumer protection. The analysis recommends the Department of Supervision (DoS) mandate specialized workflow automation for public sector banks whose average resolution time exceeds a 45-day threshold, alongside periodic spot audits of internal bank ombudsman frameworks.
II. Mitigation of Digital Transaction Risks Given the statistically validated acceleration in Digital Banking Fraud, the analysis suggests a regulatory update to the Master Direction on Digital Banking Security Controls β including mandatory real-time transaction cooling periods for high-risk accounts and stricter security audits for third-party UPI integrations, with particular focus on Small Finance Banks showing sudden QoQ complaint spikes.
| # | Page | Description |
|---|---|---|
| 1 | Executive Dashboard | High-level KPIs and complaint volume overview |
| 2 | Complaint Deep Dive | Real-time NLP classifier on raw complaint text |
| 3 | DoS Supervisory Monitoring | Bank-level resolution velocity tracking |
| 4 | Heatmap & Geographic Analysis | Regional complaint density visualization |
| 5 | Time-Series Forecasting & Stats | SARIMA forecasts and hypothesis test results |
| 6 | AI Policy Assistant | RAG-powered chat over monthly supervisory briefs |
πΈ Replace this table with actual screenshots/GIFs per page once available β a 2-column image grid works well here.
- Swap synthetic data generator for anonymized real-world grievance datasets
- Add role-based access control for the supervisory dashboard
- Expand forecasting to per-bank and per-region granularity
- CI/CD pipeline for automated model retraining
- Deploy live demo (Streamlit Cloud / Docker)
This project uses entirely synthetic data and is built as an independent portfolio/demonstration project. It is not affiliated with, endorsed by, or representative of official RBI systems, data, or policy positions.
Contributions, issues, and feature requests are welcome! Feel free to check the issues page.
This project is licensed under the MIT License β see the LICENSE file for details.
Built with π‘οΈ for data-driven supervisory intelligence.