A next-generation autonomous agent that performs deep financial research, risk analysis, and hedge strategy validation in real-time.
stocks-demo-1769491413416.1.1.mp4
- Autonomous Agent Pipeline: Utilizes a
Monitor -> Researcher -> Critic -> Strategistworkflow using LangGraph. - Real-Time Progress: Watch the agent "think" live on the dashboard as it moves through analysis steps.
- Deep Reasoning: Powered by Gemini 2.0 Flash for high-speed, reasoning-heavy financial analysis.
- RAG Memory: Integrated Pinecone vector database to recall historical context and regulatory news.
- Privacy-First MCP: Uses Model Context Protocol (MCP) to securely analyze your local portfolio (
portfolio.csv) without uploading sensitive data to the cloud. - Live Market Data: Real-time stock quotes via Alpaca API.
- Dynamic Dashboard: A premium, dark-mode UI built with Next.js 14 and Framer Motion.
- Frontend: Next.js 14 (App Router), TypeScript, Framer Motion, Lucid React.
- Backend: FastAPI (Python), LangGraph (Agent Orchestration), Pydantic.
- AI & Data: Google Gemini 2.0, Pinecone (Vector DB), Alpaca (Market Data).
- Database: Supabase (PostgreSQL + Auth).
- Security: MCP (Model Context Protocol) for local file access.
- Python 3.11+
- Node.js 18+
- Api Keys: Supabase, Alpaca, Gemini, Pinecone.
# Navigate to project root
cd stocks
# install dependencies
pip install -r backend/requirements.txt
# Run the backend server
python -m backend.app.mainServer runs on http://localhost:8000
# Open a new terminal
cd stocks
# Install packages
npm install
# Start the dashboard
npm run devUI runs on http://localhost:3000
The system uses a State Graph architecture:
- Monitor: Detects price movements or user triggers.
- Researcher: Scrapes news and queries Vector DB (RAG) for context.
- Critic: Validates findings against Prediction Markets (Polymarket).
- MCP: Securely calculates risk exposure against your local portfolio file.
- Strategist: Synthesizes all data to generate a
BUY/SELL/HEDGEsignal.
.envfiles are strictly git-ignored.- Portfolio data is processed locally via MCP where possible.
- Auth is handled securely via Supabase.
Disclaimer: This project is for educational purposes only. Not financial advice.