Historical U.S. stock market cap viewer — browse by GICS sector, any date, Top 100
- 📊 View historical market capitalizations (daily)
- 🏢 Browse by GICS sector classification
- 📅 Select any date to view that day's market cap rankings
- 🔝 Top 100 per sector
- 🔍 Real-time search filtering
- 💾 Export to CSV
(Coming soon)
Download the latest version from Releases, extract and run CapScope.exe.
git clone https://github.com/jigangz/capscope.git
cd capscope
pip install -r requirements.txt
python run_gui.pypython run_gui.py- Select a date and click "Refresh" to load data
- Switch sector tabs to view Top 100 per sector
- Use the search box to filter stocks
- Click "Export CSV" to save data
# Query today's market caps
python -m capscope
# Query a specific date
python -m capscope --date 2024-01-15
# Export to CSV
python -m capscope --date 2024-01-15 --out result.csv
# Export to JSON
python -m capscope --date 2024-01-15 --out result.json --format json
# Filter by sector
python -m capscope --sector Technology --top 50- S&P 500 (~503 stocks)
- Nasdaq 100 (~101 stocks)
- ~550 unique stocks after deduplication
Market Cap ≈ Current Shares Outstanding × Historical Close Price
⚠️ V1 uses an approximate algorithmSince current shares outstanding are used for historical calculations, there are known approximation errors:
- Stock splits: Historical prices are adjusted, but shares use current count → historical market cap skews high
- Share issuance: Historical actual float was less than current → skews high
- Buybacks: Historical actual float was more than current → skews low
Exact historical market cap requires a paid API (planned for V2 via Polygon.io)
pip install pyinstaller
pyinstaller CapScope.spec
# or
build.batOutput: dist/CapScope.exe
chmod +x build.sh
./build.sh- Python 3.10+
- yfinance (data)
- PyQt6 (GUI)
- PyInstaller (packaging)
- V1: Data contract, stock universe, core calculation, GUI, packaging
- V2: Exact historical market cap (Polygon.io)
- Local caching (reduce API calls)
- Offline mode
- Auto-update stock universe
- Chart visualizations
Q: Slow startup? A: First launch needs to extract temp files, ~10-30 seconds.
Q: Data loading fails? A: Check network connection and access to Yahoo Finance.
Q: Some stocks show N/A? A: No trading data or missing metadata for that stock on the selected date.
Q: What about non-trading days? A: Automatically falls back to the most recent prior trading day.
MIT