Autonomous AI-Powered Stock Catalyst Detection System
Detect high-impact investment catalysts in real-time from SEC filings, earnings calls, and press releases using advanced LLM analysis and comprehensive market data enrichment.
- Features
- Architecture
- Installation
- Configuration
- Usage
- Data Sources
- Advanced Features
- Examples
- Contributing
- License
- Documentation
- 🤖 Multi-LLM Analysis: Groq, Google Gemini, Claude Code, and Ollama support with intelligent fallback
- 📊 10+ Data Sources: Comprehensive enrichment from free APIs and web sources
- 🔍 Smart Filtering: Positive-only catalyst detection with quality and materiality filters
- 📈 Technical Analysis: RSI, MACD, Bollinger Bands, support/resistance, breakout detection
- 💬 Sentiment Analysis: Multi-source news, Reddit, StockTwits retail sentiment
- 🏦 Institutional Tracking: 13F filings, top holders, ownership changes
- 🔄 Sector Rotation: Real-time sector momentum and hot/cold sector identification
- 📉 Outcome Tracking: Automatic performance tracking post-catalyst for ML learning
- ⚡ Real-time Alerts: Telegram notifications with comprehensive analysis
- 🎨 Rich Formatting: Beautiful, actionable alerts with emoji indicators
✅ Revenue & Earnings: Beats, guidance raises, record results
✅ Products & Innovation: FDA approvals, breakthrough designations, launches
✅ Strategic Moves: M&A, partnerships, contracts, expansions
✅ Capital Actions: Buybacks, dividend increases, debt refinancing
✅ Regulatory: Approvals, patent grants, designations
❌ Filtered Out: Financial distress, losses, lawsuits, warnings, negative catalysts
┌─────────────────────────────────────────────────────────────┐
│ AUTONOMOUS DAEMON │
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
│ │ SEC │ │ Earnings│ │ Press │ │ Form 4 │ │
│ │ Filings │ │ Calls │ │ Releases │ │ Insider │ │
│ └────┬─────┘ └────┬─────┘ └────┬─────┘ └────┬─────┘ │
│ └─────────────┴─────────────┴─────────────┘ │
│ │ │
│ ┌───────▼────────┐ │
│ │ NLP Pipeline │ │
│ │ FinBERT + LLM │ │
│ └───────┬────────┘ │
│ │ │
│ ┌────────────────┼────────────────┐ │
│ │ │ │ │
│ ┌────▼────┐ ┌─────▼─────┐ ┌─────▼─────┐ │
│ │ Quality │ │ Sentiment │ │ Scoring │ │
│ │ Filter │ │ Filter │ │ Engine │ │
│ └────┬────┘ └─────┬─────┘ └─────┬─────┘ │
│ └────────────────┼────────────────┘ │
│ │ │
│ ┌───────▼────────┐ │
│ │ Data Enrichment│ │
│ │ 10+ Free Sources│ │
│ └───────┬────────┘ │
│ │ │
│ ┌───────▼────────┐ │
│ │ Telegram Alert │ │
│ │ + Tracking │ │
│ └────────────────┘ │
└─────────────────────────────────────────────────────────────┘
- Python 3.9+
- TA-Lib C library
- Docker (optional, for containerized deployment)
# Clone repository
git clone https://github.com/yourusername/catalyst-detector.git
cd catalyst-detector
# One-command setup (creates venv, installs deps, sets up DB)
make init
# Edit configuration with your API keys
nano .env
# Start monitoring
make daemon
# View logs
make logs# Create virtual environment
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install TA-Lib
brew install ta-lib # macOS
# OR: sudo apt-get install libta-lib-dev # Ubuntu
# OR: See TA-Lib Windows installation guide
# Install dependencies
pip install -r requirements.txt
# Setup database
python migrations/add_catalyst_outcomes.py
# Configure environment
cp .env.example .env
# Edit .env with your API keys# Build and run with Docker Compose
docker-compose up -d
# View logs
docker-compose logs -f
# Stop
docker-compose down# Copy example configuration
cp .env.example .env
# Edit with your API keys
nano .env# Telegram (for alerts)
TELEGRAM_BOT_TOKEN=your_bot_token
TELEGRAM_CHAT_ID=your_chat_id
# SEC EDGAR
EDGAR_USER_AGENT=your_email@example.com
# LLM (choose at least one)
GROQ_API_KEY=your_groq_key # FREE, fast
GEMINI_API_KEY=your_gemini_key # FREE, multimodal
OLLAMA_BASE_URL=http://localhost:11434 # LOCAL, private# All FREE tier APIs
ALPHA_VANTAGE_KEY=your_key # 25 calls/day
FMP_API_KEY=your_key # 250 calls/day
MARKETAUX_API_KEY=your_key # 100 calls/day# Development workflow
make run # Run single scan
make daemon # Start background daemon
make stop # Stop daemon
make logs # Tail daemon logs
# Code quality
make format # Format with black & isort
make lint # Run linters (flake8, pylint, mypy)
make test # Run tests with coverage
make security # Security audit with bandit
# Utilities
make clean # Clean cache and build artifacts
make update # Update all dependencies# Start daemon
source venv/bin/activate
python src/daemon.py
# Run single scan
python src/main.py
# Test Telegram connection
python -c "from utils.notifications import telegram_notifier; telegram_notifier.send_test_message()"
# Run migrations
python migrations/add_catalyst_outcomes.py# Start service
docker-compose up -d
# View logs
docker-compose logs -f catalyst-detector
# Restart after config changes
docker-compose restart
# Stop service
docker-compose down
# Rebuild after code changes
docker-compose up -d --build| Source | Type | Cost | Limit |
|---|---|---|---|
| SEC EDGAR | Filings | FREE | 10/sec |
| Yahoo Finance | Prices | FREE | Unlimited |
| Finviz | Fundamentals | FREE | Unlimited |
| StockTwits | Sentiment | FREE | Unlimited |
| Social | FREE | Unlimited | |
| Alpha Vantage | Metrics | FREE | 25/day |
| FMP | Analysts | FREE | 250/day |
| Marketaux | News | FREE | 100/day |
Score = (
Materiality × 35% +
Novelty × 15% +
Timing × 10% +
Confidence × 10% +
Sector Momentum × 10% +
Quantitative Impact × 15% +
Peer Comparison × 5%
)Threshold: 60-75/100 (adaptive)
- ❌ Lawsuit spam
- ❌ Low materiality (< $10M)
- ❌ Micro-caps (< $50M)
- ❌ Negative catalysts
- ✅ Only positive opportunities
Every catalyst tracked for 90 days:
- Price performance (1d/3d/7d/14d/30d/90d)
- Max upside/drawdown
- Volume analysis
- Sector comparison
- ML classification
🔔 TICKER - FDA Approval: Breakthrough Designation
📊 Company Overview
*TICKER* - Company Name
Price: $45.23 | Market Cap: $2.3B
Sector: Healthcare
🎯 Catalyst Details
Type: FDA Approval
Impact Score: 87.5/100
Confidence: 92%
⏰ Time Sensitive
📊 Technical Analysis
• RSI: 45.2 ⚪ (Neutral)
• MACD: 🟢 Bullish Crossover
• Support: $42.50 | Resistance: $48.80
📋 Analyst Coverage
• Price Target: $65.00 🚀 (+43.7% upside)
• Analyst Sentiment: 🟢 Bullish
• Last 30d: 3 upgrades, 0 downgrades
💬 StockTwits Sentiment
• 🚀 Very Bullish (247 messages)
• Bull: 78% | Bear: 22%
🏦 Institutional Ownership
• 🟢 68.4% (89 institutions)
• Top: BlackRock (12.3%), Vanguard (9.8%)
🔄 Sector Rotation
• 🔥 Healthcare: Hot Sector (Rank: 3/11)
• 30d Performance: +8.7%
💡 Investment Analysis
...detailed analysis...
🔗 Resources
[SEC] [Chart] [Research]
Contributions welcome! See CONTRIBUTING.md for detailed guidelines.
# Install development dependencies
make install-dev
# Setup pre-commit hooks (auto-format on commit)
pre-commit install
# Create feature branch
git checkout -b feature/amazing-feature
# Make changes, then test
make format # Format code
make lint # Check code quality
make test # Run tests (>80% coverage required)
make security # Security audit
# Commit and push
git add .
git commit -m "feat: add amazing feature"
git push origin feature/amazing-feature# Run all tests with coverage
pytest tests/ -v --cov=src --cov-report=html
# Run specific test file
pytest tests/test_catalyst_detection.py -v
# Run with coverage report
make test
# Open htmlcov/index.html to view coverage- Formatter: Black (line length: 100)
- Import sorting: isort
- Linting: flake8, pylint
- Type checking: mypy
- Docstrings: Google style
- Commits: Conventional Commits format
All enforced via pre-commit hooks and CI/CD.
MIT License - see LICENSE
- Architecture Guide - System design, components, data flow
- Contributing Guidelines - How to contribute
- Security Policy - Security best practices
- Code of Conduct - Community standards
- Changelog - Version history
FOR EDUCATIONAL PURPOSES ONLY. NOT FINANCIAL ADVICE.
- Conduct your own due diligence
- Past performance ≠ future results
- Consult a licensed financial advisor
- Authors not responsible for financial losses