An intelligent trading platform powered by multiple AI agents that collaborate to analyze markets, manage portfolios, and execute trades with sophisticated risk management.
- ๐ Overview
- ๐ ๏ธ Tech Stack
- ๐ How It Works
- ๐ Usage
- ๐ License
- ๐ฌ Support
- ๐ Self Deployment
- ๐ง Development
- ๐ Acknowledgments
TradingGoose focuses on event-driven trading strategy and analysis that harnesses the power of AI agents and Alpaca's market data to deliver sophisticated trading recommendations and automated portfolio management insights. The system employs a multi-agent workflow architecture where specialized AI agents collaborate to analyze market-moving events in real-time.
The system leverages Large Language Models' natural language processing capabilities to rapidly analyze news, social media, and other textual data sources that often trigger market volatility. By processing these events faster than traditional methods, TradingGoose identifies potential market movements and generates timely trading signals for user-selected stocks.
Once analysis agents provide their recommendations, the Portfolio Manager AI agent takes over to:
- Analyze the user's Alpaca account details and current portfolio state
- Consider user-configured position sizing, allocation strategies, and risk tolerance
- Generate final trading orders with precise values and actions for specific tickers
- Make autonomous decisions that may differ from initial recommendations based on actual portfolio constraints and risk management
This two-layer approach ensures that while the analysis agents focus on identifying opportunities, the portfolio manager maintains discipline in execution, potentially overriding recommendations when they conflict with portfolio health, risk limits, or allocation rules.
This project's multi-agent analysis workflow architecture is based on the TauricResearch/TradingAgents framework, which pioneered the concept of collaborative AI agents for financial analysis.
- React 18 with TypeScript
- Vite for fast development and building
- TailwindCSS for styling
- Shadcn/ui component library
- React Router for navigation
- Recharts for data visualization
- Supabase for database, authentication, and real-time updates
- Edge Functions for serverless API endpoints & running workflow in background
- PostgreSQL for data persistence
- Row Level Security (RLS) for data isolation
- Alpaca Markets API for market data and trade execution
- Customizable AI Providers for agent intelligence (OpenAI, Anthropic, Google, and more)
When you initiate a stock analysis, TradingGoose orchestrates a sophisticated multi-agent workflow:
Note: This workflow architecture is adapted from the TauricResearch/TradingAgents framework.
1. ๐ Data Analysis Phase
- ๐ Macro Analyst: Government data and economic indicators
- ๐ Market Analyst: Historical data and technical indicators
- ๐ฐ News Analyst: Latest news and sentiment analysis
- ๐ฌ Social Media Analyst: Social platform trends and impact
- ๐ฐ Fundamentals Analyst: Financial statements and profitability
2. ๐ Research & Debate Phase
- ๐ Bull Researcher agent presents positive evidence and growth potential
- ๐ป Bear Researcher agent identifies risks and presents cautionary analysis
- โ๏ธ Both perspectives are rigorously evaluated for balance
3. โ ๏ธ Risk Assessment Phase
- Three specialized risk agents analyze from different perspectives:
- ๐ก๏ธ Safe Agent: Conservative approach focusing on capital preservation
- โ๏ธ Neutral Agent: Balanced view weighing opportunities against risks
- ๐ Risky Agent: Aggressive stance for high-growth potential
4. ๐งฉ Decision Synthesis
- ๐ Research Manager consolidates all agent insights
- ๐ฏ Risk Manager combines analyses with defined risk parameters
- ๐ผ Portfolio Manager evaluates position sizing and portfolio impact
5. โ Execution Ready
- ๐ Final recommendations are presented with confidence scores
- ๐ฆ Trade signals are generated based on collective intelligence
- ๐ All analysis is logged for historical tracking
- Navigate to the Dashboard
- Enter a stock ticker in the search bar
- Click "Analyze" to trigger the multi-agent workflow
- Monitor progress in real-time through the workflow visualization
- Review comprehensive insights from all agents
This project is licensed under the AGPL-3.0 License - see the LICENSE file for details.
For issues, questions, or suggestions:
- Open an issue on GitHub
- Join our Discord community for support and discussions! ๐ฎ
- Node.js (v18 or higher)
- npm or yarn
- A Supabase account (free tier available)
- Perplefina (AI-powered search API) - See setup instructions below
Perplefina is a required component that provides AI-powered web search capabilities for the trading agents.
-
Clone and Install Perplefina
# Clone the Perplefina repository git clone https://github.com/Trading-Goose/Perplefina.git cd Perplefina # Install dependencies npm install
-
Configure Perplefina
- Follow the setup instructions in the Perplefina repository
- Configure your AI provider API keys (OpenAI, Anthropic, etc.)
- Set up your search provider credentials
-
Deploy Perplefina
Since Supabase edge functions need to access Perplefina from the internet, you must deploy it publicly:
** Deploy to a Cloud Service**
- Deploy to Railway, Render, Heroku, or any cloud platform
- Follow the deployment instructions in the Perplefina repository
- Note your public URL (e.g.,
https://your-perplefina.railway.app)
-
Create a Supabase Project
- Go to Supabase and create a new project
- Note your project URL, anon key, and access token for later use
- To get your access token:
- Go to your Supabase project settings
- Navigate to API settings
- Find your service role key (this will be used as the access token)
-
Set up Database Schema
- Navigate to the
supabasedirectory in this project - Copy the contents of
schema.sql - In your Supabase project dashboard, go to the SQL Editor
- Paste the
schema.sqlcontent into the editor - Run the SQL script to create all necessary functions, tables, and rows
- Navigate to the
-
Configure Edge Function Secrets
Option A: Via Supabase Web Interface (Recommended)
- Go to your Supabase Dashboard
- Select your project
- Navigate to Settings โ Edge Functions
- Click on the Secrets tab
- Click + Add new secret
- Add the following secret:
- Name:
PERPLEFINA_API_URL - Value: Your Perplexica API endpoint (must be publicly accessible from the internet)
- Name:
FUNCTION_ACCESS_TOKEN - Value: JWT service role key copied from project API settings tab
- Name:
- Click Save
Important: The Perplexica URL must be publicly accessible from the internet. Supabase edge functions cannot access
localhostor private network addresses. You need to either:- Deploy Perplexica to a cloud service (e.g., Railway, Render, Heroku)
- Use a tunneling service like ngrok for testing (e.g.,
https://your-id.ngrok.io) - Host it on a server with a public IP address
Option B: Via Supabase CLI
- If you prefer using the command line:
# First, install Supabase CLI if you haven't already npm install -g supabase # Login to Supabase supabase login # Link to your project (you'll need your project ref from Supabase dashboard) supabase link --project-ref your-project-ref # Set the Perplexica API URL secret (must be publicly accessible) supabase secrets set PERPLEFINA_API_URL=https://your-public-perplexica-url.com
-
Deploy Edge Functions
- Set up your Supabase access token:
export SUPABASE_ACCESS_TOKEN=your-access-token-here - Deploy the edge functions:
cd ./Open-TradingGoose bash ./deploy-functions.sh - This will deploy all necessary edge functions for the multi-agent workflow
- Set up your Supabase access token:
-
Configure Environment Variables
- Copy
.env.exampleto.env.local:cp .env.example .env.local
- Edit
.env.localand update the Supabase-related variables:VITE_SUPABASE_URL: Your Supabase project URLVITE_SUPABASE_ANON_KEY: Your Supabase anon key- Add any other required API keys as needed
- Copy
-
Install Dependencies
npm install
-
Build the Project
npm run build
-
Start the Application
npm run start
For development with hot reload:
npm run devThe application will be available at http://localhost:8080 (or the port shown in your terminal).
๐ No humans were harmed in the making of this application!
This entire project was crafted with love by Claude Code - every single line of code, from the sleekest UI component to the smartest trading algorithm, was written by AI. Zero human-written code, 100% AI magic! ๐ช
Who says robots can't be creative? This production-ready financial platform proves that AI can build sophisticated applications that actually work in the real world. Welcome to the future of software development! ๐
- Multi-stock concurrent analysis
- Cancel/delete running analysis
- Retry failed analysis from specific failed agent
- Reactivate stale/stuck analysis workflows
- Real-time workflow visualization with progress tracking
- Historical analysis tracking and audit trail
- Position size configuration (min/max)
- Multi-stock portfolio monitoring
- Paper trading mode for testing
- Live trading execution via Alpaca
- Real-time order status tracking
- Position management and monitoring
- Multiple AI provider support (OpenAI, Anthropic/Claude, Google, DeepSeek)
- Custom max tokens configuration per agent
- Provider failover and retry logic
- Model selection flexibility
- Historical data range selection
- Custom analysis timeframes
- Technical indicator calculations
- Fundamental data integration
- News sentiment analysis
- Social media trend tracking
- User Acount system
- API key management interface
- User activity tracking
- Secure credential storage
- Built with Supabase
- Trading powered by Alpaca Markets
- AI analysis powered by customizable providers (OpenAI, Anthropic, Google, and more)
- UI components from shadcn/ui
- Multi-agent architecture inspired by TauricResearch/TradingAgents
- 100% developed with Claude Code ๐ค
Important: Always conduct your own research and consider consulting with a financial advisor before making investment decisions. Past performance does not guarantee future results.

