The AI-Native Bloomberg Terminal Institutional-grade investment intelligence for everyone.
Athena is an AI-powered trading platform that combines real-time market data, SEC filing analysis, social sentiment, and paper trading into a single conversational interface. Ask questions in plain English, get answers backed by multiple sources, and execute tradesβall in one place.
Modern retail traders juggle multiple tools:
- Bloomberg Terminal for institutional research ($24,000/year)
- TradingView for charts and technicals
- SEC EDGAR for company filings (raw, unreadable documents)
- Reddit/Twitter for sentiment and crowdsourced alpha
- Brokerage apps for trade execution
- Google for connecting the dots
Each tool is siloed. None of them talk to each other. And none of them remember what you care about.
Athena is a unified AI assistant that:
- Answers questions using hybrid RAG on SEC 10-Ks, real-time web search, and social sentiment
- Visualizes markets with interactive price charts and time-range selection
- Executes trades via Alpaca's paper trading API (no real money at risk)
- Remembers everything using Hyperspell's semantic memory layer
- Cites sources with proper attribution to EDGAR filings, news articles, and social posts
Ask "Why did NVDA spike in Q2 2023?" and get a synthesized answer from earnings reports, analyst coverage, and Reddit sentimentβwith citations.
Ask questions in plain English. Athena gathers context from:
- Perplexity API - Real-time web search for breaking news and analyst reports
- SEC EDGAR - Company fundamentals from 10-K/10-Q filings (RAG-powered)
- Browser-Use - Social sentiment from Reddit and Twitter/X
- Hyperspell - Your personal trading history and past decisions
All answers include cited sources organized by type (EDGAR filings, web articles, social posts).
Don't read 200-page 10-Ks. Ask Athena instead.
Our RAG system uses:
- Vector search for semantic similarity (embeddings via OpenAI)
- Keyword search for exact phrase matching (BM25-style text search)
- Reciprocal Rank Fusion (RRF) to combine both approaches
- 2000-character chunks with 400-character overlap to preserve financial context
Ask "What are NVDA's main risks?" and get answers from the actual Risk Factors sectionβnot hallucinations.
- Live candlestick charts powered by Lightweight Charts
- Multiple timeframes: 1D, 1W, 1M, 3M, 6M, 1Y
- Select time ranges directly on the chart
- Historical data with infinite scroll
- Execute market and limit orders via Alpaca's paper trading API
- Track positions, account balance, and buying power
- View trade history with entry/exit prices
- All trades logged to memory for AI analysis
Athena uses Hyperspell to remember:
- Questions you've asked about specific stocks
- Trades you've executed (with rationale)
- AI recommendations you've received
- Your risk profile and trading patterns
Future queries reference past context: "You asked about NVDA two weeks agoβyou bought 100 shares at $485. It's now $515 (+6.2%)."
- Custom watchlist (up to 5 stocks)
- One-click ticker switching
- Real-time position tracking
- Portfolio dashboard with unrealized P&L
- Next.js 16 - Full-stack React framework
- TypeScript - Type-safe development
- Tailwind CSS - Utility-first styling
- Lightweight Charts - Performant candlestick charts
- Radix UI - Accessible component primitives
- Convex - Real-time database with built-in vector and text search
- Better Auth - Modern authentication system
- Next.js API Routes - Serverless endpoints
- OpenAI GPT-4 Turbo - Answer synthesis and reasoning
- Perplexity API - Real-time web search
- Hyperspell - Semantic memory layer
- LangChain - Document processing and text splitting
- Alpaca Trade API - Paper trading execution
- Polygon.io - Historical and real-time market data
- SEC EDGAR API - Company filings (10-K, 10-Q, 8-K)
- Browser-Use - Python FastAPI microservice for social media scraping
- Sentiment analysis from Reddit and Twitter/X
- Node.js 18+ and npm
- Python 3.11+ (for Browser-Use microservice)
- API keys for:
- Convex
- OpenAI
- Perplexity
- Alpaca (paper trading)
- Polygon.io
- Hyperspell (optional)
- Browser-Use (optional, $10 free credit)
- Clone the repository
git clone https://github.com/yourusername/athena.git
cd athena- Install dependencies
npm install- Set up environment variables
cp .env.example .env.local
# Edit .env.local and add your API keysRequired variables:
# Convex
NEXT_PUBLIC_CONVEX_URL=https://your-project.convex.cloud
# OpenAI
OPENAI_API_KEY=sk-...
# Perplexity
PERPLEXITY_API_KEY=pplx-...
# Alpaca (Paper Trading)
ALPACA_API_KEY=PK...
ALPACA_SECRET_KEY=...
ALPACA_BASE_URL=https://paper-api.alpaca.markets
# Polygon.io
POLYGON_API_KEY=...
# Better Auth
BETTER_AUTH_SECRET=<generate with: openssl rand -base64 32>
SITE_URL=http://localhost:3000
# Optional: Hyperspell (for memory)
HYPERSPELL_API_KEY=...
# Optional: Browser-Use (for social sentiment)
BROWSERUSE_API_KEY=...- Deploy Convex schema
npx convex devThis creates the necessary tables and indexes for:
- User authentication (Better Auth)
- SEC filing chunks (vector + text search)
- Price alerts and trading history
- Start the development server
npm run dev- (Optional) Start Python microservice for social scraping
cd python-service
uv venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
uv pip install -e .
uvx browser-use install # Install Chromium
python main.pyThe Python service runs on http://localhost:8001 and provides Reddit/Twitter scraping.
- Sign up at
http://localhost:3000 - Search for a ticker (e.g., "NVDA")
- Ingest SEC filings - Click "Load 10-K" to enable RAG on company filings
- Ask questions - "What are the main risk factors?"
- Execute a paper trade - Use the Trading Panel to buy/sell
User: "Why did NVDA spike between April and June 2023?"
Athena: Based on multiple sources:
π SEC EDGAR (10-Q Filing):
- Q1 2023 revenue up 19% YoY driven by data center demand
- Data center revenue: $4.28B (+14% YoY)
π Web Sources:
- Jensen Huang announced new H100 GPUs at GTC 2023 (March 21)
- Microsoft, Google, AWS signed major cloud contracts
- ChatGPT boom drove unprecedented AI chip demand
π± Social Sentiment:
- Reddit r/wallstreetbets: 847 mentions (87% positive)
- Top post: "NVDA to the moon - AI revolution just started"
Sources: [10-Q Filing], [Bloomberg], [TechCrunch], [Reddit]
User: "What are TSLA's main revenue sources?"
Athena: According to TSLA's latest 10-K:
1. Automotive Sales (81% of revenue)
- Model 3/Y: $67.2B
- Model S/X: $7.8B
2. Energy Generation & Storage (6%)
- Solar: $3.9B
- Powerwall/Megapack: $2.1B
3. Services & Other (13%)
- Supercharging network
- Vehicle insurance
- FSD subscriptions
Source: [TSLA 10-K 2023, Item 7]
User: "Should I sell my NVDA position?"
Athena: Context from your trading history:
- You bought 50 shares at $485.30 on Oct 15, 2024
- Current price: $515.80 (+6.3%)
- Unrealized gain: $1,525
Based on current analysis:
- NVDA up 12% this week on strong H100 demand
- Analysts raised PT to $600 (avg)
- Social sentiment: 82% bullish
Your typical pattern: You tend to take profits at +15% gains.
Recommendation: Consider scaling out 50% now, let rest run with trailing stop at +5%.
[This is paper trading advice - not financial advice]
| Endpoint | Method | Purpose |
|---|---|---|
/api/market-data |
GET | Fetch OHLCV data (Polygon.io) |
/api/ai/chat |
POST | Main AI chat with streaming |
/api/ai/perplexity |
POST | Web search for current info |
/api/ai/edgar |
GET | List SEC filings for ticker |
/api/ai/edgar/ingest |
POST | Ingest & chunk 10-K documents |
/api/ai/edgar/query |
POST | RAG query on filings |
/api/ai/social |
POST | Social sentiment scraping |
/api/trading/order |
POST | Place market/limit orders |
/api/trading/positions |
GET | Current holdings |
/api/trading/account |
GET | Account balance |
/api/trading/history |
GET | Trade history |
User Question
β
Main Chat API (/api/ai/chat)
β
βββββββββββββββββββββββββββββββββββββββββββ
β Parallel Context Gathering β
β ββ Perplexity (web search) β
β ββ EDGAR RAG (vector + keyword search) β
β ββ Browser-Use (social sentiment) β
β ββ Hyperspell (user memory) β
βββββββββββββββββββββββββββββββββββββββββββ
β
GPT-4 Turbo (synthesize answer)
β
Stream response with citations
β
Store interaction in Hyperspell
10-K Document (EDGAR API)
β
Section Extraction (regex)
β
Text Splitting (LangChain)
ββ 2000 char chunks
ββ 400 char overlap
β
Generate Embeddings (OpenAI)
β
Store in Convex
ββ Vector index (semantic search)
ββ Text index (keyword search)
β
User Query
β
Hybrid Search
ββ Vector similarity search
ββ Keyword text search
ββ RRF merge (best of both)
β
Top 5 chunks β GPT-4 for synthesis
- Interactive price charts
- AI chat with streaming responses
- Hybrid RAG on SEC filings
- Perplexity web search integration
- Paper trading (Alpaca)
- Hyperspell memory layer
- AgentMail integration
- Email webhook handling
- Price alert sending
- Daily digest emails
- Reply-to-trade functionality
- LiveKit voice mode integration
- Real-time collaborative annotations
- Shared watchlists and portfolios
- Team chat rooms
- Custom technical indicators
- Portfolio backtesting
- Risk analysis dashboard
- Sector exposure heat maps
- Real trading (live Alpaca API)
- Multi-broker support
- Mobile app (React Native)
- Enterprise tier (teams, compliance)
athena/
βββ src/
β βββ app/
β β βββ api/ # Next.js API routes
β β β βββ ai/ # AI endpoints (chat, perplexity, edgar)
β β β βββ trading/ # Alpaca trading endpoints
β β β βββ auth/ # Better Auth routes
β β β βββ market-data/ # Polygon.io data fetching
β β βββ page.tsx # Main app UI
β βββ components/ # React components
β β βββ PriceChart.tsx # Lightweight Charts wrapper
β β βββ PortfolioDashboard.tsx
β β βββ TradingPanel.tsx
β βββ lib/ # Utility libraries
β βββ alpaca.ts # Alpaca client
β βββ hyperspell.ts # Hyperspell client
β βββ auth.ts # Better Auth config
βββ convex/ # Convex backend
β βββ schema.ts # Database schema
β βββ secFilings.ts # RAG queries
β βββ paperTrades.ts # Trade tracking
β βββ auth.ts # Better Auth integration
βββ python-service/ # Browser-Use microservice
β βββ main.py # FastAPI server
βββ public/ # Static assets
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
MIT License - see LICENSE for details
Built with:
- Convex - Real-time database
- OpenAI - GPT-4 language models
- Perplexity - Real-time search
- Hyperspell - Semantic memory
- Alpaca - Commission-free trading API
- Browser-Use - Browser automation
Questions? Issues? Reach out:
- GitHub Issues: Create an issue
- Email: your-email@example.com
Disclaimer: Athena is for educational and research purposes. Paper trading only. Not financial advice. Trade at your own risk.