AI Model Arena Trading Bot (GPT, Gemini, Claude, Grok) ====================================================== .. meta:: :description: Compare GPT-6.2 Sol, Gemini 4 Neon, Claude Opus 5.5, and Grok 4.7 head-to-head with one identical open-ended Python trading prompt across stocks, options, and crypto. .. image:: ../docs/assets/ai-agent-workflows/ai-model-arena-bot.png :alt: Identical open-ended prompt pitting GPT-6.2 Sol, Gemini 4 Neon, Claude Opus 5.5, and Grok 4.7 head-to-head across asset classes :width: 100% Which frontier AI model actually makes better portfolio decisions under the exact same market conditions? This open-ended benchmark challenger gives GPT-6.2 Sol, Gemini 4 Neon, Claude Opus 5.5, and Grok 4.7 the exact same short prompt and full freedom across US stocks, ETFs, leveraged or inverse ETFs, options, and crypto on Alpaca so you can compare their research, trades, and risk control head-to-head. How it works ------------ Every contestant runs the identical strategy class with only ``parameters["model"]`` changed: 1. **Research agent** reviews current news, macro conditions, market trends, and existing holdings using only information available by today. It identifies at least three distinct, high-conviction opportunities across stocks, ETFs, options, or crypto and challenges whether current holdings still deserve capital or should be rotated. 2. **Trading agent** maintains at least three genuinely diversified exposures (deploying 80% to 95% of equity with at most 35% in any single position and reserving cash for option obligations). It sizes orders from current market prices, rotates when stronger setups emerge, and never exceeds available buying power. Change ``parameters["model"]`` to any of the four arena contestants (``openai/gpt-6.2-sol``, ``google/gemini-4-neon``, ``anthropic/claude-opus-5.5``, or ``xai/grok-4.7``) or keep the default ``openai/gpt-6-luna`` for fast, low-cost local smoke tests. Run it on BotSpot ----------------- Compare live and backtested AI strategies side by side on `BotSpot Marketplace `_. BotSpot runs LumiBot in the cloud with managed access to frontier models, backtest tear sheets, and broker connections. Want to run multi-model comparisons directly from Claude, ChatGPT, Codex, or Cursor? Connect the free :doc:`BotSpot MCP ` to build, backtest, and inspect agent reasoning traces. Looking for hands-on training on AI trading architecture? Explore `BotSpot Courses `_ or join the `free AI Trading Challenge `_. The code -------- The entire arena challenger fits in roughly 80 lines of Python. Keep the prompts identical across runs so differences in trades and returns reflect model behavior rather than prompt changes. .. literalinclude:: ../lumibot/example_strategies/ai_model_arena.py :language: python Run it yourself --------------- .. code-block:: bash pip install lumibot python -m lumibot.example_strategies.ai_model_arena Configure the provider API key matching the model you select in your ``.env`` file: * ``OPENAI_API_KEY`` for ``openai/gpt-6-luna`` (default) or ``openai/gpt-6.2-sol`` * ``GEMINI_API_KEY`` for ``google/gemini-4-neon`` * ``ANTHROPIC_API_KEY`` for ``anthropic/claude-opus-5.5`` * ``XAI_API_KEY`` for ``xai/grok-4.7`` Also add your Alpaca broker credentials (``ALPACA_API_KEY``, ``ALPACA_API_SECRET``, and ``ALPACA_IS_PAPER=true``). Set ``IS_BACKTESTING=true`` with ``BACKTESTING_START`` and ``BACKTESTING_END`` to run a historical Alpaca backtest, or ``IS_BACKTESTING=false`` to paper-trade or live-trade the exact same strategy class. Good to know ------------ * Frontier reasoning models (Sol 6.2, Gemini 4 Neon, Claude Opus 5.5, Grok 4.7) cost more per iteration than ``openai/gpt-6-luna``. Test a short date range first and inspect ``_agent_detail.parquet`` to compare actual tokens, latency, and trade rationale across models. * Because the prompt allows leveraged ETFs, options, and crypto, confirm that your Alpaca account has the permissions you want enabled before running live. * Aiming for 2x to 3x SPY return is an open-ended objective for comparing model behavior, not a promise of returns; higher return targets carry higher drawdown risk. See :doc:`agents_examples` for more AI trading bots and :doc:`strategy_run_modes` for backtest and live runners.