Skip to content

skylum1/MutualFunds-Allocation-Planner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Mutual Fund Asset Allocation Planner

An asset allocation tool for Indian mutual fund investors

python version streamlit license

πŸ“‹ Table of Contents

🎯 About

A Python-based investment planning tool inspired by Monika Halan's Framework for Indian mutual fund investors. It provides personalized asset allocation plans based on age, risk profile, and financial goals.

πŸ“· Screenshots

screenshot screenshot screenshot

✨ Features

Core Features

Investment Planning
  • ✨ Age-appropriate strategy selection
  • πŸ“Š Risk-based allocation (Conservative/Moderate/Aggressive)
  • πŸ“ˆ Multiple equity strategies
  • πŸ’° SIP & Lumpsum investment planning
Portfolio Management
  • πŸ”„ Portfolio rebalancing suggestions
  • πŸ“± Interactive visualizations
  • πŸ“„ Downloadable reports (CSV/JSON)
  • ⚑ Real-time calculations

οΏ½ Tech Stack

Core

πŸš€ Getting Started

Prerequisites

  • Python 3.8 or higher
  • pip package manager

Installation

 pip install -r requirements.txt

Step 2: Run the Application

streamlit run streamlit_app.py

The app will automatically open in your default web browser at http://localhost:8501

πŸ’» Usage Guide

Basic Workflow

  1. Fill Profile Information (Left Sidebar)

    • Enter age, monthly income, investment amounts
    • Select allocation method for equity debt percentage split (Risk Profile/Custom)
    • Choose strategies for allocation within equity
    • Check emergency fund and insurance status
  2. Generate Plan

    • Click "πŸš€ Generate Plan" button
    • View personalized allocation instantly
  3. Explore Recommendations

    • Navigate through 2 tabs:
      • Detailed Breakdown: Complete fund allocations
      • Investment Plan: SIP/lumpsum amounts with rebalancing triggers
  4. Export Your Plan

    • Download SIP plan as CSV
    • Download complete plan as JSON

Advanced Usage

Using as Python Library

from asset_allocation_engine import (
    AssetAllocationEngine, 
    UserProfile
)

# Create user profile
profile = UserProfile(
    age=30,
    monthly_income=100000,
    monthly_investment=30000,
    lump_sum_investment=500000,
    has_emergency_fund=True,
    has_adequate_insurance=True
)

# Generate plan
engine = AssetAllocationEngine()
plan = engine.create_plan(
    profile=profile,
    equity_strategy="balanced_growth",
    debt_strategy="long_term",
    add_international=True
)

# Access plan details
print(f"Equity: {plan.equity_percentage}%")
print(f"Debt: {plan.debt_percentage}%")
print(f"Total Funds: {plan.get_total_funds_count()}")

# Export to dict
plan_dict = plan.export_to_dict()

Rebalancing Your Portfolio

Caution

Experimental require development and testing

from asset_allocation_engine import PortfolioRebalancer

# Current portfolio values
current_values = {
    "largecap": 400000,
    "midcap": 150000,
    "smallcap": 180000,
    "fd": 270000
}

# Target allocations from your plan
target_allocations = {
    "largecap": 45.0,
    "midcap": 30.0,
    "smallcap": 25.0,
    "fd": 30.0
}

# Calculate current percentages
rebalancer = PortfolioRebalancer()
current_pct = rebalancer.calculate_current_allocation(current_values)

# Check if rebalancing needed
needs_rebalance, drifted_funds = rebalancer.check_rebalancing_needed(
    current_pct, target_allocations, drift_threshold=5.0
)

if needs_rebalance:
    # Calculate trades required
    trades = rebalancer.calculate_rebalance_trades(
        current_values, target_allocations
    )

    for fund, amount in trades.items():
        action = "BUY" if amount > 0 else "SELL"
        print(f"{action} {fund}: β‚Ή{abs(amount):,.0f}")

πŸ“Š Investment Strategies

πŸ“ˆ Equity Strategies

Strategy Large/Index Mid-Cap Small-Cap Risk Level (Relative) Best For
Index Core 100% - - Low Cost-conscious investors seeking market returns
Market Weighted 70% 20% 10% Low-Moderate Conservative equity investors, age 50+
Balanced Growth 45% 30% 25% Moderate Mid-career (35-50), seeking balanced growth
Aggressive Growth 35% 35% 30% High Young investors (20-35), high risk tolerance

Debt Strategies

Strategy Debt Component Risk Level Best For
Long Term FD 100% FD Very Low Safe, stable returns for long-term goals

Note

Additional debt options based on user profile and goals are planned for future updates.

🀝 Contributing

Contributions welcome! Areas for improvement:

  1. Goal-Based Allocation: Full implementation of goal-specific portfolios
  2. Comprehensive Recommendations: More through recommendations based on user profile
  3. Rebalancing Suggestions: Create rebalancing plan if portfolio allocation deviates beyond specified threshold.

πŸ“ž Support & Feedback

For questions, suggestions, or issues:

  • Create an issue on GitHub
  • Review the code and documentation

πŸ“„ License

This project is open-source and available under the Apache License 2.0.

πŸ“š Resources

πŸ“– Recommended Reading

  • Let's Talk Mutual Funds - Monika Halan (Primary reference for this tool)
  • The Little Book of Common Sense Investing - John Bogle
  • One Up on Wall Street - Peter Lynch
  • The Intelligent Investor - Benjamin Graham

🌐 Useful Websites

Research & Analysis
Investment Platforms
  • Direct Plans: Coin (Zerodha), Kuvera, Groww
  • Advisory: Smallcase, Wright Research

⚠️ Disclaimers

Warning

This tool is for educational purposes only. Always consult financial professionals for personalized advice.

Important Notes
  1. Not Financial Advice

    • This tool provides educational guidance only
    • NOT a substitute for professional financial advice
  2. Market Risk

    • All investments subject to market risk
    • Past performance doesn't guarantee future returns
  3. Professional Guidance

    • Consult SEBI-registered investment advisor
    • Seek tax professional for tax planning
  4. Regular Review

    • Review allocation annually
    • Adjust based on life changes

Remember: The best investment strategy is one you can stick with through market ups and downs. Stay disciplined, stay diversified, and think long-term! πŸš€πŸ’°


Made with ❀️ and AI | © 2025 | Licensed under Apache 2.0

About

πŸ“Š Data-driven mutual fund allocation planner for Indian investors. Input your age, income, risk profile to receive personalized asset allocation recommendations across equity (large/mid/small-cap) and debt funds. Built with Streamlit + Python for offline financial planning.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages