# MF Portfolio Analyzer: Holdings Change Analysis

Automated two-period mutual fund holdings analysis with data quality checks, ISIN standardization, and human-in-the-loop corrections. Smart file import with auto-detection, automatic 2-period detection, and dynamic report generation.

## Links
- App: https://app.tigzig.com/mf-portfolio-processor
- Video Guide: https://youtu.be/U7RwHxRkOao
- Blog Post: https://www.tigzig.com/post/new-open-source-tool-mutual-funds-holdings-analyzer-python-in-excel-xlwings-lite-now-live

## Tags
python-in-excel, xlwings-lite, mutual-funds

## Download
- Excel Workbook (.xlsm): https://www.tigzig.com/files/xlwings/XLWINGS_PORTFOLIO_ANALYZER.xlsm

## What It Does
- Smart file import: auto-detects CSV/TXT/pipe-delimited formats
- 2-period detection: auto-identifies latest two months from data
- Automatic ISIN name standardization and deduplication
- Data quality validation reports
- Human-in-the-loop correction workflow for ISIN mapping
- Summary analysis tables with holdings changes
- Automated Top 10 holdings charts

### Prerequisite
Requires standardized text files. Use MF File Converter (https://app.tigzig.com/mf-files-ai) first if you have raw Excel files from mutual fund statutory disclosures.

### 3-Step Workflow

**Smart Detection**
- File import: auto-detects CSV/TXT/pipe formats
- 2-period detection: identifies latest two months automatically

**ISIN Standardization**
- Handles name variations (HDFC, HDFC Bank Ltd, etc.)
- Selects best name for each ISIN
- Name truncation to identify conflicts

**Human-in-the-Loop**
- Namecut_Exceptions and Multiple_ISINs reports
- User edits ISIN_Mapping for accuracy
- Stage 2 uses corrected mappings for final analysis

### How to Use
1. Convert raw MF files using MF File Converter
2. Download app and install xlwings Lite
3. Click "Import Data" on Control Sheet
4. Run Stage 1: review ISIN_Mapping sheet
5. Manual correction: fix grouping issues if needed
6. Run Stage 2: generate final analysis
7. View results in Summary_Analysis and Charts

## Resources
- xlwings Lite: https://lite.xlwings.org
- xlwings Documentation: https://docs.xlwings.org/en/latest/
