Skip to content

Latest commit

Β 

History

History
101 lines (79 loc) Β· 3.17 KB

File metadata and controls

101 lines (79 loc) Β· 3.17 KB

🧠 Equity Research Agent

A LangGraph-based multi-agent system for automated equity research. The system simulates the workflow of a professional equity research analyst, providing enriched, curated, and briefed insights through a structured multi-agent architecture.

πŸš€ Features

  • πŸ“Š Financial analysis
  • πŸ—žοΈ News scanning
  • 🧠 Sentiment analysis for news and report sections
  • 🏭 Industry insights
  • 🏒 Company profiling
  • πŸ” Data collection and enrichment
  • πŸ“ Auto-generated investment briefings
  • ✍️ Final report editing
  • 🌐 Real-time WebSocket progress updates
  • πŸ“ˆ Valuation analysis powered by Yahoo Finance
  • πŸ’¬ Real-time subquery generation for deeper insights
  • πŸ”Ž Symbol lookup using Tavily and yfinance

🧱 Architecture

This project is built using LangGraph's StateGraph with the following node pipeline:

grounding
   β”œβ”€β”€ financial_analyst
   β”œβ”€β”€ news_scanner
   β”œβ”€β”€ industry_analyst
   β”œβ”€β”€ company_analyst
   β”œβ”€β”€ fundamental_analyst
   └── valuation_analyst
      ↓
   collector β†’ curator β†’ enricher β†’ briefing β†’ editor

Each node represents a specialized agent:

  • GroundingNode: Sets research context.
  • FinancialAnalyst, NewsScanner, IndustryAnalyzer, CompanyAnalyzer: Conduct domain-specific analysis.
  • FundamentalAnalyst, ValuationAnalyst: Perform financial metrics evaluation and market-based valuation with Yahoo Finance API.
  • Collector: Aggregates data.
  • Curator: Filters and prioritizes findings.
  • Enricher: Enhances findings with additional insights.
  • Briefing: Creates structured reports.
  • Editor: Finalizes output for human consumption.

πŸ§ͺ How to Run

  1. Create a new Python project using uv (optional but recommended)
uv venv
uv pip install -r requirements.txt
  1. Install dependencies (if not using uv)
pip install -r requirements.txt
  1. Run the Agent
from backend.graph import Graph
graph = Graph(company="Tesla")
# graph.run(thread={}) is an async generator
async for state in graph.run(thread={}):
    print(state)

Note: Make sure to configure WebSocket manager and other integrations as needed.

πŸ“‚ Project Structure

backend/
β”œβ”€β”€ graph.py         # Main workflow definition
β”œβ”€β”€ classes/
β”‚   └── state.py     # InputState dataclass
└── nodes/           # Modular node logic
    β”œβ”€β”€ collector.py
    β”œβ”€β”€ curator.py
    β”œβ”€β”€ enricher.py
    β”œβ”€β”€ briefing.py
    β”œβ”€β”€ editor.py
    └── researchers.py

πŸ“‘ WebSocket Support

Progress updates are sent via WebSocket (websocket_manager) with:

  • Job ID (job_id)
  • Current node name
  • Execution progress
  • Result or error data

πŸ™ Acknowledgements

This project was inspired by and adapted from company-research-agent by Guy Hartstein. We thank the original author for the excellent foundation and contributions to the open-source research tooling ecosystem.

Licensed and modified under the Apache License 2.0.