Spaces:
Sleeping
Sleeping
A newer version of the Gradio SDK is available:
5.49.1
metadata
title: Financial Research Agent
emoji: π
colorFrom: blue
colorTo: green
sdk: gradio
sdk_version: 5.49.0
app_file: app.py
pinned: false
license: mit
π Financial Research Agent
Multi-agent equity analysis combining SEC filings with real-time market intelligence
π Try Live Demo β
π― What This Does
A production-grade financial analysis system that combines:
- Domain-specific ML models (FinBERT, SEC-BERT) for fundamental analysis
- Gemini 2.0 Flash for intelligent synthesis and reasoning
- LIME explainability to show which words drive predictions
- Multi-agent orchestration for comprehensive equity research
Architecture Flow
graph LR
A[User Input: Ticker] --> B[SEC Filing Agent]
A --> C[Market Intelligence Agent]
B --> D[FinBERT/SEC-BERT Sentiment]
B --> E[LIME Explainability]
C --> F[yfinance Market Data]
C --> G[NewsAPI Articles]
G --> H[Gemini News Sentiment]
D --> I[Synthesis Agent]
E --> I
F --> I
H --> I
I --> J[Gemini 2.0 Flash]
J --> K[Investment Recommendation]
Agent Pipeline:
- SEC Filing Agent: Analyzes 10-K/10-Q/8-K filings with FinBERT + SEC-BERT, extracts actual risk sentences
- Market Intelligence Agent: Gathers real-time price data, technicals (RSI/MACD), and news with Gemini-powered sentiment
- Synthesis Agent: Gemini 2.0 Flash cross-references fundamentals vs. market action for final recommendation
π How to Use
- Enter a stock ticker (e.g., TSLA, AAPL, RBLX)
- Optionally add company name for better news search
- Select SEC filing type (10-K for annual, 10-Q for quarterly)
- Click Analyze
- Wait ~1-2 minutes for comprehensive analysis
π¬ What Makes This Different
Unlike basic sentiment tools, this platform:
- β Hybrid Intelligence: Combines domain-specific ML (FinBERT/SEC-BERT) with LLM reasoning (Gemini 2.0 Flash)
- β Explainable AI: LIME shows which words drive sentiment predictions
- β Actual SEC Filings: Extracts real risk sentences from 10-K/10-Q/8-K, not generic summaries
- β Cross-Validation: What companies say (filings) vs. what markets do (price/news)
- β Deterministic: Reproducible results with fixed random seeds for consistent analysis
βοΈ Configuration
Required Environment Variables:
SEC_EMAIL: Your email (SEC EDGAR compliance)NEWS_API_KEY: NewsAPI key (get free tier)GEMINI_API_KEY: Google Gemini API key (get free tier)
Note:
- First run downloads ML models (~500MB) - subsequent analyses are much faster
- Without Gemini API key, falls back to rule-based synthesis (less sophisticated)
π οΈ Tech Stack
AI/ML:
- Domain-Specific Models: FinBERT, SEC-BERT (financial sentiment analysis)
- LLM: Gemini 2.0 Flash (synthesis and reasoning)
- Explainability: LIME (Local Interpretable Model-agnostic Explanations)
Data Sources:
- SEC EDGAR (official filings)
- yfinance (market data)
- NewsAPI (news sentiment)
Infrastructure:
- Framework: Custom multi-agent orchestration
- Interface: Gradio 5.0+
- Deployment: Hugging Face Spaces
- Language: Python 3.10+
β¨ Key Features
- π Multi-Filing Support: Analyze 10-K (annual), 10-Q (quarterly), or 8-K (current) reports
- π§ Hybrid AI: Domain-specific models + LLM reasoning for best of both worlds
- π Explainable Results: See which words influenced sentiment predictions
- π Comprehensive Analysis: Fundamental (SEC) + Technical (RSI/MACD) + News sentiment
- π― Risk Extraction: Extracts actual risk sentences from filings, not generic summaries
- π Deterministic: Same ticker = same results (reproducible with fixed seeds)
π Limitations
- SEC filings updated quarterly/annually (not real-time)
- NewsAPI free tier: 100 requests/day
- First analysis takes longer (model download ~500MB)
- Analysis time: 1-3 minutes depending on data availability
- yfinance may occasionally face rate limiting
π Local Development
# Clone repository
git clone https://github.com/SanchitSharma10/financial-research-agent.git
cd financial-research-agent
# Install dependencies
pip install -r requirements.txt
# Set environment variables
export SEC_EMAIL="[email protected]"
export NEWS_API_KEY="your_newsapi_key"
export GEMINI_API_KEY="your_gemini_key" # Optional
# Run locally
python app.py
Visit http://localhost:7860 in your browser.
π Links
- Live Demo: Hugging Face Spaces
- GitHub: SanchitSharma10/financial-research-agent
- Author: Sanchit Sharma
β οΈ Important Disclaimer
This tool is for research and educational purposes only. NOT financial advice.
- Do not make investment decisions based solely on this analysis
- Always conduct your own due diligence and consult with financial professionals
- Past performance does not guarantee future results
- The creators assume no liability for financial decisions made using this tool
π License
MIT License - See LICENSE file