Spaces:
Sleeping
Sleeping
File size: 2,532 Bytes
1cdac12 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 |
---
title: NSE Portfolio Optimizer Pro
emoji: π
colorFrom: blue
colorTo: purple
sdk: streamlit
sdk_version: "1.51.0"
app_file: app.py
pinned: false
license: mit
python_version: "3.11"
---
# π NSE Portfolio Optimizer Pro
**Real-time Portfolio Optimization for Indian Stock Market**
Built with Modern Portfolio Theory and advanced analytics.
## β¨ Features
### Portfolio Selection
- π **Live NIFTY 50** - Auto-fetched current constituents
- π― **7 Sector Categories** - Banking, IT, FMCG, Pharma, Energy, Auto, Metals
- β¨ **Custom Portfolio** - Add your own stocks
### Advanced Analytics
- π² **Monte Carlo Simulation** - 1000+ scenario analysis
- β οΈ **Value at Risk (VaR)** - Downside risk quantification
- π **Efficient Frontier** - Interactive risk-return visualization
- π **Rolling Metrics** - Time-series performance analysis
- π **Drawdown Analysis** - Peak-to-trough decline tracking
- π **Risk Contribution** - Individual stock risk breakdown
### Real-Time Data
- πΉ **Live Market Data** - Current prices, volumes, 52-week ranges
- π·οΈ **Automatic Sector Detection** - Using yfinance API
- π **Smart Caching** - Fast performance with fresh data
### Interactive Results
- 6 analysis tabs with professional visualizations
- Export CSV reports for further analysis
- Mobile-responsive interface
## π How to Use
1. **Select Portfolio Mode**
- Live NIFTY 50
- Sector Focus (7 categories)
- Custom Selection
2. **Configure Investment**
- Investment amount (βΉ)
- Historical data period
- Risk parameters
3. **Analyze Results**
- Allocation by sector
- Efficient frontier plot
- Monte Carlo scenarios
- Risk metrics
- Rolling performance
- Live market data
## π Technologies
- **Streamlit 1.51.0** - Web framework
- **yfinance** - Market data
- **CVXPY** - Portfolio optimization
- **Plotly** - Interactive charts
- **NumPy/Pandas** - Data processing
- **SciPy** - Statistical analysis
## π Methodology
**Modern Portfolio Theory (Markowitz, 1952)**
- Mean-Variance Optimization
- Sharpe Ratio Maximization
- Efficient Frontier Construction
- Monte Carlo Risk Simulation
## β οΈ Disclaimer
**Educational purposes only.** This tool is for learning and research. It does not constitute financial advice. Always consult a qualified financial advisor before making investment decisions. Past performance does not guarantee future results.
## π License
MIT License
---
**Built with β€οΈ for Indian Stock Market Investors** |