saiteja129/agentic-equity-research
0
Agentic Equity Research System
A state-of-the-art multi-agent workflow for equity research powered by LangGraph, LangChain, and GPT-4o.
๐ Overview
This system automates the technical and regulatory analysis of stocks. It features a collaborative agent flow where an Analyst performs quantitative research, a Critic validates the findings, and a Human-in-the-Loop gate ensures final report quality.
Key Features:
- Parallel Tool-Calling: The Analyst agent fetches RSI, VWAP, and filings concurrently.
- Async Scrapers: Built with
httpxandBeautifulSoupfor real-time filing extraction. - Regulatory Gate: Validates findings against simulated compliance data.
- 3-Strike Refinement: Automatically simplifies analysis if the Critic rejects it multiple times.
- Stateful Memory: Uses
MemorySaverto persist conversations and HITL states.
๐๏ธ Architecture
graph TD
START((Start)) --> analyst[Analyst Node]
analyst --> |tool calls?| tools[Tool Executor]
tools --> analyst
analyst --> |no tool calls| critic[Critic Node]
critic --> |errors found & revisions < 3| analyst
critic --> |errors found & revisions >= 3| refinement[Refinement Prompt]
refinement --> analyst
critic --> |no errors| hitl_gate[HITL Safety Gate]
hitl_gate --> |interrupt & wait| HUMAN{Human Decision}
HUMAN --> |approve| final[Finalize Report]
HUMAN --> |reject| analyst
final --> END((End))๐ ๏ธ Installation
- Clone the repository.
- Install dependencies:
pip install -r requirements.txt- Set up your
.envfile:
OPENAI_API_KEY=your_openai_key- Run the app:
python app.py๐ Security & Compliance
The system includes a dedicated Critic node that checks for regulatory red flags and logical inconsistencies, ensuring that the final output is safe for consumption.
Built with โค๏ธ by Antigravity
