AI-powered stock momentum scanner with intelligent research capabilities.
ConvexityAI identifies high-convexity opportunities—stocks with limited downside but massive upside potential—using technical signals, AI-driven research, and real-time market data.
- Tier 1/2 Alert System — Classifies stocks by signal strength based on 52-week positioning, volume, and momentum
- 850+ Stock Universe — Covers energy, materials, tech, biotech, defense, and emerging sectors
- Real-time Scanning — Daily EOD analysis with configurable refresh
- Deep Dive Analysis — Powered by Groq's Llama 3.3 70B for instant company research
- Sentiment Analysis — Aggregates news, social, and market sentiment
- Knowledge Base — Vector search over all past research (LanceDB)
- Interactive Charts — 5Y price history with MA overlays (Plotly)
- Sector Heatmap — Visual breakdown of performance by industry
- Sector Rotation Dashboard — Track momentum across sectors
- Backtesting Engine — Test signal performance over historical data
- Earnings Calendar — Upcoming and recent earnings events
- Insider Activity — Track insider buying/selling signals
- Watchlist & Notes — Personal tracking with annotations
| Component | Technology |
|---|---|
| Frontend | Streamlit |
| Charts | Plotly |
| Market Data | yfinance |
| AI Engine | Groq API (Llama 3.3 70B) |
| Vector DB | LanceDB |
| Database | SQLite |
| Embeddings | Sentence-Transformers |
- Python 3.11+
- Groq API key (free tier available)
# Clone the repository
git clone https://github.com/nickstafford/convexityai.git
cd convexityai
# Create virtual environment
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Configure environment
cp .env.example .env
# Edit .env and add your GROQ_API_KEYstreamlit run app.py- Price up 20%+ from 52-week low
- 52-week low was 30+ days ago
- Price above 20-day MA
- Volume >1.5x average
- Prior 30 days had tight range (<20% spread)
- Price up 10-20% from 52-week low
- Price above 20-day MA
- Elevated volume
ConvexityAI/
├── app.py # Streamlit entry point
├── src/
│ ├── components/ # UI components
│ │ ├── dashboard.py
│ │ ├── stock_detail.py
│ │ ├── charts.py
│ │ └── heatmap.py
│ ├── services/ # Business logic
│ │ ├── scanner.py # Core scanning engine
│ │ ├── ai_research.py # Groq integration
│ │ ├── backtest.py # Historical testing
│ │ └── data_fetcher.py
│ └── utils/
│ ├── database.py # SQLite operations
│ └── knowledge_base.py
├── data/
│ └── stocks_*.csv # Stock universe
└── docs/
└── ARCHITECTURE.md # Detailed architecture
| Dashboard | Stock Detail | AI Research |
|---|---|---|
- Email digest for Tier 1 alerts
- Mobile-responsive layout
- Options flow integration
- Portfolio tracking with P&L
MIT License - see LICENSE for details.
Built by Nick Stafford
