SuperAPIAI Directory

BetterTradingAgents

github.com · AI finance

BetterTradingAgents is a locally run multi-agent stock research and simulated trading platform based on the OpenAI Agents SDK. It enables multiple AI agents to collaboratively analyze stocks, provide buy, hold, or sell decisions along with rationale and risk checks, and place simulated orders through an Alpaca paper account. The project supports OpenAI-compatible model providers, offers a portable desktop version and a source-code run mode, and is intended solely for research and simulated trading, not for executing real trades.

Open website Alternatives
PricingOpen source开源项目(可免费自部署)
PlatformsWindows · Linux · API

About this tool

BetterTradingAgents is a fast, real-time multi-agent stock research and simulated trading platform powered by the OpenAI Agents SDK, inspired by the TradingAgents framework and released under the MIT license. The project is positioned for educational purposes, does not constitute investment advice, and all portfolios are simulated with no real trades executed.

Purpose This tool uses a team of AI agents to research stocks and produce BUY / HOLD / SELL decisions while showing the reasoning process and risk checks. Users can choose the research depth themselves, follow up with the manager agent, and place simulated orders through an Alpaca paper account. Completed decisions can be scored against subsequent market performance.

Key capabilities

  • Multi-agent research: divided by research depth into Fast (3 agents, price + forecast), Pro (7, adding news and debate), and Max (10, adding sentiment and a debate judge).
  • Decision-making and risk control: outputs buy/sell/hold decisions, rationale, and risk checks, and supports simulated orders with risk limits.
  • Simulated trading: places orders through an Alpaca paper account, with the client hardcoded to paper=True and no live trading path existing.
  • Backtesting: can replay past stock decisions and score them against SPY after deducting trading costs; simulation mode is free and deterministic, and adding --llm runs real agents and requires cost confirmation.
  • Autopilot and backtest controls.
  • Local web application, bound only to 127.0.0.1, rejecting non-loopback Host and cross-site Origin headers.
  • Supports OpenAI-compatible model providers; without an LLM key it runs in a clearly labeled simulation mode on real-time market data; with only an LLM key, agents can still obtain real inputs (yfinance plus deterministic Python math).

How to use

  1. Portable binary: download and extract the desktop application from Releases. On Windows x64, double-click bettertradingagents.exe; on Linux x64, run ./bettertradingagents. Python is bundled, and the _internal folder must remain adjacent to the program; enter the provider URL, model, and API key in Settings; without a key, it enters simulation mode.
  2. Running from source: requires Python 3.12+ and uv. The uv run installation wizard guides the first-time key configuration; the rest can be configured in Settings.
  3. Configuration priority (by field): .env → process environment → saved Settings (keys preferentially use the OS keychain) → defaults. Empty values are allowed to use saved fallback values; fields set in .env or the environment are locked in Settings and must be changed at the source and restarted, or removed/commented out to use Settings instead. Other changes take effect in real time.
  4. Key storage: keys saved in Settings use the OS keychain (keyring) when available; when unavailable, they are stored unencrypted in the local database, and the application issues a warning.

Use cases Suitable for learners and researchers interested in stock research, multi-agent collaborative decision-making, simulated trading, and backtesting, for experimenting with AI-driven stock analysis workflows in a local environment and evaluating decision quality against market performance.

Limitations

  • For research and simulated trading only; no real trades are executed.
  • The project's self-reported comparative tests show that on a small number of samples its net return is the same as the upstream system, and that a plain momentum baseline performs better; the authors also cite independent research indicating that LLM investment strategies may statistically underperform the market, and that more agents bring context and risk control rather than excess returns.
  • Backtest results are based on simulated replay with a limited sample size and cannot be regarded as a guarantee of returns.
  • Cost: simulation mode is free; using LLMs requires your own keys, and in the benchmarks recorded by the authors a single stock ticker costs about $0.02/$0.04/$0.07 under Fast/Pro/Max, higher during news-heavy periods, with DeepSeek at half price off-peak; all data providers have free tiers, and yfinance requires no key. Specific prices may change; refer to the actual providers.
  • Security vulnerabilities should be reported privately via GitHub security advisories; do not publicly submit exploitable issues.
Up/Down to navigate · Enter to open · ESC to closeBrowse all tools