https://github.com/gsaini/financial-research-analyst-agent
The Financial Research Analyst Agent is a hierarchical multi-agent system that provides comprehensive stock analysis by coordinating 11 specialized AI agents, 20+ analysis tools, a RAG knowledge pipeline, and a multi-provider data layer โ all accessible through a Streamlit web app, REST API, and CLI.
https://github.com/gsaini/financial-research-analyst-agent
docker fastapi kubernetes langchain numpy ollama pandas postgresql python redis
Last synced: 3 days ago
JSON representation
The Financial Research Analyst Agent is a hierarchical multi-agent system that provides comprehensive stock analysis by coordinating 11 specialized AI agents, 20+ analysis tools, a RAG knowledge pipeline, and a multi-provider data layer โ all accessible through a Streamlit web app, REST API, and CLI.
- Host: GitHub
- URL: https://github.com/gsaini/financial-research-analyst-agent
- Owner: gsaini
- License: other
- Created: 2026-01-06T01:04:55.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2026-05-13T04:40:55.000Z (about 1 month ago)
- Last Synced: 2026-06-14T23:34:32.136Z (3 days ago)
- Topics: docker, fastapi, kubernetes, langchain, numpy, ollama, pandas, postgresql, python, redis
- Language: Python
- Homepage: https://financial-agents-ai.streamlit.app
- Size: 1.07 MB
- Stars: 24
- Watchers: 0
- Forks: 10
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# ๐ฆ Financial Research Analyst Agent










**An AI-powered autonomous agent that automates financial data analysis and generates investment insights using LangChain, Python, and multi-agent orchestration.**
[Features](#-features) โข [Architecture](#-architecture) โข [Installation](#-installation) โข [Usage](#-usage) โข [API Reference](#-api-reference) โข [Contributing](#-contributing)
---
## ๐ Table of Contents
- [Overview](#-overview)
- [Case Study Details](#-case-study-details)
- [Features](#-features)
- [Architecture](#-architecture)
- [Installation](#-installation)
- [Configuration](#-configuration)
- [Usage](#-usage)
- [Interactive API Documentation](#-interactive-api-documentation)
- [API Reference](#-api-reference)
- [Agent Capabilities](#-agent-capabilities)
- [Sample Analysis](#-sample-analysis)
- [Testing](#-testing)
- [Deployment](#-deployment)
- [Contributing](#-contributing)
- [License](#-license)
---
## ๐ฏ 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** | AI-powered sentiment scoring (FinBERT/VADER), trends & volume tracking |
| ๐ฏ **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 |
| ๐ **Market Disruption Analysis** | Identify disruptors and companies at risk of disruption |
| ๐
**Quarterly Earnings Analysis** | Track EPS surprises, beat/miss patterns, and earnings quality |
| ๐ **Performance Tracking** | Multi-horizon returns, benchmark comparison & drawdown analysis |
| ๐
**Event-Driven Performance** | Post-earnings price reactions, ยฑ5 day windows, and surprise correlation |
| ๐ **Backtesting Engine** | Simulate trading strategies against historical data with trade logs |
| ๐ **Key Observations** | Cross-dimensional insights, confluences, anomalies & ranked signals |
| ๐ค **Insider & Institutional** | Track insider transactions, institutional holdings & smart money score |
| ๐ **Options Flow Analysis** | Put/Call ratios, implied volatility skew, max pain & unusual activity |
| ๐ **Report Generation** | PDF & Excel reports with executive summary, deep dive templates |
| ๐ง **RAG Document Intelligence** | Ingest & query SEC filings (10-K, 10-Q, 8-K) and earnings transcripts |
| ๐ **ReAct Multi-Step Reasoning** | Agents think step-by-step with few-shot examples and confidence scoring |
| ๐๏ธ **Multi-Provider Data** | YFinance + FMP + Alpha Vantage with automatic fallback & validation |
| ๐ก **LLM-Powered Insights** | Cross-dimensional synthesis with contradiction detection & historical context |
| ๐ **Macro Economic Data** | FRED API: Fed funds, CPI, GDP, unemployment, treasury yields |
| ๐ฌ **Social Media Sentiment** | Reddit (WSB, r/stocks, r/investing) sentiment + composite scoring |
| ๐ฐ **DCF Valuation Model** | WACC/CAPM, 3-scenario DCF, 5x5 sensitivity matrix, margin of safety |
| ๐ค **ML Price Forecasting** | GradientBoosting 30/60/90-day targets with confidence intervals |
| ๐ **Anomaly Detection** | Z-score volume/price anomalies, gap events, regime change detection |
| ๐ **Portfolio Optimization** | Markowitz mean-variance, efficient frontier, risk-parity allocation |
| ๐ **Benchmark Comparison** | Alpha, beta, tracking error, information ratio, return attribution |
| ๐ฒ **Monte Carlo Simulation** | 10K-path GBM for VaR/CVaR, target price probability, portfolio risk |
| ๐งฌ **Factor Modeling** | Fama-French style decomposition (market, size, value, momentum, quality) |
| ๐ท๏ธ **Brinson Attribution** | Allocation, selection & interaction effects at sector level |
| ๐งฎ **Tax-Loss Harvesting** | Identify harvestable losses, replacement securities, wash sale warnings |
| ๐งช **Strategy Optimization** | Genetic algorithm parameter tuning with overfitting detection |
| ๐ **Supply Chain Analysis** | Map suppliers, customers, competitors with correlation risk scoring |
| ๐ **Real-Time Alerts** | Price/volume/RSI/52-week alerts with WebSocket push notifications |
| ๐ฌ **Scheduled Reports** | Daily/weekly/monthly digests with SMTP email or disk delivery |
| ๐ **Dark/Light Theme** | Toggle between Bloomberg-dark and light color modes |
| ๐ฑ **Mobile-Responsive UI** | Responsive breakpoints at 768px and 480px |
| ๐ **API Security** | API key auth, rate limiting, input sanitization (SQL/XSS/injection) |
| ๐พ **Persistence Layer** | SQLAlchemy ORM: watchlists, portfolios, analysis history |
| ๐ **API Integration** | REST API + WebSocket for external system integration |
| ๐ **Interactive API Docs** | Swagger UI & ReDoc with OpenAPI 3.0 specification |
| ๐ฑ **Web Dashboard** | 13-page interactive visualization dashboard |
### Agent Types
| # | Agent | Key Capabilities |
|---|-------|-----------------|
| 1 | **Data Collector** | Multi-provider data gathering (YFinance, FMP, Alpha Vantage) with auto-fallback |
| 2 | **Technical Analyst** | RSI, MACD, Bollinger, patterns + ML price forecasting + anomaly/regime detection |
| 3 | **Fundamental Analyst** | Valuation, DCF (3-scenario), peer comparison, SEC filings via RAG, macro context |
| 4 | **Sentiment Analyst** | News + Reddit social sentiment, analyst ratings, earnings transcript tone |
| 5 | **Risk Analyst** | VaR/CVaR, Monte Carlo (10K paths), beta, drawdown, rate environment context |
| 6 | **Thematic Analyst** | Investment themes (AI, EV, Green Energy), momentum & health scoring |
| 7 | **Disruption Analyst** | R&D intensity, disruption scoring, disruptor vs at-risk classification |
| 8 | **Earnings Analyst** | EPS surprises, beat/miss patterns, earnings quality scoring |
| 9 | **Performance Analyst** | Multi-horizon returns, benchmark comparison, Sharpe/Sortino/Beta |
| 10 | **Report Generator** | PDF & Excel reports, executive summaries, multi-agent insight aggregation |
| 11 | **Orchestrator** | Cross-agent conflict detection, RAG document ingestion, confidence scoring |
---
## ๐ 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 โ โ โ โ
โ โ โข YFinance โ โ โข RSI โ โ โข P/E โ โ โข News โ โ โข VaR/CVaR โ โ
โ โ โข FMP โ โ โข MACD โ โ โข EPS โ โ โข Analystโ โ โข Volatility โ โ
โ โ โข Alpha Vantageโ โ โข SMA/EMA โ โ โข ROE โ โ โข Trans.โ โ โข Beta/Sharpe โ โ
โ โ โข Auto-fallbackโ โ โข ReAct โ โ โข RAG โ โ โข ReAct โ โ โข Drawdown โ โ
โ โโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโ โโโโโโโโโ โโโโโโโโโโโ โโโโโโโโโโโโโโโโโโ โ
โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ THEMATIC ANALYST AGENT โ โ DISRUPTION ANALYST AGENT โ โ
โ โ โ โ โ โ
โ โ โข Theme-to-Ticker Mapping โ โ โข R&D Intensity Analysis โ โ
โ โ โข Multi-Horizon Performance โ โ โข Revenue Growth Acceleration โ โ
โ โ โข Momentum & Health Scoring โ โ โข Gross Margin Trajectory โ โ
โ โ โข Correlation & Diversification โ โ โข Disruption Score (0-100) โ โ
โ โ โข Sector Overlap Analysis โ โ โข Disruptor vs At-Risk Classificationโ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ EARNINGS ANALYST AGENT โ โ
โ โ โ โ
โ โ โข EPS Actual vs Estimate Tracking โข Quarterly Trend Analysis (QoQ/YoY)โ โ
โ โ โข Beat/Miss Pattern Recognition โข Earnings Quality Scoring (1-10) โ โ
โ โ โข Surprise % Calculation โข Upcoming Earnings Dates โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ PERFORMANCE ANALYST AGENT โ โ
โ โ โ โ
โ โ โข Multi-Horizon Absolute Returns โข Benchmark vs S&P 500/Nasdaq/Sectorโ โ
โ โ โข Sharpe & Sortino Ratios โข Beta & Volatility Analysis โ โ
โ โ โข Rolling 30-Day Returns โข Drawdown & Recovery Analysis โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ SENTIMENT ENGINE โ โ
โ โ โ โ
โ โ โข FinBERT / VADER Financial Scoring โข Per-Article Confidence Scores โ โ
โ โ โข News Volume & Spike Detection โข Sentiment Trend Analysis โ โ
โ โ โข Topic Extraction โข Source Diversity Assessment โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ RAG DOCUMENT INTELLIGENCE โ โ LLM-POWERED INSIGHT ENGINE โ โ
โ โ โ โ โ โ
โ โ โข SEC Filing Ingestion (10-K/Q) โ โ โข Cross-Dimensional Synthesis โ โ
โ โ โข Earnings Transcript Search โ โ โข Contradiction Detection โ โ
โ โ โข Semantic Chunking & Retrieval โ โ โข Historical Context Comparison โ โ
โ โ โข Agent RAG Mixin (optional) โ โ โข Watch Items & Catalysts โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ PREDICTIVE MODELS โ โ PORTFOLIO ANALYTICS โ โ
โ โ โ โ โ โ
โ โ โข ML Price Forecast (GBM) โ โ โข Markowitz Optimization โ โ
โ โ โข DCF Valuation (3 scenarios) โ โ โข Monte Carlo Simulation (10K) โ โ
โ โ โข Anomaly Detection (Z-score) โ โ โข Fama-French Factor Model โ โ
โ โ โข Strategy Optimizer (GA) โ โ โข Brinson Attribution โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ MACRO & ALTERNATIVE DATA โ โ AUTOMATION & ALERTS โ โ
โ โ โ โ โ โ
โ โ โข FRED API (rates, CPI, GDP) โ โ โข Real-Time Alert Engine (9 types) โ โ
โ โ โข Reddit Sentiment (WSB) โ โ โข WebSocket Push Notifications โ โ
โ โ โข Supply Chain Mapping โ โ โข Scheduled Report Digests โ โ
โ โ โข Tax-Loss Harvesting โ โ โข Email Delivery (SMTP) โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ REPORT GENERATOR AGENT โ โ
โ โ โ โ
โ โ โข PDF / Excel / Markdown / JSON โข Actionable Recommendations โ โ
โ โ โข Executive Summaries โข Multi-Agent Insight Aggregation โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ DATA LAYER โ
โ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโ โโโโโโโโโโโโ โ
โ โ Vector Store โ โ Cache Layer โ โ Database โ โ Data Valid.โ โ Multi- โ โ
โ โ (ChromaDB) โ โ (Redis) โ โ (PostgreSQL) โ โ (Quality) โ โ Provider โ โ
โ โ + RAG Embeds โ โ โ โ + ORM Models โ โ + Outliers โ โ Fallback โ โ
โ โ โ โ โ โ + Watchlists โ โ + Mkt Hrs โ โ + FRED โ โ
โ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโ โโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
```
### Technology Stack
| Component | Technology |
| ------------------- | -------------------------------------------- |
| **AI Framework** | LangChain, LangGraph |
| **LLM** | Ollama (Llama 4, Mistral) / Groq / LM Studio |
| **RAG** | Semantic chunking, ChromaDB, cross-encoder re-ranking |
| **Embeddings** | Sentence Transformers / HuggingFace / Ollama |
| **ML/Forecasting** | scikit-learn (GradientBoosting), NumPy, SciPy |
| **Vector Store** | ChromaDB / Qdrant / Milvus / Weaviate |
| **Data Providers** | YFinance, FMP, Alpha Vantage, FRED, Reddit (auto-fallback) |
| **Backend** | FastAPI + WebSocket, Python 3.14+ |
| **Data Processing** | Pandas, NumPy, SciPy |
| **Visualization** | Plotly, TradingView Lightweight Charts |
| **Frontend** | Streamlit, HTML5, CSS3 (dark/light themes) |
| **Database** | PostgreSQL / SQLite + SQLAlchemy ORM |
| **Caching** | Redis |
| **Reports** | reportlab (PDF), openpyxl (Excel) |
| **Security** | API key auth, rate limiting, input sanitization |
---
## ๐ 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
```bash
# 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
```bash
# 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:
```env
# 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)
DATA_PROVIDER=yfinance # yfinance | fmp | alphavantage
DATA_FALLBACK_PROVIDER=fmp # Auto-fallback if primary fails
ALPHA_VANTAGE_API_KEY=your_alpha_vantage_key # Optional
FMP_API_KEY=your_fmp_api_key # Optional (free tier: 250 req/day)
NEWS_API_KEY=your_news_api_key # Optional
# FRED Macroeconomic Data (free key)
FRED_API_KEY=your_fred_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
# Security (optional โ disabled in dev mode)
# API_KEYS=key1,key2 # Comma-separated API keys
# RATE_LIMIT_REQUESTS=100 # Per-window limit
# RATE_LIMIT_WINDOW_SECONDS=60
# Email Digests (optional)
# SMTP_HOST=smtp.gmail.com
# SMTP_PORT=587
# SMTP_USER=your@email.com
# SMTP_PASSWORD=your_app_password
```
### Agent Configuration
Edit `config/agents.yaml` to customize agent behavior:
```yaml
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
```python
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
```bash
# 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"]}'
# Analyze market disruption profile
curl "http://localhost:8000/api/v1/disruption/TSLA"
# Disruption analysis with LLM narrative
curl -X POST "http://localhost:8000/api/v1/disruption/analyze" \
-H "Content-Type: application/json" \
-d '{"symbol": "NVDA", "include_narrative": true}'
# Compare disruption profiles across competitors
curl -X POST "http://localhost:8000/api/v1/disruption/compare" \
-H "Content-Type: application/json" \
-d '{"symbols": ["TSLA", "F", "GM", "TM"], "include_narrative": false}'
# Analyze quarterly earnings
curl "http://localhost:8000/api/v1/earnings/AAPL"
# Earnings analysis with LLM narrative
curl -X POST "http://localhost:8000/api/v1/earnings/analyze" \
-H "Content-Type: application/json" \
-d '{"symbol": "MSFT", "include_narrative": true}'
# Compare earnings profiles across companies
curl -X POST "http://localhost:8000/api/v1/earnings/compare" \
-H "Content-Type: application/json" \
-d '{"symbols": ["AAPL", "MSFT", "GOOGL"], "include_narrative": false}'
```
### Streamlit Dashboard
```bash
# Install frontend dependencies
pip install -r frontend/requirements.txt
# Launch the interactive dashboard (no LLM required)
streamlit run frontend/app.py
```
The dashboard provides 13 interactive pages covering stock analysis, thematic investing, peer comparison, market disruption, quarterly earnings, portfolio analysis, reports, financial news, historical performance, AI-powered sentiment, ETF screening, and macroeconomic data โ with dark/light theme toggle and mobile-responsive layout.
### Command Line Interface
```bash
# 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
```
---
## ๐ Interactive API Documentation
The API includes built-in interactive documentation powered by **OpenAPI 3.0** specification.
### Swagger UI
Access the interactive Swagger UI at: ****
Features:
- Interactive API explorer with "Try it out" functionality
- Auto-generated request/response examples
- Authentication testing
- Schema validation
### ReDoc
Access the ReDoc documentation at: ****
Features:
- Clean, responsive three-panel design
- Deep linking to specific endpoints
- Code samples in multiple languages
- Search functionality
### OpenAPI JSON Schema
Download the raw OpenAPI specification: ****
Use this to:
- Generate client SDKs (Python, TypeScript, Go, etc.)
- Import into Postman or Insomnia
- Create automated API tests
---
## ๐ง 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 |
| `GET` | `/api/v1/disruption/{symbol}` | Get market disruption analysis |
| `POST` | `/api/v1/disruption/analyze` | Analyze disruption with optional LLM narrative |
| `POST` | `/api/v1/disruption/compare` | Compare disruption profiles across companies |
| `GET` | `/api/v1/earnings/{symbol}` | Get quarterly earnings analysis |
| `POST` | `/api/v1/earnings/analyze` | Analyze earnings with optional LLM narrative |
| `POST` | `/api/v1/earnings/compare` | Compare earnings profiles across companies |
| `GET` | `/api/v1/performance/{symbol}` | Get historical performance tracking |
| `GET` | `/api/v1/events/{symbol}` | Get event-driven performance analysis |
| `POST` | `/api/v1/backtest` | Run a backtesting simulation |
| `GET` | `/api/v1/strategies` | List available backtesting strategies |
| `GET` | `/api/v1/observations/{symbol}` | Key observations and cross-dimensional insights |
| `GET` | `/api/v1/insiders/{symbol}` | Insider & institutional activity analysis |
| `GET` | `/api/v1/options/{symbol}` | Options flow and sentiment analysis |
| `WebSocket` | `/ws/alerts` | Real-time alerts |
### Response Schema
```json
{
"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
```python
Capabilities:
- Fetch real-time stock prices
- Historical data retrieval
- Financial statements download
- News article collection
- Social media data gathering
```
### 2. Technical Analyst Agent
```python
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
```python
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
```python
Sources:
- Financial news articles
- SEC filings and earnings calls
- Social media (Twitter, Reddit)
- Analyst ratings
- Insider trading activity
```
### 5. Thematic Analyst Agent
```python
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
```
### 6. Disruption Analyst Agent
```python
Capabilities:
- Analyze whether a company is a market disruptor or at risk of disruption
- R&D intensity analysis (R&D/Revenue ratio, trend vs industry benchmarks)
- Revenue growth acceleration/deceleration tracking
- Gross margin trajectory analysis (expansion = competitive moat)
- Disruption scoring (0-100) with weighted components
- Classification: Active Disruptor, Moderate Innovator, Stable Incumbent, At Risk
- Industry-specific benchmarks for 18+ industries
- Risk factor and competitive strength identification
- Multi-company disruption comparison with ranking
- LLM-generated qualitative competitive assessment (optional)
Disruption Classification:
- Active Disruptor (70+) : High R&D, accelerating growth, expanding margins
- Moderate Innovator (50-70): Some disruptive signals, mixed trajectory
- Stable Incumbent (30-50) : Established position, limited innovation
- At Risk (<30) : Low innovation, weak growth, margin pressure
Scoring Components:
- R&D Intensity Score (35% weight): Innovation investment vs industry
- Revenue Growth Score (40% weight): Growth rate and acceleration
- Margin Trajectory Score (25% weight): Gross margin expansion/contraction
```
### 7. Earnings Analyst Agent
```python
Capabilities:
- Track quarterly EPS actuals vs analyst estimates
- Analyze beat/miss patterns and management guidance accuracy
- Calculate quarter-over-quarter and year-over-year trends
- Assess earnings quality (operational vs one-time items)
- Identify upcoming earnings dates and estimate trends
- Compare earnings profiles across sector peers
- LLM-generated earnings narrative (optional)
Earnings Pattern Classification:
- Consistent Beater (80%+ beat rate): Management under-promises, reliable execution
- Regular Beater (60-80%) : Tends to exceed expectations
- Mixed Results (40-60%) : Unpredictable earnings, higher risk
- Regular Misser (20-40%) : Tends to disappoint
- Consistent Misser (<20%) : Credibility concerns
Earnings Quality Score (1-10):
- High Quality (8-10) : Driven by operations, sustainable
- Good Quality (6.5-8) : Primarily operational with minor concerns
- Average Quality (5-6.5) : Some non-operational factors present
- Below Average (3.5-5) : Significant non-operational items
- Low Quality (1-3.5) : Earnings not reflective of core operations
Key Metrics:
- Beat Rate % : Percentage of quarters exceeding estimates
- Average Surprise % : Mean EPS surprise across quarters
- Revenue/Income Trends : QoQ and YoY growth trajectory
- Margin Trajectory : Gross margin expansion/contraction pattern
```
### 8. Performance Analyst Agent
```python
Capabilities:
- Multi-horizon absolute returns (1D, 1W, 1M, 3M, 6M, YTD, 1Y, 3Y, 5Y)
- Benchmark comparison vs S&P 500 (SPY), Nasdaq 100 (QQQ), and sector ETF
- Auto-detection of sector ETF based on company sector (12 sector mappings)
- Alpha calculation across horizons with outperform/underperform assessment
- Risk-adjusted metrics: Sharpe ratio, Sortino ratio, Beta, volatility
- Rolling 30-day returns with momentum trend analysis
- Drawdown analysis: max drawdown, recovery time, current drawdown
- Daily return statistics: mean, median, best/worst day, positive day %
Risk-Adjusted Ratings:
- Excellent (2.0+) : Superior risk-adjusted performance
- Good (1.0-2.0) : Above-average risk-adjusted returns
- Moderate (0.5-1.0): Acceptable risk-reward balance
- Poor (<0.5) : Risk not adequately compensated
Benchmark Comparison:
- vs S&P 500 (SPY) : Broad market comparison
- vs Nasdaq 100 (QQQ) : Growth/tech benchmark
- vs Sector ETF (XLK, etc.) : Industry-specific comparison
Sector ETF Mappings:
- Technology: XLK - Healthcare: XLV - Financials: XLF
- Consumer Cyclical: XLY - Consumer Defensive: XLP - Communication: XLC
- Industrials: XLI - Energy: XLE - Utilities: XLU
- Real Estate: XLRE - Basic Materials: XLB
```
### 9. Sentiment Engine
```python
Capabilities:
- FinBERT financial-domain sentiment analysis (when transformers installed)
- VADER with 60+ financial-domain lexicon enhancements (default fallback)
- Per-article scoring with confidence and label (Positive/Negative/Neutral)
- Time-weighted aggregate scoring (recent articles weighted higher)
- News volume tracking with spike detection (2.5x+ normal = significant)
- Sentiment trend analysis over time with direction/momentum
- Source diversity assessment (broad/moderate/limited/single-source)
- Topic extraction for key themes (earnings, analyst, product, regulation, etc.)
- News-price correlation signal
Sentiment Engines:
- FinBERT (ProsusAI/finbert) : Financial-domain transformer, high accuracy
- VADER + Financial Lexicon : Fast, no GPU required, enhanced with 60+ terms
Financial Lexicon Additions:
- Positive: beat, outperform, upgrade, bullish, rally, surge, catalyst, tailwind
- Negative: miss, downgrade, bearish, selloff, plunge, bankruptcy, headwind, fraud
Volume Spike Detection:
- 2.5x+ normal : Significant event coverage
- 1.5x+ normal : Elevated interest
- Below 1.5x : Normal news flow
```
---
## ๐ 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
```bash
# 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 market disruption analysis tests
pytest tests/test_disruption.py -v
# Run quarterly earnings analysis tests
pytest tests/test_earnings.py -v
# Run peer comparison tests
pytest tests/test_peer_comparison.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
```yaml
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 (ReAct reasoning, confidence scoring)
โ โ โโโ orchestrator.py # Orchestrator (cross-agent conflict detection, RAG ingestion)
โ โ โโโ rag_mixin.py # RAG mixin for document-aware agents โจ
โ โ โโโ data_collector.py # Data collection agent
โ โ โโโ technical.py # Technical analysis (multi-step reasoning prompts) โจ
โ โ โโโ fundamental.py # Fundamental analysis (SEC filings via RAG) โจ
โ โ โโโ sentiment.py # Sentiment analysis (transcript tone analysis) โจ
โ โ โโโ risk.py # Risk analysis (layered risk assessment) โจ
โ โ โโโ thematic.py # Thematic investing analysis agent
โ โ โโโ disruption.py # Market disruption analysis agent
โ โ โโโ earnings.py # Quarterly earnings 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 โจ
โ โ โโโ disruption_metrics.py # R&D, growth, margin & disruption scoring โจ
โ โ โโโ earnings_data.py # Quarterly earnings data & quality scoring โจ
โ โ โโโ performance_tracker.py # Multi-horizon returns & benchmark comparison โจ
โ โ โโโ sentiment_engine.py # FinBERT/VADER financial sentiment scoring โจ
โ โ โโโ news_impact.py # News volume, trends & source diversity โจ
โ โ โโโ event_analyzer.py # Event calendar, price windows & pattern analysis โจ
โ โ โโโ strategy_definitions.py # 9 trading strategies (incl. mean reversion, breakout) โจ
โ โ โโโ backtesting_engine.py # Backtest + walk-forward + multi-asset โจ
โ โ โโโ strategy_optimizer.py # Genetic algorithm parameter tuning โจ
โ โ โโโ insight_engine.py # Rule-based observations & ranking
โ โ โโโ llm_insight_engine.py # LLM-powered synthesis + historical context โจ
โ โ โโโ document_search.py # RAG-powered SEC filing & transcript search โจ
โ โ โโโ macro_data.py # FRED API: rates, CPI, GDP, yields โจ
โ โ โโโ social_sentiment.py # Reddit sentiment + composite scoring โจ
โ โ โโโ dcf_model.py # DCF valuation (WACC, 3 scenarios, sensitivity) โจ
โ โ โโโ ml_forecast.py # ML price forecasting (GradientBoosting) โจ
โ โ โโโ anomaly_detector.py # Volume/price anomalies + regime detection โจ
โ โ โโโ portfolio_optimizer.py # Markowitz, efficient frontier, risk-parity โจ
โ โ โโโ benchmark.py # Alpha/beta/tracking error, attribution โจ
โ โ โโโ monte_carlo.py # GBM simulation, VaR/CVaR, portfolio risk โจ
โ โ โโโ factor_model.py # Fama-French factor decomposition โจ
โ โ โโโ brinson_attribution.py # Brinson-Fachler performance attribution โจ
โ โ โโโ tax_loss_harvesting.py # Tax-loss harvesting + wash sale warnings โจ
โ โ โโโ supply_chain.py # Supplier/customer/competitor mapping โจ
โ โ โโโ alerts.py # Real-time alert engine (9 types) โจ
โ โ โโโ scheduled_reports.py # Digest generation + SMTP delivery โจ
โ โ โโโ report_export.py # PDF (reportlab) + Excel (openpyxl) export โจ
โ โ โโโ insider_activity.py # Insider txns, institutional holdings & smart money
โ โ โโโ options_analyzer.py # Options flow, IV skew, max pain & unusual activity
โ โโโ rag/ # RAG Pipeline โจ
โ โ โโโ __init__.py
โ โ โโโ ingester.py # SEC EDGAR document ingestion
โ โ โโโ embedder.py # Sentence Transformer embedding pipeline
โ โ โโโ retriever.py # Similarity search + cross-encoder re-ranking
โ โโโ data/ # Multi-Provider Data Layer โจ
โ โ โโโ __init__.py
โ โ โโโ provider.py # Abstract interface + YFinance + fallback wrapper
โ โ โโโ fmp_provider.py # Financial Modeling Prep provider
โ โ โโโ alphavantage_provider.py # Alpha Vantage provider
โ โ โโโ validator.py # Data quality validation & outlier detection
โ โโโ models/
โ โ โโโ __init__.py
โ โ โโโ analysis.py # Analysis data models
โ โ โโโ report.py # Report data models
โ โ โโโ persistence.py # SQLAlchemy ORM: users, watchlists, portfolios, history โจ
โ โโโ api/
โ โ โโโ __init__.py
โ โ โโโ routes.py # API routes + WebSocket alerts endpoint
โ โ โโโ schemas.py # Pydantic schemas
โ โ โโโ security.py # API key auth, rate limiting, input sanitization โจ
โ โโโ 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 โจ
โ โโโ test_disruption.py # Market disruption analysis tests โจ
โ โโโ test_earnings.py # Quarterly earnings analysis tests โจ
โ โโโ test_performance.py # Performance tracking tests โจ
โ โโโ test_events.py # Event-driven performance tests โจ
โ โโโ test_backtest.py # Backtesting engine tests โจ
โ โโโ test_observations.py # Key observations & insights tests โจ
โ โโโ test_insiders.py # Insider & institutional activity tests โจ
โ โโโ test_options.py # Options flow analysis tests โจ
โโโ frontend/ # Streamlit web dashboard โจ
โ โโโ app.py # Main entry point & landing page
โ โโโ requirements.txt # Streamlit dependencies
โ โโโ assets/style.css # Dark/light theme CSS + mobile responsive โจ
โ โโโ pages/
โ โ โโโ 1_Dashboard.py # Market overview & quick analysis
โ โ โโโ 2_Stock_Analysis.py # Technical + fundamental + sentiment
โ โ โโโ 3_Thematic_Investing.py # Theme browser & analysis
โ โ โโโ 4_Peer_Comparison.py # Side-by-side peer metrics
โ โ โโโ 5_Market_Disruption.py # Disruption scoring
โ โ โโโ 6_Quarterly_Earnings.py # EPS tracking & quality
โ โ โโโ 7_Portfolio_Analysis.py # Multi-stock portfolio
โ โ โโโ 8_Reports.py # Generate & download reports
โ โ โโโ 9_News.py # Financial news feed
โ โ โโโ 10_Performance.py # Historical performance tracking
โ โ โโโ 11_Sentiment.py # Enhanced news & sentiment analysis
โ โ โโโ 12_ETF_Screener.py # ETF screening & analysis
โ โ โโโ 13_Macro_Economy.py # FRED macro indicators & rate environment โจ
โ โโโ components/ # Reusable UI components
โ โ โโโ sidebar.py # Navigation sidebar
โ โ โโโ charts.py # TradingView chart wrappers
โ โ โโโ plotly_charts.py # Plotly visualizations
โ โ โโโ metrics_cards.py # KPI cards & badges
โ โ โโโ data_tables.py # Styled dataframes
โ โโโ utils/
โ โโโ data_service.py # Cached tool wrappers
โ โโโ formatters.py # Number/date formatting
โ โโโ theme.py # Dark/light theme toggle + CSS injection โจ
โ โโโ session.py # Session state management
โโโ data/
โ โโโ sample_data.csv
โโโ docs/
โ โโโ ARCHITECTURE.md # System architecture design document โจ
โ โโโ IMPLEMENTATION_PLAN.md # 4-phase implementation roadmap โจ
โ โโโ GAP_ANALYSIS.md # Gap analysis vs smart financial analyzer โจ
โ โโโ 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](CONTRIBUTING.md) 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](LICENSE) file for details.
---
## ๐ Acknowledgments
- [LangChain](https://langchain.com/) - AI Agent Framework
- [Ollama](https://ollama.ai/) - Local LLM Inference
- [Yahoo Finance](https://finance.yahoo.com/) - Market Data (Primary)
- [Financial Modeling Prep](https://financialmodelingprep.com/) - Financial Data API
- [Alpha Vantage](https://www.alphavantage.co/) - Financial Data API
- [FRED](https://fred.stlouisfed.org/) - Federal Reserve Economic Data
- [ChromaDB](https://www.trychroma.com/) - Vector Store for RAG
- [Sentence Transformers](https://www.sbert.net/) - Embeddings
- [scikit-learn](https://scikit-learn.org/) - ML Forecasting
- [SciPy](https://scipy.org/) - Portfolio Optimization
---
**Created by ๐ค Antigravity AI (Google DeepMind)**
**Author: Gopal Saini**
_Part of the AI Agents Case Studies Collection_
[โฌ Back to Top](#-financial-research-analyst-agent)