How tirupathic/stock-analysis works
This repository is a financial-markets analysis web app plus scripts for maintaining its market-data and heatmap assets. A user browses index/period heatmaps or uses comparison, news, and calendar views; the app serves pre-generated images rather than generating them. The data workflow maintains index constituents, downloads normalized OHLCV data, and renders heatmaps for later browsing. The README also documents static HTML generation. app.py is only partially excerpted, so feature routing and internal calls beyond the visible evidence are represented conservatively.
Main entry points: app.py Flask app · download_by_index.py Index downloader · yahoo_finance.py Yahoo adapter · __init__.py Source registry
Components 20
Web experience
- Flask app
app.py - Heatmap views
app.py - Static site generator
scripts/generate_static_web.py
Market analysis
- Symbol compare
app.py - News and calendar
app.py - Price charts
app.py - Strategy backtest
app.py - Institution activity
app.py - Heatmap generator
scripts/returns_heatmap.py
Data acquisition
- Symbol refresh
scripts/update_symbols.py - Index downloader
scripts/download_by_index.py - Symbol downloader
scripts/download_data.py - Source registry
scripts/data_sources/__init__.py - OHLCV contract
scripts/data_sources/base.py - Yahoo adapter
scripts/data_sources/yahoo_finance.py
Market assets
- Index symbol lists
symbols - Historical prices
data - Heatmap images
heatmaps
Other components
- Visitor
- Yahoo Finance
Connections 24
- Visitor → Flask app: requests views
README.md - Flask app → Heatmap views: routes heatmaps
README.md - Heatmap views → Heatmap images: serves images
README.md - Visitor → Symbol compare: requests compare
README.md - Visitor → News and calendar: requests feeds
README.md - Flask app → Symbol compare: provides view
app.py - Flask app → News and calendar: provides views
app.py - Visitor → Price charts: requests charts
- Visitor → Strategy backtest: requests backtest
- Visitor → Institution activity: requests activity
- News and calendar → Yahoo Finance: fetches market data
- Symbol refresh → Yahoo Finance: fetches constituents
- Symbol refresh → Index symbol lists: writes lists
scripts/update_symbols.py - Index downloader → Index symbol lists: reads lists
scripts/download_by_index.py - Symbol downloader → Source registry: selects source
scripts/download_data.py - Index downloader → Source registry: selects source
scripts/download_by_index.py - Source registry → Yahoo adapter: creates adapter
scripts/data_sources/__init__.py - Yahoo adapter → OHLCV contract: implements contract
scripts/data_sources/yahoo_finance.py - Yahoo adapter → Yahoo Finance: downloads prices
scripts/data_sources/yahoo_finance.py - Index downloader → Historical prices: writes CSVs
scripts/download_by_index.py - Symbol downloader → Historical prices: writes CSVs
scripts/download_data.py - Historical prices → Heatmap generator: provides inputs
README.md - Heatmap generator → Heatmap images: generates images
README.md - Static site generator → Heatmap images: reads images
scripts/generate_static_web.py