A comprehensive stock analysis and portfolio management tool built with Python and Streamlit. It provides real-time market data, technical and fundamental analysis, multi-currency portfolio tracking, macro-economic indicators, and exportable research reports.
- Markets — Live watchlist with index overview, scoring, and recommendations
- Portfolio — Multi-currency portfolio tracker (SGD / HKD / USD) with P&L, allocation analysis, rebalancing suggestions, and performance charts
- Stock Analysis — Per-stock deep-dive with technical charts, fundamental metrics, and Excel / PDF export
- Macro Analysis — Fed Funds Rate, GDP, CPI, and PMI with a composite market sentiment score
- Settings — API key management and feature flag toggles
Markets — Watchlist & Index Overview

Stock Analysis — Score, Charts & Metrics

Macro Analysis — Economic Indicators

git clone https://github.com/raymond0208/global-stock-analysis.git
cd global-stock-analysispython -m venv venv
source venv/bin/activate # macOS / Linux
venv\Scripts\activate # Windowspip install -r requirements.txtSome features require external API keys. Copy the example config and fill in your keys:
| Key | Used for | Where to get it |
|---|---|---|
| FRED API key | Macro Analysis page | fred.stlouisfed.org |
| Alpha Vantage key | Alternative data source | alphavantage.co |
Enter keys directly in Settings inside the app, or store them in a local config file (excluded from git).
streamlit run app.pyOpen http://localhost:8501 in your browser.
global-stock-analysis/
├── app.py # Entry point
├── src/
│ ├── main.py # Navigation and session state
│ ├── components/
│ │ ├── stock_pool.py # Markets page
│ │ ├── stock_analysis.py # Stock Analysis page
│ │ ├── portfolio.py # Portfolio page
│ │ ├── macro_analysis.py # Macro Analysis page
│ │ └── settings.py # Settings page
│ ├── models/
│ │ ├── stock_metrics.py # Scoring and fundamental metrics
│ │ └── portfolio_metrics.py # FX-aware portfolio calculations
│ └── utils/
│ └── storage_manager.py # Persistent storage (JSON)
├── data/
│ └── portfolio.example.json # Example portfolio record
├── docs/
│ └── user_guide.md
├── requirements.txt
└── README.md
- Python 3.12+
- Streamlit — UI framework
- yfinance — Live stock and FX data
- Plotly — Interactive charts
- pandas — Data manipulation
- fredapi — FRED economic data
- reportlab — PDF report generation
- xlsxwriter — Excel report generation
See requirements.txt for the full list with pinned versions.
For detailed usage instructions, see the User Guide.
Contributions are welcome. Please open an issue first to discuss what you would like to change, then submit a Pull Request.
Licensed under the Apache License 2.0 — see the LICENSE file for details.
This application is for informational purposes only. Nothing in it constitutes financial advice. Always conduct your own research and consult a qualified financial professional before making investment decisions.
