How rabilkhan786/financial-agent-crew works
This is a financial research app: a user submits a ticker and date range through Streamlit, and receives an analysis report with charts and a PDF. The workflow validates the ticker, gathers market context, analyzes company fundamentals and price performance, writes a report, then reviews it and may send market or fundamentals work back for revision. Python computes financial metrics; LLM calls explain and review results. Edges follow README workflow documentation and shown source references; unsampled modules are represented only where documented capabilities support them.
Main entry points: graph.py LangGraph workflow · fundamentals_analyst.py Fundamentals analyst · orchestrator.py Orchestrator · market_researcher.py Market researcher
Components 24
User interfaces
- Streamlit UI
app.py - FastAPI API
api.py
Analysis workflow
- LangGraph workflow
src/core/graph.py - Orchestrator
src/agents/orchestrator.py - Market researcher
src/agents/market_researcher.py - Fundamentals analyst
src/agents/fundamentals_analyst.py - Data analyst
src/agents/data_analyst.py - Report writer
src/agents/report_writer.py
Research and calculations
- Market data
src/tools/market_data.py - Financial statements
src/tools/statements.py - News retrieval
src/tools/news.py - Social sentiment
src/tools/social.py - Fundamental ratios
src/tools/ratios.py - Price KPIs
src/tools/kpi.py
Report delivery
- Chart generation
src/utils/charts.py - PDF report
src/utils/report_pdf.py - Report serialization
src/utils/serialization.py
Shared services
- LLM client
src/core/llm.py - Configuration
src/components/config.py - Logging
src/components/logging.py - Metric formatting
src/utils/formatting.py
Other components
- Investor/researcher
- Yahoo Finance
- StockTwits
Connections 31
- Investor/researcher → Streamlit UI: enters ticker
README.md - Streamlit UI → FastAPI API: submits analysis
README.md - FastAPI API → LangGraph workflow: starts workflow
README.md - LangGraph workflow → Orchestrator: dispatches intake
src/core/graph.py - Orchestrator → Market data: validates ticker
src/agents/orchestrator.py - LangGraph workflow → Market researcher: dispatches research
src/core/graph.py - Market researcher → News retrieval: fetches headlines
src/agents/market_researcher.py - Market researcher → Social sentiment: fetches sentiment
src/agents/market_researcher.py - News retrieval → Yahoo Finance: retrieves news
README.md - Social sentiment → StockTwits: retrieves posts
README.md - LangGraph workflow → Fundamentals analyst: dispatches analysis
src/core/graph.py - Fundamentals analyst → Financial statements: fetches statements
src/agents/fundamentals_analyst.py - Fundamentals analyst → Market data: fetches prices
src/agents/fundamentals_analyst.py - Fundamentals analyst → Fundamental ratios: calculates ratios
src/agents/fundamentals_analyst.py - LangGraph workflow → Data analyst: dispatches metrics
src/core/graph.py - Data analyst → Market data: fetches prices
README.md - Data analyst → Price KPIs: calculates performance
README.md - LangGraph workflow → Report writer: dispatches report
src/core/graph.py - Report writer → Orchestrator: returns report
README.md - LangGraph workflow → Orchestrator: dispatches review
src/core/graph.py - Orchestrator → Market researcher: routes revision
src/core/graph.py - Orchestrator → Fundamentals analyst: routes revision
src/core/graph.py - Orchestrator → LLM client: requests review
src/agents/orchestrator.py - Market researcher → LLM client: summarizes context
src/agents/market_researcher.py - Fundamentals analyst → LLM client: explains metrics
src/agents/fundamentals_analyst.py - Fundamentals analyst → Metric formatting: formats findings
src/agents/fundamentals_analyst.py - LLM client → Configuration: loads settings
src/core/llm.py - FastAPI API → PDF report: builds PDF
api.py - FastAPI API → Report serialization: serializes results
api.py - Data analyst → Chart generation: creates charts
README.md - Chart generation → Fundamental ratios: uses ratio thresholds
src/utils/charts.py