AI Multi-Agent Stock Trading System: GPT-5 and Claude 4.5 Sonnet

11月8日 Published inStock Market Tools

This stock trading system utilizes an AI-driven, dual-engine architecture. By running GPT-5 and Claude 4.5 Sonnet in tandem, the platform orchestrates over 250 autonomous agents—comprising 200 retail trader simulations and 50 institutional bots—each generating its own market signals.

A 12-member panel of experts then evaluates these signals through multiple rounds of debate to arrive at a final trade execution. The system targets annual returns exceeding 30% while maintaining rigorous risk parameters. It monitors 16 distinct assets, including index ETFs, gold, precious metals, and blue-chip equities. The core philosophy centers on "following the institutions and fading the retail crowd," leveraging market microstructure to identify smart money flows and capitalize on common retail errors. Performance benchmarks include a Sharpe ratio above 2.0, a maximum drawdown of less than 15%, and a win rate surpassing 65%. Essential risk management tools, such as stop losses, take profits, and trailing stops, are natively integrated. The technical stack features the latest LLM iterations, yfinance for real-time market data, multi-factor quantitative analysis, and VaR/CVaR risk assessment.

  • Dual AI Engines: GPT-5 and Claude 4.5 Sonnet operate in parallel.
  • 250+ Independent Agents: 200 retail and 50 institutional profiles, each with a unique "trading DNA."
  • 12-Expert Committee: A structured, six-round deliberation process to reach a final consensus.
  • Focused Assets: Sixteen selected instruments across ETFs, metals, and large-cap stocks.
  • Stringent Risk Protocols: Mandatory stop loss, take profit, and trailing stop thresholds applied to every position.

Agent and Expert Roster

Retail Agents (200 total, 5 types)

  • Momentum Chasers: These agents follow prevailing trends and attempt to capture gains from price breakouts.
  • Panic Sellers: Highly reactive agents that liquidate positions at the first sign of market volatility or downward price action.
  • Herd Followers: This group mirrors broader market sentiment, lacking an independent investment thesis.
  • Value Hunters: Agents designed to identify and purchase assets trading below their calculated intrinsic value.
  • Technical Traders: These agents rely exclusively on chart patterns, indicators, and historical price data.

Institutional Agents (50 total, 5 types)

  • Quantitative: Entry and exit points are determined by rigorous statistical models and mathematical signals.
  • Stat Arb (Statistical Arbitrage): These agents exploit temporary pricing inefficiencies between highly correlated assets.
  • Machine Learning: Self-improving algorithms that adapt their strategies based on historical performance data.
  • High Frequency: Designed for high-volume execution to capture razor-thin edges in micro-second intervals.
  • Market Makers: Agents that provide market liquidity by managing the bid-ask spread.

The 12 Experts

This committee processes the raw data from all 250 agents through six rounds of structured debate. This hierarchical refinement is designed to maximize signal accuracy and stabilize the equity curve.

How the System Runs

  1. Market Data Retrieval: The system pulls live US equity data via the yfinance API.
  2. Signal Generation: Every retail and institutional agent generates a trade signal based on its specific logic and profile.
  3. Expert Consensus: The 12-member panel debates the aggregated signals over six rounds to reconcile conflicting data and sharpen the final outlook.
  4. Order Execution: The system executes a full-position trade based on the committee’s final consensus.

Which Version to Run

File Name Core Configuration Return Target Best For
ultimate_trading_system.py 250+ agents + 12 experts 30%+ Maximum AI processing power
expert_consensus_system.py 12 experts only 30%+ High-quality deliberation
elite_trading_system.py Full rotation, multi-factor 15-30% Institutional-grade requirements
ai_trading_complete_system.py Original full system 15-25% Research and educational use
forex_trading_example.py MT5 forex integration High risk Currency market specialists

Core Strategy Logic

The system is governed by a singular directive: align with institutional movement and trade against retail extremes.

  • Buy Signal: Triggered when retail fear peaks while institutional flow remains positive.
  • Sell Signal: Triggered when retail greed reaches a ceiling and institutional distribution begins.
  • Microstructure Edge: The system monitors institutional footprints within the tape to exploit retail behavioral biases.

Risk Management Parameters

  • Stop Loss: 4%
  • Take Profit: 12%
  • Trailing Stop: 3%
  • Maximum Drawdown Limit: -15%
  • Target Sharpe Ratio: > 2.0

Installation and Deployment

1. Install Dependencies

pip install numpy pandas anthropic openai yfinance

2. Configure API Keys

# GPT-5 (OpenAI)
export OPENAI_API_KEY="sk-xxxxx"

# Claude 4.5 Sonnet (Anthropic)
export ANTHROPIC_API_KEY="sk-ant-xxxxx"

3. Launch the System

# Execute the full multi-agent system
python ultimate_trading_system.py

# Execute the expert consensus module only
python expert_consensus_system.py

# Execute the institutional elite version
python elite_trading_system.py