A full-stack stock portfolio tracking and analysis app built with Python (FastAPI) backend and Flutter frontend. Enter your stocks, buy price, and quantity — get a complete portfolio report with trend analysis, volatility, P&L, and SMA indicators.
![]() |
![]() |
| Single & Multi Stock Input | Analyze Portfolio |
![]() |
![]() |
| Portfolio Overview & P&L | Trend Analysis & Allocation |
- Single & Multi-Stock Analysis — Analyze one stock or an entire portfolio at once
- Portfolio Overview — Total invested, current value, overall P&L and P&L percentage
- Per-Stock Metrics — Current price, buy price, quantity, invested amount, current value
- Volatility & Daily Returns — Daily return percentage, average daily return, and volatility score
- 30D High / Low — 52-week range tracking per stock
- Best & Worst Day — Best and worst single-day return with exact dates
- SMA Trend Analysis — SMA20, SMA50, SMA200 with short-term, momentum, and long-term trend labels
- Portfolio Allocation — Visual weight breakdown of each stock in your portfolio
- History — View past analysis results
| Layer | Technology |
|---|---|
| Backend | Python, FastAPI, yFinance, Pandas, NumPy |
| Frontend | Flutter, Dart, Dio, Provider |
| API | REST (HTTP/JSON) |
cd backend
pip install -r requirements.txt
uvicorn app:app --reload --host 0.0.0.0 --port 8000cd frontend
flutter pub get
flutter runUpdate the
baseUrlinlib/services/api_service.dartto your machine's local IP.
| Method | Endpoint | Description |
|---|---|---|
GET |
/ |
Health check |
POST |
/analyze/single-stock |
Analyze a single stock |
POST |
/analyze/multiple-stock |
Analyze multiple stocks |
POST |
/api/refresh-prices |
Refresh live prices |
POST /analyze/single-stock
{
"stockname": "RELIANCE.NS",
"price": 1200.0,
"quantity": 20
}Current Price,Bought Price,QuantityProfit Loss,Profit Loss PercentageTotal Investment Amount,Current Portfolio ValueVolatility,Daily ReturnsBest Day/Worst Day(date + return %)30D High/30D LowSMA20,SMA50,SMA200Short Term,Momentum,Long Termtrend labelsPortfolio Weight(multi-stock only)
MIT License — open source and free to use.
Built with ❤️ using Flutter & Python



