Skip to content

crystalmaith/retirement-planner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Retire Rich Planner

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.

Features

  • 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 yfinance monthly 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.

Install & Run

  1. Python 3.9+
  2. Install deps:
pip install -r requirements.txt
  1. Run the app:
streamlit run app.py

Example tickers

  • INFY.NS, TCS.NS

Sample NAV CSV format

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.

Notes on ValueResearch scraping

  • 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.

Optional: Docker

Build and run with Docker (optional):

docker build -t retire-rich .
docker run -p 8501:8501 retire-rich

Troubleshooting

  • If charts show no data, ensure you provided tickers and/or a NAV CSV.
  • If yfinance fails, try fewer tickers or a later start date.
  • If scraping fails, upload a NAV CSV.

About

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.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors