How nikunjbaheti/all_mf_holdings works
This repository builds a mutual-fund holdings dataset from Rupeevest data. The main workflow obtains scheme codes, fetches and transforms holdings and fund information, writes intermediate CSVs, then joins those files into a stock-level output. auto_run.py provides a script runner for the code-fetch and holdings stages. The excerpts establish these relationships, but do not expose all of Holdings.py’s loading and retry internals; the scheme-code input link is therefore marked unverified.
Main entry points: Holdings.py Fetch holdings · merged_df.py Enrich and merge · MFCode.py Fetch scheme codes · auto_run.py Script runner
Components 13
Data collection
- Scheme search API
- Fetch scheme codes
MFCode.py - Scheme codes
MFCodes.csv - Fetch holdings
Holdings.py - Portfolio API
- Fund information
fund_info.csv - Stock holdings
stock_data.csv - Stock mapping
stock_mapping.csv - Stock mapping input
stock_mapping.csv
Dataset transformation
- Enrich and merge
merged_df.py - Enriched holdings
final_stock_data.csv
Run coordination
- Script runner
auto_run.py
Other components
- Operator
Connections 14
- Operator → Script runner: runs
auto_run.py - Script runner → Fetch scheme codes: runs
auto_run.py - Script runner → Fetch holdings: runs
auto_run.py - Fetch scheme codes → Scheme search API: requests search data
MFCode.py - Fetch scheme codes → Scheme codes: writes codes
MFCode.py - Scheme codes → Fetch holdings: supplies scheme codes
- Fetch holdings → Portfolio API: fetches portfolios
Holdings.py - Fetch holdings → Fund information: writes fund data
Holdings.py - Fetch holdings → Stock holdings: writes holdings
Holdings.py - Fetch holdings → Stock mapping: writes mappings
Holdings.py - Stock holdings → Enrich and merge: reads holdings
merged_df.py - Fund information → Enrich and merge: reads fund data
merged_df.py - Stock mapping → Enrich and merge: reads mappings
merged_df.py - Enrich and merge → Enriched holdings: writes enriched data
merged_df.py