- π― Project Overview
- π Live Web Application (Bonus Task)
- π Day 1: Data Ingestion, API Integration & Quality Validation
- π οΈ Day 2: Data Cleaning & SQL Database Design
- π Day 3: Exploratory Data Analysis & Business Insights
- π Day 4: Fund Performance Analytics
- π Day 5: Dashboard Development (Power BI)
- π§ Day 6: Advanced Analytics & Risk Metrics
- π Day 7: Pipeline Automation, Code Standardization & Final Submission
- π Day 8-9: Advanced Bonus Tasks & Enterprise Automation
- ποΈ System Architecture & Data Flow
- π Analytical Metrics Engine
- π₯οΈ Interactive Dashboard Architecture
- π Repository Structure
- π οΈ Execution & Setup Guide
- π Final Deliverables
- π License
This repository contains the completed Capstone Project for the Bluestock Fintech Data Analytics Internship.
The goal of this project is to build an end-to-end Mutual Fund Analytics Platform using real-world public data from AMFI India and mfapi.in.
This README documents the progressive completion of daily milestones, moving from raw data ingestion to structured data engineering, analytics, dynamic Power BI Dashboards, advanced Python recommender systems, and final production automation.
Phases Completed: Day 1 β’ Day 2 β’ Day 3 β’ Day 4 β’ Day 5 β’ Day 6 β’ Day 7 β’ Day 8-9 (Bonus)
Status: Completed & Deployed
As an extra-mile initiative, the analytical engine has been deployed as a publicly accessible, interactive web application.
π Launch Bluestock Analytics Pro (Live App)
Premium Features Integrated:
- Institutional-grade dark-themed UI with custom glassmorphism CSS.
- Real-time Multi-Fund Relative Performance Tracking (Base 100 Indexing).
- 50-Day Simple Moving Average (SMA) Momentum Indicators.
- Dynamic SQLite Database connectivity with smart CSV fallbacks via Absolute Path Resolution.
- Initialized a standard data science folder structure (
data/raw,data/processed,notebooks,scripts,sql,dashboard,reports). - Set up a virtual environment and installed core dependencies listed in
requirements.txt(Pandas, Requests, NumPy, etc.).
- Successfully loaded 10 extensive real-world CSV datasets provided by Bluestock (comprising 40 schemes, 4.5 years of NAV history, and 87K+ transaction rows).
- Evaluated dataset schemas, shapes, and data types to prepare for downstream transformation.
- Developed an automated Python script (
scripts/live_nav_fetch.py) to interact with the publicmfapi.inREST API. - Dynamically fetched live NAV data for 6 critical benchmark schemes:
- HDFC Top 100 Direct (125497)
- SBI Bluechip (119551)
- ICICI Bluechip (120503)
- Nippon Large Cap (118632)
- Axis Bluechip (119092)
- Kotak Bluechip (120841)
- Conducted preliminary exploration of the
01_fund_master.csvdataset. - Extracted and mapped unique Fund Houses, Categories, Sub-categories, and Risk Grades to understand the AMFI scheme code structure.
- Executed a strict validation protocol to ensure cross-dataset integrity.
- Confirmed a 100% match by validating that every AMFI scheme code present in the
fund_masterdataset flawlessly aligns with the historical records in thenav_historydataset.
- NAV History: Parsed dates, sorted records by scheme, removed duplicates, and implemented critical forward-filling (
ffill) logic to handle missing NAV values during weekends and market holidays. - Transactions: Standardized transaction types (SIP, Lumpsum, Redemption), validated positive investment amounts, fixed date formats, and filtered valid KYC statuses.
- Scheme Performance: Validated numeric return values, flagged risk anomalies (e.g., negative Sharpe ratios), and enforced acceptable expense ratio ranges.
- Exported all cleaned datasets to the
data/processed/directory.
- Designed a professional analytical Star Schema with dimension tables (
dim_fund,dim_date) and fact tables (fact_nav,fact_transactions,fact_performance,fact_aum). - Authored strict DDL statements (
sql/schema.sql) defining Primary Keys and Foreign Keys for data integrity.
- Created an automated Python pipeline using
SQLAlchemyto generate a local SQLite database (bluestock_mf.db). - Iteratively mapped, transformed, and loaded tens of thousands of processed records from Pandas DataFrames directly into the structured SQL tables.
- Authored 10 business-critical SQL queries (
sql/queries.sql) to extract insights such as:- Top 5 Fund Houses by AUM.
- Average NAV trends per month.
- Total SIP Amount by Year (YoY Growth).
- Transaction volumes distributed by Fund Category.
- Created a comprehensive Data Dictionary (
data_dictionary.md) documenting all tables, columns, data types, and business logic to ensure project maintainability.
- Plotted the daily NAV trend for 40 schemes (2022-2026), successfully highlighting the 2023 bull run and 2024 market corrections using
Plotly. - Visualized monthly SIP inflow trends, dynamically annotating the all-time high of βΉ31,002 Cr.
- Charted the mutual fund industry's folio count growth showing an increase from 13.26 Cr to 26.12 Cr.
- Developed grouped bar charts to analyze AUM growth by fund house, highlighting SBI's dominance (~12.5L Cr).
- Created a Seaborn heatmap to track net inflow intensity across different fund categories over time.
- Built a sector allocation donut chart showing heavy investments in the Banking, IT, and Pharma sectors.
- Analyzed the investor base using interactive pie charts to show age group distribution (majority 26-35) and gender split.
- Designed box plots to observe SIP ticket size distribution across different age groups.
- Mapped geographic distribution with horizontal bar charts for state-wise SIP contributions and a T30 vs B30 city tier breakdown.
- Computed a pairwise correlation matrix of daily returns for 10 selected funds and visualized it using a Seaborn heatmap to understand scheme dependencies and market movement similarities.
- Documented 10 key EDA findings bridging data visualizations with actionable business insights directly within the Jupyter Notebook (
03_EDA_Analysis.ipynb). - Exported 15+ interactive and static charts to the
reports/directory for final presentation preparation.
- Computed Daily Returns for all 40 schemes and validated the normal distribution of returns.
- Calculated the Compound Annual Growth Rate (CAGR) for 1-Year, 3-Year, and 5-Year horizons.
- Calculated annualized return and volatility metrics.
- Computed the Sharpe Ratio (using a 6.5% risk-free rate) to measure risk-adjusted returns.
- Computed the Sortino Ratio focusing solely on downside risk.
- Identified the Maximum Drawdown (MDD) for each fund to assess maximum historical loss.
- Utilized
scipy.stats.linregressto perform an OLS regression of fund returns against the market benchmark. - Extracted annualized Alpha (excess return over market) and Beta (market volatility correlation).
- Built a robust 0-100 Fund Scorecard system by applying strategic weights:
- 30% for 3Y CAGR
- 25% for Sharpe Ratio
- 20% for Alpha
- 15% for Expense Ratio (Inverse)
- 10% for Max Drawdown (Inverse)
- Ranked and identified the Top 10 mutual funds in the dataset based on this composite score.
- Visualized the Top 5 best-performing funds against the Market Benchmark over a 3-year cumulative growth period.
- Computed the Tracking Error to measure how closely the funds follow the benchmark index.
- Exported analytical results (
alpha_beta.csv,fund_scorecard.csv) and visualizations (benchmark_comparison.png) to thereports/directory.
- Imported processed CSV files and benchmark indices into Power BI to construct a comprehensive, interactive data model.
- Designed dynamic KPI cards highlighting Total AUM (βΉ81L Cr), Monthly SIP Inflows (βΉ31K Cr), and Industry Folios (26.12 Cr).
- Visualized historical AUM growth trends and top 10 dominant fund houses.
- Built an interactive Risk vs. Reward scatter plot (Return vs. Volatility).
- Integrated the custom 0-100 Fund Scorecard as a sortable matrix.
- Created comparative NAV line charts with drill-through capabilities.
- Visualized demographic insights including transaction volume by state and age-group SIP averages.
- Developed a Donut chart comparing SIP, Lumpsum, and Redemption distributions.
- Developed a dual-axis chart correlating monthly SIP inflows with the Nifty 50 index movement.
- Built a Matrix Heatmap to track category-wise capital inflows over time.
- Implemented Top N filtering to showcase the most invested fund categories in FY25.
- Exported the finalized, branded dashboard as
bluestock_mf_dashboard.pbix. - Generated a comprehensive multi-page
Dashboard.pdfand high-resolution PNG snapshots for final reporting.
- Computed Historical Value at Risk (VaR) at a 95% confidence interval to determine the maximum expected daily loss for each fund.
- Calculated Conditional VaR (CVaR) to measure the average loss in worst-case scenarios.
- Visualized the 90-Day Rolling Sharpe Ratio for top 5 funds to observe dynamic changes in risk-adjusted returns over time.
- Cohort Analysis: Grouped investors by their first transaction year (2024 vs. 2025). Discovered that while 2024 had higher total investments, the 2025 cohort showed a higher average SIP amount (βΉ13,505 vs βΉ10,996).
- SIP Continuation Risk: Analyzed transaction gaps for investors with 6+ SIPs. Successfully flagged investors with average gaps exceeding 35 days as 'at-risk' for potential churn.
- Applied the Herfindahl-Hirschman Index (HHI) on portfolio holdings to assess sector concentration.
- Identified and visualized the Top 10 most concentrated (high-risk) funds, highlighting vulnerabilities to specific sector downturns.
- Built an interactive Python script (
scripts/recommender.py) to simulate a robo-advisor. - The system takes user Risk Appetite (Low / Moderate / High) as input and dynamically recommends the Top 3 mutual funds utilizing the Sharpe Ratio and matching risk grades.
- Engineered a centralized execution master controller script (
run_pipeline.py) located at the project root folder. - Utilizes dynamic workspace Absolute Path Resolution (
os.path.abspath(__file__)) to reliably map and run the dynamic data ingestion sequence irrespective of the user's execution terminal environment. - Implemented professional subprocess handling using
subprocess.runwith strictCalledProcessErrorexceptions to isolate syntax or network latency bottlenecks during real-time extraction.
- Standardized directory hygiene by reviewing, structuring, and deploying custom, standalone
README.mddescriptive files across all 6 submodules (data/,notebooks/,scripts/,sql/,dashboard/,reports/). - Clarified downstream asset visibility including Star Schema environments, Power BI structures, specific quantitative
.csvresults, and execution orders.
- Compiled and formatted the Comprehensive Final Report (
Final_Report.pdf,Final_Report.docx) in thereports/folder, neatly detailing Executive Summaries, Star Schema performance, advanced risk matrices, and Power BI navigation logs. - Produced the comprehensive 12-Slide Presentation Deck (
Bluestock_MF_Presentation.pptx) utilizing an optimized fintech visual palette layout to effectively pitch strategic business discoveries and automated risk rebalancing methodologies to core stakeholders.
- Developed a secure Python script integrating
smtplibandemail.mimefor automated weekly performance report generation. - Configured dynamic HTML template embedding SQLite-derived tables and inline cryptographic images (MIMEImage) for executive delivery.
- Implemented
.envcredential management viapython-dotenvto ensure secure pipeline integrations without exposing application passwords.
- Engineered a persistent system "Watchdog" utilizing the
schedulelibrary to automate thelive_nav_fetch.pypipeline. - Designed with intelligent datetime logic to execute exclusively on weekdays at 8:00 PM, bypassing weekends to align with market hours.
- Integrated seamlessly with OS-level Task Schedulers (Windows Task Scheduler) for uninterrupted background execution on boot.
- Engineered a predictive mathematical model using NumPy to forecast 5-year future Net Asset Value (NAV) trajectories.
- Executed 1,000 independent statistical simulations based on historical volatility and return metrics.
- Visualized 'Uncertainty Bands' extracting 5th, 50th, and 95th probability percentiles to map risk-adjusted market outcomes and exported the analysis to the
reports/directory.
- Deployed a portfolio optimization algorithm based on Modern Portfolio Theory (Markowitz Efficient Frontier).
- Utilized
scipy.optimizeto mathematically maximize the Sharpe Ratio and deduce the optimal percentage allocation mix across top-performing funds. - Simulated 10,000 distinct portfolio configurations to visualize the risk-reward tradeoff spectrum, plotting the ultimate Efficient Frontier curve for institutional reporting.
- Engineered a full-stack, publicly accessible mutual fund analytics dashboard using Streamlit.
- Implemented institutional-grade dark-themed UI, custom glassmorphism CSS, and real-time Multi-Fund Relative Performance Tracking (Base 100 Indexing).
- Successfully deployed the application to Streamlit Community Cloud with dynamic SQLite Database connectivity and smart CSV fallbacks via Absolute Path Resolution.
βββββββββββββββββββββββββββββββββββββββββ
[Raw AMFI Ingestion Layer] [Dynamic Live REST API]
β β
βΌ βΌ
(Pandas Data Cleaning) (scripts/live_nav_fetch.py)
β β
βββββββββββββββββββββ¬ββββββββββββββββββββ
β
βΌ
[SQLAlchemy ETL Engine]
β
βΌ
[Structured Star Schema Warehouse: SQLite DB]
ββββββββββββββββββββββββββββββββββββββββββββββ
β Dimensions : dim_fund, dim_date, dim_user β
β Facts : fact_nav, fact_transactions, β
β fact_performance β
βββββββββββββββββββββββ¬βββββββββββββββββββββββ
β
βββββββββββββββββββββββΌββββββββββββββββββββββββ
βΌ βΌ βΌ
[Jupyter Analytics] [Power BI BI Engine] [Robo Recommender App]
π Advanced Risk(VaR) π Multi-page Dashboards βοΈSharpe-driven Risk
π Concentration(HHI) π Drill-through Insights Mapping CLI Tool
| Metric Layer | Statistical Implementation | Operational Purpose |
|---|---|---|
| CAGR | (End Value / Start Value)^(1/n) - 1 | Compounded annualized growth rate evaluation |
| Sharpe Ratio | (Rp - Rf) / Οp | Reward-to-volatility performance measurement |
| Alpha & Beta | Rp = Ξ± + Ξ²Rm + Ξ΅ | Market benchmark regression analysis |
| Value at Risk (VaR) | 5th Percentile (Historical Distribution) | Captures extreme downside risk exposure |
| HHI Index | Ξ£(SiΒ²) | Measures sector concentration risk |
Note: GitHub Markdown does not natively render LaTeX equations inside tables. Formula notation has been simplified for proper display.
The Power BI visualization layout contains four strategic analytic portals engineered for executive stakeholders:
- Industry Overview (Portal 1): Real-time monitoring matrix evaluating macro KPIs, underlying growth curves, and market share distribution maps across dominant asset management houses.
- Fund Performance Matrix (Portal 2): Advanced portfolio tracking layout featuring interactive scatter visuals alongside custom 0-100 composite index matrixes.
- Investor Behavioral Trends (Portal 3): Demographic profiling tracking regional volume distribution, city tiers, and redemption flow metrics.
- Market Inflow Dynamics (Portal 4): Dual-axis tracking environments correlating underlying mutual fund growth lines with structural financial market indicators over time.
π¦bluestock_mf_capstone
β£ πdata
β β£ πraw # Immutable source assets & live API extractions
β β β£ π01_fund_master.csv
β β β£ π02_nav_history.csv
β β β£ π... (Other raw datasets)
β β β π125497_HDFC_TOP_100_live.csv
β β£ πprocessed # Standardized, cleaned, and filled datasets
β β β£ πclean_nav_history.csv
β β β πclean_transaction.csv
β β£ πdb # SQLite Star Schema warehouse engine
β β β πbluestock_mf.db
β β πREADME.md
β£ πnotebooks # Sequential pipeline processing environments
β β£ π01_data_ingestion.ipynb
β β£ π02_data_cleaning.ipynb
β β£ π03_EDA_Analysis.ipynb
β β£ π04_Performance_Analytics.ipynb
β β£ π05_Advanced_Analytics.ipynb
β β πREADME.md
β£ πscripts # Production automation & execution apps
β β£ πlive_nav_fetch.py
β β£ πrecommender.py
β β£ πsend_email_report.py # Automated Executive Email Script
β β£ πscheduler.py # Background Watchdog automation task
β β£ πmonte_carlo.py # 5-Year Predictive Simulation Engine
β β£ πportfolio_optimization.py # Markowitz Efficient Frontier Engine
β β πREADME.md
β£ πsql # Structural warehouse creation logic
β β£ πschema.sql
β β£ πqueries.sql
β β πREADME.md
β£ πdashboard # Front-end business intelligence binaries
β β£ πbluestock_mf_dashboard.pbix
β β πREADME.md
β£ πreports # Exported analytical metrics, visuals & PDFs
β β£ π*.png (14+ EDA, Dashboard & Adv. Analytics visuals)
β β£ π*.csv (Scorecards, VaR, HHI, Cohort & Optimization Data)
β β£ πDashboard Export.pdf
β β£ πFinal_Report.pdf/docx
β β πREADME.md
β£ πstreamlit_app.py # Premium Streamlit Web Dashboard
β£ πrequirements.txt # Standard system dependencies
β£ πdata_dictionary.md # Warehouse data model catalog
β£ πrun_pipeline.py # Absolute path automation master controller
β πBluestock_MF_Presentation.pptx # Fintech investment presentation deck
Initialize a shell platform inside your target workstation path, fetch the production repository, and activate the Python dependency environment:
# Clone the repository
git clone https://github.com/Hashmil-Muhammed/Bluestock-Data-Analyst-Internship/tree/main/bluestock_mf_capstone
cd bluestock_mf_capstone
# Install dependencies
pip install -r requirements.txtExecute the root orchestration file. This handles dynamic absolute directory discovery, ensures structural alignment, and triggers live REST API endpoints automatically:
python run_pipeline.pyLaunch the interactive terminal-based tool to evaluate mutual fund schemes dynamically against individual risk parameters:
python scripts/recommender.py- Navigate into the
notebooks/workspace and execute files01through05sequentially. - Open
dashboard/bluestock_mf_dashboard.pbixusing Power BI Desktop to explore interactive visualizations and performance insights.
- π
Bluestock_MF_Capstone_Project.pdf - π
Bluestock_MF_Presentation.pptx - π
bluestock_mf_dashboard.pbix - π
Final_Report.pdf - ποΈ
bluestock_mf.db - π
fund_scorecard.csv - π
alpha_beta.csv - π
var_cvar_reports.csv - π
sector_hhi.csv - π
cohort_analysis.csv
This project was developed as part of the Bluestock Fintech Data Analytics Internship Capstone Project and is intended for educational and portfolio purposes.