Skip to content

Trading-Goose/Trading-Goose.github.io

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

TradingGoose Logo TradingGoose

Discord

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.

TradingGoose UI

πŸ“‘ Table of Contents

πŸ“– Overview

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.

🎯 Core Concept

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.

πŸ”„ Intelligent Execution

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.

πŸ—οΈ Architecture Foundation

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.

✨ Features

πŸ€– Multi-Agent Architecture

  • 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

πŸ“Š Core Capabilities

  • 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

πŸ” Security & Access Control

  • 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

πŸ› οΈ Tech Stack

🎨 Frontend

  • 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

βš™οΈ Backend

  • 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

πŸ“ˆ Trading Integration

  • Alpaca Markets API for market data and trade execution
  • Customizable AI Providers for agent intelligence (OpenAI, Anthropic, Google, DeepSeek, and more)


πŸ”„ How It Works

πŸ”¬ The Analysis Process

When you initiate a stock analysis, TradingGoose orchestrates a sophisticated multi-agent workflow:

Analysis Flow

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

πŸš€ Usage

πŸ§ͺ Running an Analysis

  1. Navigate to the dashboard and select Run Analysis
  2. Choose tickers and configure analysis parameters
  3. Initiate analysis and monitor live agent collaboration
  4. Review generated insights, risk scores, and recommended actions
  5. Approve or adjust suggested trades before execution

πŸ’Ό Portfolio Rebalancing

  1. Go to Settings β†’ Rebalancing
  2. Configure rebalancing settings (position sizes, thresholds, frequency)
  3. Schedule automatic rebalancing or trigger manually
  4. Review proposed changes before execution
  5. Track rebalancing history and performance

πŸ”’ Security Considerations

  • 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

πŸ“„ License

TradingGoose is released under the AGPL-3.0 License. Refer to LICENSE for the full terms.

πŸ’¬ Support

For issues, questions, or suggestions:

πŸš€ Self Deployment

Bring your own TradingGoose instance online using the following workflow.

Prerequisites

  1. Supabase CLI (latest version)
  2. Node.js 18+
  3. npm or pnpm
  4. Alpaca Markets account (paper trading is supported)
  5. Perplexica/Perplefina instance or another compatible LLM orchestration layer

Perplefina Setup

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.

  1. Clone and install Perplefina
    git clone https://github.com/Trading-Goose/Perplefina.git
    cd Perplefina
    npm install
  2. 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
  3. 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
  4. Record the API endpoint
    • You will supply this URL when setting Supabase secrets (PERPLEFINA_API_URL)

Backend Setup

  1. Install Supabase CLI and authenticate:
    npx supabase login
  2. Link the project to your Supabase instance:
    npx supabase link --project-ref your-project-ref
  3. Set required secrets, including your Perplefina URL:
    npx supabase secrets set PERPLEFINA_API_URL=https://your-public-perplexica-url.com
  4. Deploy the edge functions powering the multi-agent workflow:
    export SUPABASE_ACCESS_TOKEN=your-access-token-here
    ./deploy-functions.sh

Frontend Setup

  1. Install dependencies:
    npm install
  2. Build the static site:
    npm run build
  3. Serve locally or deploy the dist folder to your hosting provider.
    npm run dev    # development server with hot reload
    npm run serve  # preview the built site after running dev

Development Mode

For hot reload during development:

npm run dev

The application will be available at http://localhost:8080 (or the port shown in your terminal).

🚧 Development

πŸŽ‰ 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! πŸͺ„



βœ… Feature Checklist

Analysis Features

  • 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

Portfolio Management

  • Automated scheduled rebalancing (daily/weekly/monthly)
  • Manual rebalancing triggers
  • Position size configuration (min/max)
  • Multi-stock portfolio monitoring

Trading Features

  • Paper trading mode for testing
  • Live trading execution via Alpaca
  • Real-time order status tracking
  • Position management and monitoring

AI Configuration

  • Multiple AI provider support (OpenAI, Anthropic/Claude, Google, DeepSeek)
  • Custom max tokens configuration per agent
  • Provider failover and retry logic
  • Model selection flexibility

Data & Analysis

  • Historical data range selection
  • Custom analysis timeframes
  • Technical indicator calculations
  • Fundamental data integration
  • News sentiment analysis
  • Social media trend tracking

User Management

  • User account system
  • API key management interface
  • User activity tracking
  • Secure credential storage

🀝 Contributing

We welcome pull requests, feature ideas, and bug reports! To get started:

  1. Fork the repository and create a feature branch.
  2. Ensure linting/tests pass where applicable.
  3. Submit a pull request with clear context about the change.

For larger features, open a discussion or issue first so we can plan together.

πŸ™ Acknowledgments


Important: Always conduct your own research and consider consulting with a financial advisor before making investment decisions. Past performance does not guarantee future results.

About

Frontend for Trading-Goose. A Multi-Agents LLM Financial Trading Framework for both individual stock analysis & portfolio management

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published