Skip to content

An AI-powered autonomous agent that automates financial data analysis and generates investment insights using LangChain, Python, and multi-agent orchestration.

License

Notifications You must be signed in to change notification settings

gsaini/financial-research-analyst-agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

14 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🏦 Financial Research Analyst Agent

Python LangChain Ollama FastAPI Docker Kubernetes PostgreSQL Redis Pandas NumPy

An AI-powered autonomous agent that automates financial data analysis and generates investment insights using LangChain, Python, and multi-agent orchestration.

Features β€’ Architecture β€’ Installation β€’ Usage β€’ API Reference β€’ Contributing


πŸ“‹ Table of Contents


🎯 Overview

The Financial Research Analyst Agent is an end-to-end AI solution designed to automate financial data analysis and insight generation. Built with LangChain and Python, this agent leverages multiple specialized sub-agents to:

  • πŸ“Š Analyze financial data from multiple sources
  • πŸ“ˆ Generate investment insights with detailed reasoning
  • πŸ” Perform market research autonomously
  • πŸ“‘ Create comprehensive reports with actionable recommendations
  • ⚑ Enhance decision-making speed through automation

πŸ“š Case Study Details

Attribute Description
Objective Leverage AI agent capabilities to automate data analysis and insight generation, enhancing the speed and quality of investment decision-making
Domain Finance, Investment Analysis, Automation
Skills AI Agents, Data Analysis, Investment Decision-Making, LangChain, Python
Complexity Advanced
Duration 4-6 weeks implementation

Problem Statement

Traditional financial research is:

  • Time-consuming: Analysts spend 60-80% of time on data gathering
  • Error-prone: Manual analysis leads to inconsistencies
  • Limited in scope: Human capacity limits coverage
  • Reactive: Difficulty in real-time market monitoring

Solution

This AI agent system addresses these challenges by:

  1. Automating data collection from multiple financial APIs
  2. Performing real-time analysis using advanced NLP and ML
  3. Generating actionable insights with confidence scores
  4. Creating structured reports for decision-makers

✨ Features

Core Capabilities

Feature Description
πŸ€– Multi-Agent Architecture Specialized agents for different analysis tasks
πŸ“Š Real-time Data Analysis Live market data processing and analysis
πŸ“ˆ Technical Analysis Automated chart pattern and indicator analysis
πŸ“° News Sentiment Analysis NLP-powered news and social media analysis
🎯 Thematic Investing Analysis Group stocks by investment themes (AI, EV, Green Energy, etc.)
πŸ‘₯ Peer Group Comparison Compare stocks against industry peers with real-time metrics
πŸ“‘ Report Generation Automated investment research reports
πŸ”” Alert System Configurable alerts for market conditions
🌐 API Integration REST API for external system integration
πŸ“± Web Dashboard Interactive visualization dashboard

Agent Types

  1. Data Collector Agent: Gathers financial data from multiple sources
  2. Technical Analyst Agent: Performs technical analysis on price data
  3. Fundamental Analyst Agent: Analyzes company financials and metrics
  4. Sentiment Analyst Agent: Processes news and social media sentiment
  5. Risk Analyst Agent: Performs risk assessment and VaR calculations
  6. Thematic Analyst Agent: Analyzes stocks grouped by investment themes and megatrends
  7. Report Generator Agent: Compiles insights into structured reports
  8. Orchestrator Agent: Coordinates all agents and manages workflow

πŸ— Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                          FINANCIAL RESEARCH ANALYST AGENT                        β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                                                                                  β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚                          ORCHESTRATOR AGENT                                β”‚  β”‚
β”‚  β”‚  β€’ Task Planning & Decomposition  β€’ Agent Coordination  β€’ Aggregation     β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β”‚                                       β”‚                                          β”‚
β”‚           β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”              β”‚
β”‚           β”‚               β”‚           β”‚           β”‚               β”‚              β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β–Όβ”€β”€β”€β” β”Œβ”€β”€β”€β”€β–Όβ”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”     β”‚
β”‚  β”‚ DATA COLLECTOR β”‚ β”‚ TECHNICAL β”‚ β”‚ FUNDA β”‚ β”‚ SENTI-  β”‚ β”‚ RISK           β”‚     β”‚
β”‚  β”‚ AGENT          β”‚ β”‚ ANALYST   β”‚ β”‚ MENTALβ”‚ β”‚ MENT    β”‚ β”‚ ANALYST AGENT  β”‚     β”‚
β”‚  β”‚                β”‚ β”‚ AGENT     β”‚ β”‚ AGENT β”‚ β”‚ AGENT   β”‚ β”‚                β”‚     β”‚
β”‚  β”‚ β€’ Yahoo Financeβ”‚ β”‚ β€’ RSI     β”‚ β”‚ β€’ P/E β”‚ β”‚ β€’ News  β”‚ β”‚ β€’ VaR Calc     β”‚     β”‚
β”‚  β”‚ β€’ Alpha Vantageβ”‚ β”‚ β€’ MACD    β”‚ β”‚ β€’ EPS β”‚ β”‚ β€’ Socialβ”‚ β”‚ β€’ Volatility   β”‚     β”‚
β”‚  β”‚ β€’ News APIs    β”‚ β”‚ β€’ SMA/EMA β”‚ β”‚ β€’ ROE β”‚ β”‚ β€’ Trend β”‚ β”‚ β€’ Correlation  β”‚     β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β”‚
β”‚                                                                                  β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚ THEMATIC ANALYST AGENT          β”‚  β”‚ REPORT GENERATOR AGENT               β”‚  β”‚
β”‚  β”‚                                 β”‚  β”‚                                      β”‚  β”‚
β”‚  β”‚ β€’ Theme-to-Ticker Mapping       β”‚  β”‚ β€’ PDF / Markdown / JSON Reports      β”‚  β”‚
β”‚  β”‚ β€’ Multi-Horizon Performance     β”‚  β”‚ β€’ Actionable Recommendations         β”‚  β”‚
β”‚  β”‚ β€’ Momentum & Health Scoring     β”‚  β”‚ β€’ Executive Summaries                β”‚  β”‚
β”‚  β”‚ β€’ Correlation & Diversification β”‚  β”‚                                      β”‚  β”‚
β”‚  β”‚ β€’ Sector Overlap Analysis       β”‚  β”‚                                      β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β”‚                                                                                  β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                                  DATA LAYER                                      β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚  β”‚ Vector Store β”‚ β”‚ Cache Layer  β”‚ β”‚ Database     β”‚ β”‚ File Store β”‚ β”‚ Theme    β”‚ β”‚
β”‚  β”‚ (ChromaDB)   β”‚ β”‚ (Redis)      β”‚ β”‚ (PostgreSQL) β”‚ β”‚ (S3/Local) β”‚ β”‚ Config   β”‚ β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Technology Stack

Component Technology
AI Framework LangChain, LangGraph
LLM Ollama (Llama 4, Mistral) / Groq / LM Studio
Embeddings Sentence Transformers / HuggingFace / Ollama
Vector Store ChromaDB / Qdrant / Milvus / Weaviate
Backend FastAPI, Python 3.14+
Data Processing Pandas, NumPy
Visualization Plotly, Matplotlib
Frontend HTML5, CSS3, JavaScript
Database PostgreSQL / SQLite
Caching Redis

πŸš€ Installation

Prerequisites

  • Python 3.14 or higher
  • pip or conda package manager
  • OpenAI API key (or other LLM provider)
  • Alpha Vantage API key (optional, for live data)

Quick Start

# Clone the repository
git clone https://github.com/gsaini/financial-research-analyst-agent.git
cd financial-research-analyst-agent

# Create virtual environment
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

# Install dependencies
pip install -r requirements.txt

# Set up environment variables
cp .env.example .env
# Edit .env with your API keys

# Run the application
python -m src.main

Docker Installation

# Build the Docker image
docker build -t financial-analyst-agent .

# Run the container
docker run -p 8000:8000 --env-file .env financial-analyst-agent

βš™οΈ Configuration

Environment Variables

Create a .env file in the root directory:

# LLM Configuration (Open Source by Default)
LLM_PROVIDER=ollama
OLLAMA_BASE_URL=http://localhost:11434
OLLAMA_MODEL=llama4:latest
LLM_TEMPERATURE=0.1

# Embedding Configuration (Open Source)
EMBEDDING_PROVIDER=sentence-transformers
SENTENCE_TRANSFORMER_MODEL=all-MiniLM-L6-v2

# Financial Data APIs (Yahoo Finance is free, others optional)
USE_YFINANCE=true
ALPHA_VANTAGE_API_KEY=your_alpha_vantage_key  # Optional
NEWS_API_KEY=your_news_api_key  # Optional

# Database Configuration
DATABASE_URL=sqlite:///./data/financial_agent.db
REDIS_URL=redis://localhost:6379

# Vector Store (Open Source)
VECTOR_STORE_PROVIDER=chroma
CHROMA_PERSIST_DIR=./data/chroma

# Application Settings
DEBUG=false
LOG_LEVEL=INFO
API_HOST=0.0.0.0
API_PORT=8000

Agent Configuration

Edit config/agents.yaml to customize agent behavior:

orchestrator:
  max_iterations: 10
  timeout_seconds: 300

technical_analyst:
  indicators:
    - RSI
    - MACD
    - SMA
    - EMA
    - Bollinger Bands
  lookback_periods: [14, 30, 50, 200]

sentiment_analyst:
  sources:
    - news
    - twitter
    - reddit
  sentiment_threshold: 0.3

πŸ“– Usage

Python API

from src.agents import FinancialResearchAgent

# Initialize the agent
agent = FinancialResearchAgent()

# Analyze a single stock
result = agent.analyze("AAPL")
print(result.summary)
print(result.recommendation)
print(result.confidence_score)

# Analyze multiple stocks
portfolio = ["AAPL", "GOOGL", "MSFT", "AMZN"]
portfolio_analysis = agent.analyze_portfolio(portfolio)

# Generate a research report
report = agent.generate_report(
    symbols=["AAPL"],
    include_technical=True,
    include_fundamental=True,
    include_sentiment=True,
    format="pdf"
)

REST API

# Analyze a stock
curl -X POST "http://localhost:8000/api/v1/analyze" \
  -H "Content-Type: application/json" \
  -d '{"symbol": "AAPL", "analysis_type": "comprehensive"}'

# Get technical analysis
curl "http://localhost:8000/api/v1/technical/AAPL"

# Generate report
curl -X POST "http://localhost:8000/api/v1/reports" \
  -H "Content-Type: application/json" \
  -d '{"symbols": ["AAPL", "GOOGL"], "format": "pdf"}'

# List available investment themes
curl "http://localhost:8000/api/v1/themes"

# Analyze an investment theme
curl -X POST "http://localhost:8000/api/v1/theme/ai_machine_learning" \
  -H "Content-Type: application/json" \
  -d '{"theme_id": "ai_machine_learning", "include_narrative": false}'

# Compare multiple themes
curl -X POST "http://localhost:8000/api/v1/themes/compare" \
  -H "Content-Type: application/json" \
  -d '{"theme_ids": ["ai_machine_learning", "cybersecurity", "electric_vehicles"]}'

Command Line Interface

# Quick analysis
python -m src.cli analyze AAPL

# Portfolio analysis
python -m src.cli portfolio AAPL GOOGL MSFT --output report.pdf

# Start web dashboard
python -m src.cli dashboard --port 8080

πŸ”§ API Reference

Endpoints

Method Endpoint Description
POST /api/v1/analyze Analyze a stock symbol
GET /api/v1/technical/{symbol} Get technical analysis
GET /api/v1/fundamental/{symbol} Get fundamental analysis
GET /api/v1/sentiment/{symbol} Get sentiment analysis
POST /api/v1/portfolio Analyze a portfolio
POST /api/v1/reports Generate a report
GET /api/v1/market/summary Get market summary
GET /api/v1/themes List all available investment themes
POST /api/v1/theme/{theme_id} Analyze an investment theme
POST /api/v1/themes/compare Compare multiple themes side by side
GET /api/v1/peers/{symbol} Get peer comparison (auto-discovery)
POST /api/v1/peers/compare Compare stock against specific peers
WebSocket /ws/alerts Real-time alerts

Response Schema

{
  "symbol": "AAPL",
  "analysis_date": "2024-01-15T10:30:00Z",
  "technical": {
    "trend": "bullish",
    "signals": [...],
    "indicators": {...}
  },
  "fundamental": {
    "valuation": "fairly_valued",
    "metrics": {...},
    "growth_score": 8.5
  },
  "sentiment": {
    "overall": "positive",
    "score": 0.72,
    "sources": {...}
  },
  "recommendation": {
    "action": "BUY",
    "confidence": 0.85,
    "reasoning": "...",
    "target_price": 195.00,
    "stop_loss": 175.00
  }
}

πŸ€– Agent Capabilities

1. Data Collector Agent

Capabilities:
- Fetch real-time stock prices
- Historical data retrieval
- Financial statements download
- News article collection
- Social media data gathering

2. Technical Analyst Agent

Indicators Supported:
- RSI (Relative Strength Index)
- MACD (Moving Average Convergence Divergence)
- SMA/EMA (Simple/Exponential Moving Averages)
- Bollinger Bands
- Fibonacci Retracements
- Volume Analysis
- Support/Resistance Levels

3. Fundamental Analyst Agent

Metrics Analyzed:
- P/E Ratio, P/B Ratio, P/S Ratio
- EPS and Revenue Growth
- ROE, ROA, ROIC
- Debt-to-Equity Ratio
- Free Cash Flow
- Dividend Yield and Payout Ratio
- Competitive Analysis

4. Sentiment Analyst Agent

Sources:
- Financial news articles
- SEC filings and earnings calls
- Social media (Twitter, Reddit)
- Analyst ratings
- Insider trading activity

5. Thematic Analyst Agent

Capabilities:
- Analyze stocks grouped by investment themes (AI, EV, Green Energy, etc.)
- Multi-horizon performance tracking (1W, 1M, 3M, 6M, 1Y, YTD)
- Intra-theme correlation and diversification scoring
- Momentum scoring (0-100) with configurable weights
- Theme health scoring (0-100) combining performance, momentum, risk
- Sector overlap breakdown
- Top performer and laggard identification
- LLM-generated narrative outlook (optional)

Available Themes:
- AI & Machine Learning          - Electric Vehicles
- Green Energy & Clean Tech       - Cybersecurity
- Aging Population & Healthcare   - Cloud Computing & SaaS
- Fintech & Digital Payments      - Space Economy & Aerospace
- Digital Entertainment & Gaming  - Blockchain & Web3

πŸ“Š Sample Analysis

Example: Apple Inc. (AAPL) Analysis

================================================================================
                     FINANCIAL RESEARCH ANALYST REPORT
                              Apple Inc. (AAPL)
                           Generated: 2024-01-15
================================================================================

EXECUTIVE SUMMARY
-----------------
Apple Inc. demonstrates strong fundamentals with continued growth in services
revenue and a robust product ecosystem. Technical indicators suggest a bullish
trend, while sentiment analysis reveals positive market perception.

TECHNICAL ANALYSIS
------------------
Trend: BULLISH
RSI (14): 58.3 (Neutral)
MACD: Bullish crossover detected
Support: $175.00
Resistance: $195.00

FUNDAMENTAL ANALYSIS
--------------------
P/E Ratio: 28.5 (Industry Avg: 25.2)
Revenue Growth: 8.2% YoY
EPS Growth: 12.1% YoY
Debt/Equity: 1.52
ROE: 147.3%

SENTIMENT ANALYSIS
------------------
Overall Sentiment: POSITIVE (Score: 0.72)
News Sentiment: 0.68
Social Media: 0.75
Analyst Consensus: 0.82

RECOMMENDATION
--------------
Action: BUY
Confidence: 85%
Target Price: $195.00
Stop Loss: $175.00

Reasoning: Strong fundamentals combined with positive technical signals and
favorable market sentiment suggest upside potential. The services segment
continues to grow, providing recurring revenue stability.
================================================================================

πŸ§ͺ Testing

# Run all tests
pytest tests/ -v

# Run specific test suite
pytest tests/test_agents.py -v

# Run thematic investing tests
pytest tests/test_thematic.py -v

# Run with coverage
pytest tests/ --cov=src --cov-report=html

# Run integration tests (requires network access for yfinance)
pytest tests/ -v -m integration

🚒 Deployment

Docker Compose

version: "3.8"
services:
  api:
    build: .
    ports:
      - "8000:8000"
    environment:
      - DATABASE_URL=postgresql://postgres:${POSTGRES_PASSWORD}@db:5432/financial_agent
      - REDIS_URL=redis://redis:6379
    depends_on:
      - db
      - redis

  db:
    image: postgres:15
    environment:
      POSTGRES_DB: financial_agent
      POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} # Set in .env file
    volumes:
      - postgres_data:/var/lib/postgresql/data

  redis:
    image: redis:7
    volumes:
      - redis_data:/data

volumes:
  postgres_data:
  redis_data:

Kubernetes

See k8s/ directory for Kubernetes deployment manifests.


πŸ“ Project Structure

financial-research-analyst-agent/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ __init__.py
β”‚   β”œβ”€β”€ main.py                 # Application entry point
β”‚   β”œβ”€β”€ config.py               # Configuration management
β”‚   β”œβ”€β”€ agents/
β”‚   β”‚   β”œβ”€β”€ __init__.py
β”‚   β”‚   β”œβ”€β”€ base.py             # Base agent class
β”‚   β”‚   β”œβ”€β”€ orchestrator.py     # Main orchestrator agent
β”‚   β”‚   β”œβ”€β”€ data_collector.py   # Data collection agent
β”‚   β”‚   β”œβ”€β”€ technical.py        # Technical analysis agent
β”‚   β”‚   β”œβ”€β”€ fundamental.py      # Fundamental analysis agent
β”‚   β”‚   β”œβ”€β”€ sentiment.py        # Sentiment analysis agent
β”‚   β”‚   β”œβ”€β”€ risk.py             # Risk analysis agent
β”‚   β”‚   β”œβ”€β”€ thematic.py         # Thematic investing analysis agent ✨
β”‚   β”‚   └── report_generator.py # Report generation agent
β”‚   β”œβ”€β”€ tools/
β”‚   β”‚   β”œβ”€β”€ __init__.py
β”‚   β”‚   β”œβ”€β”€ market_data.py      # Market data fetching tools
β”‚   β”‚   β”œβ”€β”€ news_fetcher.py     # News fetching tools
β”‚   β”‚   β”œβ”€β”€ technical_indicators.py
β”‚   β”‚   β”œβ”€β”€ financial_metrics.py
β”‚   β”‚   β”œβ”€β”€ peer_comparison.py  # Peer discovery & comparison tools ✨
β”‚   β”‚   └── theme_mapper.py     # Theme-to-ticker mapping & analysis tools ✨
β”‚   β”œβ”€β”€ models/
β”‚   β”‚   β”œβ”€β”€ __init__.py
β”‚   β”‚   β”œβ”€β”€ analysis.py         # Analysis data models
β”‚   β”‚   └── report.py           # Report data models
β”‚   β”œβ”€β”€ api/
β”‚   β”‚   β”œβ”€β”€ __init__.py
β”‚   β”‚   β”œβ”€β”€ routes.py           # API routes (incl. thematic endpoints)
β”‚   β”‚   └── schemas.py          # Pydantic schemas (incl. theme schemas)
β”‚   └── utils/
β”‚       β”œβ”€β”€ __init__.py
β”‚       β”œβ”€β”€ logger.py           # Logging utility
β”‚       └── helpers.py          # Helper functions
β”œβ”€β”€ tests/
β”‚   β”œβ”€β”€ __init__.py
β”‚   β”œβ”€β”€ test_agents.py
β”‚   β”œβ”€β”€ test_tools.py
β”‚   β”œβ”€β”€ test_api.py
β”‚   β”œβ”€β”€ test_peer_comparison.py # Peer comparison tests ✨
β”‚   └── test_thematic.py        # Thematic investing tests ✨
β”œβ”€β”€ data/
β”‚   └── sample_data.csv
β”œβ”€β”€ docs/
β”‚   β”œβ”€β”€ architecture.md
β”‚   β”œβ”€β”€ api_reference.md        # API reference (incl. peer comparison endpoints)
β”‚   └── SCOPE.md                # Feature scope & enhancement roadmap
β”œβ”€β”€ notebooks/
β”‚   └── exploration.ipynb
β”œβ”€β”€ static/
β”‚   └── dashboard/
β”œβ”€β”€ config/
β”‚   β”œβ”€β”€ agents.yaml             # Agent configuration
β”‚   └── themes.yaml             # Investment theme definitions ✨
β”œβ”€β”€ .env.example
β”œβ”€β”€ requirements.txt
β”œβ”€β”€ Dockerfile
β”œβ”€β”€ docker-compose.yml
└── README.md

🀝 Contributing

Contributions are welcome! Please read our Contributing Guide for details.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


πŸ™ Acknowledgments


Created by πŸ€– Antigravity AI (Google DeepMind)

Author: Gopal Saini

Part of the AI Agents Case Studies Collection

⬆ Back to Top

About

An AI-powered autonomous agent that automates financial data analysis and generates investment insights using LangChain, Python, and multi-agent orchestration.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •