An intelligent trading platform powered by multiple AI agents that collaborate to analyze markets, manage portfolios, and execute trades with sophisticated risk managementβnow fully open source.
- π Overview
- β¨ Features
- π οΈ Tech Stack
- π How It Works
- π Usage
- π Security Considerations
- π License
- π¬ Support
- π Self Deployment
- π§ Development
- π€ Contributing
- π 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.
- Coordinator Agent: Orchestrates analysis workflows and manages agent collaboration
- Market Analyst: Analyzes market trends and technical indicators
- Fundamentals Analyst: Evaluates company financials and valuation metrics
- News Analyst: Processes and interprets market news and events
- Social Media Analyst: Monitors social sentiment and trending topics
- Risk Analysts (Safe/Neutral/Risky): Provide multi-perspective risk assessments
- Portfolio Manager: Optimizes portfolio allocation and rebalancing
- Real-time Market Analysis: Continuous monitoring of stocks and market conditions
- Multi-Stock Analysis: Analyze multiple stocks simultaneously in a single workflow
- Portfolio Management: Comprehensive portfolio optimization with position sizing and allocation strategies
- Scheduled Rebalancing: Automated portfolio rebalancing on daily, weekly, or monthly schedules
- Live Trade Execution: Real order execution through Alpaca Markets (paper and live trading)
- Risk Assessment: Multi-dimensional risk analysis from conservative to aggressive perspectives
- Workflow Visualization: Real-time tracking of analysis and decision-making processes
- Historical Tracking: Complete audit trail of analyses, trades, and rebalancing activities
- Role-Based Access Control (RBAC): Granular permission system with admin, moderator, and user roles
- Secure Authentication: Supabase-powered authentication with email verification
- Invitation System: Controlled user onboarding through admin-managed invitations
- API Key Management: Secure storage and management of trading API credentials
- 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, DeepSeek, 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 sentiment
- πΌ Fundamentals Analyst: Company financials and earnings reports
- π‘οΈ Risk Analyst Squad: Risk-adjusted insights from conservative, balanced, and aggressive perspectives
2. π§ Opportunity Synthesis
- Agents collaborate to refine opportunities
- Opportunities include conviction scores, risk factors, and recommended actions
- Portfolio manager evaluates current allocations
3. πΌ Portfolio Manager Execution
- Validates proposed trades against portfolio constraints
- Adjusts position sizes for risk and diversification
- Generates final orders prepared for Alpaca execution
4. π Continuous Monitoring
- Tracks market changes and agent statuses
- Detects stalled workflows and triggers retries
- Provides real-time progress updates
- Navigate to the dashboard and select Run Analysis
- Choose tickers and configure analysis parameters
- Initiate analysis and monitor live agent collaboration
- Review generated insights, risk scores, and recommended actions
- Approve or adjust suggested trades before execution
- Go to Settings β Rebalancing
- Configure rebalancing settings (position sizes, thresholds, frequency)
- Schedule automatic rebalancing or trigger manually
- Review proposed changes before execution
- Track rebalancing history and performance
- All API keys are stored encrypted in environment variables
- Database access is controlled through Row Level Security
- User actions are authenticated and authorized through RBAC
- Sensitive operations require admin privileges
- All trades can be executed in paper trading mode for testing
TradingGoose is released under the AGPL-3.0 License. Refer to LICENSE for the full terms.
For issues, questions, or suggestions:
- Open an issue on GitHub
- Join our Discord community
Bring your own TradingGoose instance online using the following workflow.
- Supabase CLI (latest version)
- Node.js 18+
- npm or pnpm
- Alpaca Markets account (paper trading is supported)
- Perplexica/Perplefina instance or another compatible LLM orchestration layer
Perplefina provides the external research layer that TradingGoose relies on for market news and web context. You need a running instance that the Supabase edge functions can reach.
- Clone and install Perplefina
git clone https://github.com/Trading-Goose/Perplefina.git cd Perplefina npm install - Configure providers
- Follow the configuration instructions in the Perplefina repository
- Add API keys for the AI models you plan to use (OpenAI, Anthropic, Google, DeepSeek, etc.)
- Configure your preferred web search provider credentials
- Deploy Perplefina publicly
- Deploy to Railway, Render, Fly.io, or another cloud host and record the public URL
- Confirm the URL is accessible from the internetβSupabase edge functions cannot reach
localhost
- Record the API endpoint
- You will supply this URL when setting Supabase secrets (
PERPLEFINA_API_URL)
- You will supply this URL when setting Supabase secrets (
- Install Supabase CLI and authenticate:
npx supabase login
- Link the project to your Supabase instance:
npx supabase link --project-ref your-project-ref
- Set required secrets, including your Perplefina URL:
npx supabase secrets set PERPLEFINA_API_URL=https://your-public-perplexica-url.com - Deploy the edge functions powering the multi-agent workflow:
export SUPABASE_ACCESS_TOKEN=your-access-token-here ./deploy-functions.sh
- Install dependencies:
npm install
- Build the static site:
npm run build
- Serve locally or deploy the
distfolder to your hosting provider.npm run dev # development server with hot reload npm run serve # preview the built site after running dev
For hot reload during development:
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!
TradingGoose was crafted with love by Claude Codeβevery line of code, from the sleek UI components to the trading orchestration logic, started life as an AI-generated idea. Now that the project is open source, community contributions keep the goose flying! πͺ
- 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
- Automated scheduled rebalancing (daily/weekly/monthly)
- Manual rebalancing triggers
- 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 account system
- API key management interface
- User activity tracking
- Secure credential storage
We welcome pull requests, feature ideas, and bug reports! To get started:
- Fork the repository and create a feature branch.
- Ensure linting/tests pass where applicable.
- Submit a pull request with clear context about the change.
For larger features, open a discussion or issue first so we can plan together.
- Built with Supabase
- Trading powered by Alpaca Markets
- AI analysis powered by customizable providers (OpenAI, Anthropic, Google, DeepSeek, 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.


