CoolFace
Apppublic

saiteja129/agentic-equity-research

sourceHugging Faceupdated 6mo agoView on Hugging Face
0likes
App README

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 httpx and BeautifulSoup for 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 MemorySaver to persist conversations and HITL states.

๐Ÿ—๏ธ Architecture

mermaid
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

  1. 1.Clone the repository.
  2. 2.Install dependencies:
bash
   pip install -r requirements.txt
  1. 1.Set up your .env file:
env
   OPENAI_API_KEY=your_openai_key
  1. 1.Run the app:
bash
   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