How svsairevanth/indian-stock-ai-agent works
This is an Indian-market stock-analysis application: a user submits a stock or portfolio question, the web service runs a coordinated analysis, and returns a recommendation with a generated PDF report. The documented analysis spans fundamentals, technicals, sentiment/news, macro conditions, company documents, bull/bear debate, and risk; portfolio review is available when holdings are supplied. The graph emphasizes the web workflow and major analysis capabilities. Some subsystem links rely on README descriptions or source-index references because their implementation excerpts were not provided.
Main entry points: pipeline_orchestrator.py Analysis pipeline · web_server.py Web service · technical_analyst.py Technical analysis · sentiment_analyst.py Sentiment analysis
Components 25
User interface
- Web chat
chat.html - Web service
web_server.py
Analysis workflow
- Analysis pipeline
agents/pipeline_orchestrator.py - Fundamental analysis
agents/fundamental_analyst.py - Technical analysis
agents/technical_analyst.py - Sentiment analysis
agents/sentiment_analyst.py - News intelligence
agents/news_intelligence_agent.py - Macro analysis
agents/macro_analyst.py - Document analysis
agents/document_analyst.py - Bull-bear debate
agents/debate_judge.py - Risk management
agents/risk_manager.py - Portfolio analysis
agents/portfolio_analyst.py
Analysis tools
- Stock data
tools/stock_data.py - Technical indicators
tools/technical_analysis.py - Sentiment scoring
tools/sentiment_analyzer.py - News fetching
tools/news_fetcher.py - Live research
tools/exa_research.py - Macro data
tools/macro_data.py - Company documents
tools/document_analyzer.py - Risk calculations
tools/risk_management.py - Portfolio metrics
tools/portfolio_analyzer.py
Persistence and reports
- PDF report
pdf_generator.py - Application database
app_data.db
Other components
- Investor
- Exa MCP
Connections 27
- Investor → Web chat: submits question
README.md - Web chat → Web service: sends chat
README.md - Web service → Analysis pipeline: runs analysis
web_server.py - Analysis pipeline → Fundamental analysis: invokes analysis
agents/pipeline_orchestrator.py - Analysis pipeline → Technical analysis: invokes analysis
agents/pipeline_orchestrator.py - Analysis pipeline → Sentiment analysis: invokes analysis
agents/pipeline_orchestrator.py - Analysis pipeline → News intelligence: invokes analysis
agents/pipeline_orchestrator.py - Analysis pipeline → Macro analysis: invokes analysis
agents/pipeline_orchestrator.py - Analysis pipeline → Document analysis: invokes analysis
agents/pipeline_orchestrator.py - Analysis pipeline → Bull-bear debate: invokes debate
agents/pipeline_orchestrator.py - Analysis pipeline → Risk management: invokes assessment
agents/pipeline_orchestrator.py - Analysis pipeline → Portfolio analysis: invokes when relevant
README.md - Fundamental analysis → Stock data: fetches metrics
agents/fundamental_analyst.py - Technical analysis → Technical indicators: calculates indicators
agents/technical_analyst.py - Technical analysis → Stock data: fetches prices
agents/technical_analyst.py - Sentiment analysis → News fetching: fetches news
agents/sentiment_analyst.py - Sentiment analysis → Sentiment scoring: scores sentiment
agents/sentiment_analyst.py - News intelligence → Live research: requests research
agents/news_intelligence_agent.py - News intelligence → Sentiment scoring: uses scoring
agents/news_intelligence_agent.py - Live research → Exa MCP: calls MCP
tools/exa_research.py - Macro analysis → Macro data: fetches indicators
agents/macro_analyst.py - Document analysis → Company documents: analyzes filings
agents/document_analyst.py - Risk management → Risk calculations: calculates trade risk
agents/risk_manager.py - Portfolio analysis → Portfolio metrics: analyzes holdings
agents/portfolio_analyst.py - Analysis pipeline → PDF report: generates report
agents/pipeline_orchestrator.py - Web service → Application database: persists history
README.md - Web service → PDF report: serves report
README.md