{"id":27261454,"url":"https://github.com/thesangamx/portfolio-optimizer","last_synced_at":"2026-04-28T18:32:09.311Z","repository":{"id":287250767,"uuid":"964070370","full_name":"TheSangamX/portfolio-optimizer","owner":"TheSangamX","description":"Portfolio Optimizer is a Streamlit-based web application that helps users optimize their stock portfolios using historical data and the Sharpe Ratio. It supports both global and Indian stock tickers and provides visualizations, expected return, volatility, and Sharpe ratio for the optimal portfolio.","archived":false,"fork":false,"pushed_at":"2025-04-10T19:13:00.000Z","size":1923,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-10T19:47:38.959Z","etag":null,"topics":["portfolio-optimization","python","sharpe-ratio","stock-market","streamlit"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TheSangamX.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-04-10T16:36:29.000Z","updated_at":"2025-04-10T19:13:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"bc11b1c9-0919-4d6a-b81c-d08316175db5","html_url":"https://github.com/TheSangamX/portfolio-optimizer","commit_stats":null,"previous_names":["thesangamx/portfolio-optimizer"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheSangamX%2Fportfolio-optimizer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheSangamX%2Fportfolio-optimizer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheSangamX%2Fportfolio-optimizer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheSangamX%2Fportfolio-optimizer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TheSangamX","download_url":"https://codeload.github.com/TheSangamX/portfolio-optimizer/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248347780,"owners_count":21088742,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["portfolio-optimization","python","sharpe-ratio","stock-market","streamlit"],"created_at":"2025-04-11T05:31:58.192Z","updated_at":"2026-04-28T18:32:09.281Z","avatar_url":"https://github.com/TheSangamX.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"banner.png\" alt=\"Portfolio Optimizer Banner\" width=\"100%\" /\u003e\n\u003c/p\u003e\n\n\n\n\nPortfolio Optimizer is a Streamlit-based web app that helps users optimize their stock portfolios using historical price data and the Sharpe Ratio.\n📈 Supports both Indian (e.g., TCS.NS) and global (e.g., AAPL) stocks.\n📊 Visualizes optimized weights, expected returns, volatility \u0026 Sharpe Ratio using interactive charts.\n\n\n# 📈 Portfolio Optimizer\n\nA Streamlit web app to optimize a stock portfolio using the Sharpe Ratio.  \nSupports both Indian (e.g., HDFCBANK.NS) and US/global stocks (e.g., AAPL, MSFT).\n\n## 🔧 Features\n\n- 📥 Fetches historical stock data from Yahoo Finance  \n- 📅 Choose custom date range  \n- 📊 Calculates:\n  - Expected annual return\n  - Portfolio volatility\n  - Sharpe Ratio\n  - Optimal stock weights  \n- 📉 Visualizes portfolio allocation\n\n## 📌 How to Use\n\n1. Enter stock tickers separated by comma  \n   Example: `AAPL, MSFT, GOOGL, HDFCBANK.NS`  \n2. Select start and end dates  \n3. Click **Optimize Portfolio**\n\n## 🚀 Run Locally\n\n```bash\ngit clone https://github.com/TheSangamX/portfolio-optimizer.git\ncd portfolio-optimizer\npip install -r requirements.txt\nstreamlit run streamlit_app.py\n🧾 Files Included\nstreamlit_app.py – Streamlit web app\n\nmain.py – (Optional core logic file)\n\nrequirements.txt – Required Python packages\n\nREADME.md – App documentation\n\n📌 Notes\nAdd .NS suffix for Indian stocks (e.g., TCS.NS, RELIANCE.NS)\n\nApp uses Yahoo Finance (via yfinance) for data\n\nEnsure internet connection when fetching live data\n\nMade with ❤️ by Sangam Gupta\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthesangamx%2Fportfolio-optimizer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthesangamx%2Fportfolio-optimizer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthesangamx%2Fportfolio-optimizer/lists"}