How shubhamprogr/stock-analysis works
The product is an Indian-equities analysis platform: scheduled Python jobs collect market and news data, derive sentiment and predictions, and persist results for a Next.js dashboard. Users explore ticker analysis, comparisons, screening, model accuracy, and trading strategies; reports can also be published to Instagram. The graph preserves documented engine stages and dashboard capabilities. Python internals and most route-to-query connections were not excerpted, so those links rely on the README rather than claims of inspected code.
Main entry points: Dashboard.tsx Dashboard shell · queries.ts Data queries · News_Extractor.py News extraction · Instagram_Publisher.py Report publishing
Components 21
Data ingestion
- Daily market data
Stock Analysis/Stock_Data_Daily.py - Historical market data
Stock Analysis/Stock_Data_5Y.py - News extraction
Stock Analysis/News_Extractor.py - Company data
Stock Analysis/Company_Data.py
Analysis engine
- Article sentiment
Stock Analysis/Sentiment_Analyzer.py - Analysis and prediction
Stock Analysis/Final_Analysis.py - Prediction evaluation
Stock Analysis/Actual_vs_Prediction.py
Web data access
- PostgreSQL
- Data queries
Website/src/lib/queries.ts - Strategy signals
Website/src/lib/signals.ts - Dashboard API
Website/src/app/api
Dashboard
- Dashboard shell
Website/src/components/Dashboard.tsx - Analysis views
Website/src/components - Comparison view
Website/src/components/CompareView.tsx
Publishing
- Report publishing
Stock Analysis/Instagram_Publisher.py - Daily reports
Stock Analysis/Reports.py
Other components
- Investor
- Market data sources
- Financial news sources
- Instagram Graph API
- Cloudinary
Connections 23
- Market data sources → Daily market data: supplies prices
- Market data sources → Historical market data: supplies history
- Financial news sources → News extraction: supplies articles
- News extraction → Article sentiment: scores articles
- Daily market data → PostgreSQL: stores market data
- Historical market data → PostgreSQL: stores history
- News extraction → PostgreSQL: stores news
- Article sentiment → PostgreSQL: stores aggregates
- Company data → PostgreSQL: stores fundamentals
- Analysis and prediction → PostgreSQL: stores predictions
- PostgreSQL → Prediction evaluation: provides actuals
- Analysis and prediction → Prediction evaluation: evaluates forecasts
- PostgreSQL → Data queries: reads data
- Data queries → Strategy signals: builds strategies
Website/src/lib/queries.ts - Investor → Dashboard shell: explores analysis
- Dashboard shell → Dashboard API: requests data
- Dashboard API → Data queries: loads results
Website/src/app/api/compare/route.ts - Data queries → PostgreSQL: queries
Website/src/lib/queries.ts - Dashboard shell → Analysis views: renders views
Website/src/components/Dashboard.tsx - Dashboard shell → Comparison view: renders comparison
Website/src/components/Dashboard.tsx - Daily reports → Report publishing: prepares reports
- Report publishing → Cloudinary: uploads images
- Report publishing → Instagram Graph API: publishes reports