A Streamlit app to estimate whether your retirement goal will be met using monthly SIP in mutual funds and/or lump-sum/recurring investments in stocks.
- Stocks: fetched from Yahoo Finance (
yfinance). - Mutual funds: best-effort scrape from ValueResearch. If scraping fails, upload your own NAV CSV (date, nav).
Disclaimer: Data from web scraping may be blocked or outdated — upload your own NAV CSV as a fallback. This app is for educational purposes only.
- Inputs: age, retirement age, current corpus, target, monthly SIP, start date, MF/Stock split, tickers, stock mode (monthly/lump-sum), fund query, inflation, fees, risk profile.
- Stocks via
yfinancemonthly prices. - Mutual funds via ValueResearch scraping with robots.txt check and 1 req/sec rate limit; CSV upload fallback.
- SIP simulation, lump-sum option for stocks.
- Monte Carlo (500 runs) with mean/std from historical monthly returns; P10/P50/P90 bands.
- Charts: portfolio growth with stacked areas and percentile bands, histogram of final corpus.
- Yearly table of portfolio value, YTD contributions, and returns.
- Exports: timeline CSV. Share scenario JSON.
- Python 3.9+
- Install deps:
pip install -r requirements.txt- Run the app:
streamlit run app.pyINFY.NS, TCS.NS
date,nav
2020-01-01,100.0
2020-02-01,102.0
2020-03-01,95.5
...
A sample file sample_nav.csv is included.
- The site structure can change; scraping might fail or be blocked.
- The app checks robots.txt, uses a clear User-Agent, and limits to ~1 request/second.
- If it fails, please upload a CSV.
Build and run with Docker (optional):
docker build -t retire-rich .
docker run -p 8501:8501 retire-rich- If charts show no data, ensure you provided tickers and/or a NAV CSV.
- If
yfinancefails, try fewer tickers or a later start date. - If scraping fails, upload a NAV CSV.