Skip to content
CAI
Software that uses CAICheck a score

TauricResearch/TradingAgents

58.2

Adequate · 26 September 2026

19.2k

lines of production code

Python

primary language

4

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

TradingAgents is a multi-agent financial analysis and backtesting framework that employs specialized AI models to debate investment opportunities across fundamentals, market data, news, and sentiment. It orchestrates structured decision-making through a graph-based workflow that generates typed trading recommendations with absolute price levels, supported by a robust data layer that fetches and normalizes information from diverse financial vendors. The system enables users to run interactive analyses or historical backtests via a CLI, featuring crash recovery, persistent decision logging, and automated performance reflection against benchmarks.

Features

Docker support for cross-platform deployment

Users can now deploy TradingAgents using Docker, with a multi-stage Dockerfile and a docker-compose.yml that includes profiles for running with a local Ollama instance. The setup creates a dedicated non-root user and pre-creates the \~/.tradingagents directory to resolve permission issues, while .env.example and .env.enterprise.example files provide templates for configuring API keys and environment variables.

(repo-wide) · high confidence

Initial release of the TradingAgents dataflows module

This entry introduces the initial public release (v0.1.0) of the \tradingagents.dataflows\ package, establishing the core infrastructure for fetching and routing financial data. The module provides a vendor-agnostic routing layer (\router.py\) that supports multiple providers (Yahoo Finance, Alpha Vantage, SEC EDGAR, FRED, Polymarket) with configurable fallbacks and category-based tool organization. It introduces a unified error hierarchy (\VendorError\) to standardize handling of rate limits, missing configurations, and empty data across all vendors. To ensure point-in-time accuracy for historical and backtest runs, the module implements strict date-window filtering (\date\_window.py\) that trims news and sentiment data to the analysis window and withholds live-only company profiles from historical contexts. It also includes robust symbol normalization (\symbols.py\) to map user/broker ticker formats to canonical Yahoo Finance symbols and secure path validation to prevent directory traversal attacks in file-based caching.

tradingagents/dataflows · high confidence

Introduce TradingAgents CLI with interactive analysis, backtesting, and checkpoint resume

The CLI module is now a fully functional entry point for the framework. Users can run interactive multi-agent financial analyses with a live Rich-based display, select LLM providers and analysts, and configure research depth. A new backtest command allows scoring past decisions over a grid of tickers and dates. The CLI supports checkpointing to resume crashed runs, saves reports and logs to a results directory, and remembers previous run selections as defaults. It also handles announcements from a remote endpoint and respects environment variable overrides for configuration.

cli · high confidence

Introduce dedicated Bull and Bear researcher agents for investment debates

The researchers module now includes distinct Bull and Bear analyst agents that engage in a structured debate. These agents construct arguments by leveraging market, sentiment, news, and fundamentals reports, while dynamically adapting their language and terminology based on whether the target is a stock or a crypto asset. They also incorporate the opponent's previous points to ensure a responsive and engaging dialogue.

tradingagents/agents/researchers · high confidence

Introduce resumable agent graph with per-ticker checkpoints and deferred outcome reflection

The trading workflow now supports crash recovery via LangGraph checkpoints stored in per-ticker SQLite databases, keyed by a signature that includes the analyst selection and portfolio state to prevent incompatible resumes. Additionally, the system implements deferred outcome reflection: after a trade decision is made, the graph waits for the holding window to close, then automatically fetches price data, calculates alpha against a benchmark, and generates a concise lesson that is stored in the decision log for future runs.

tradingagents/graph · high confidence

Introduce structured Portfolio and Research Manager agents

New Portfolio and Research Manager agents have been added to the managers package to synthesize debate outcomes into final decisions and investment plans. These agents utilize LangChain's structured output capabilities to produce typed results (PortfolioDecision and ResearchPlan) with a consistent five-tier rating scale (Buy, Overweight, Hold, Underweight, Sell), while gracefully falling back to free-text generation if the provider does not support structured output. The Portfolio Manager specifically reads the trader's proposal and research plan to make its final call, and the Research Manager converts the bull/bear debate into a structured plan for the trader.

tradingagents/agents/managers · high confidence

Introduce structured backtesting, persistent decision logging, and environment-based configuration

The tradingagents package now includes a dedicated backtest module that evaluates decisions across a grid of tickers and dates, scoring outcomes against regional benchmarks and recording results in a persistent, append-only markdown decision log. Configuration is centralized in a new default config file that supports overriding settings via TRADINGAGENTS\\ environment variables, and the package automatically loads .env files on import to ensure LLM clients and the config system have access to user keys. A new portfolio context model allows callers to pass their current holdings and cash balance into runs, enabling the agents to distinguish between opening new positions and adding to existing ones.

tradingagents · high confidence

New data vendor modules for Alpha Vantage, FRED, Polymarket, Reddit, SEC EDGAR, and StockTwits

The \tradingagents/dataflows/vendors\ package now includes dedicated modules for several new data sources. Alpha Vantage support covers fundamentals (balance sheet, cash flow, income statement), technical indicators (SMA, EMA, MACD, RSI, Bollinger Bands, ATR, VWMA), news sentiment, insider transactions, and daily stock data, with logic to filter reports by date to prevent look-ahead bias. FRED provides macroeconomic time series (rates, yields, inflation, labor, etc.) with point-in-time vintage pinning to ensure historical accuracy. Polymarket surfaces live prediction-market probabilities for forward-looking events. Reddit and StockTwits fetch public discussion posts and messages for sentiment analysis, with Reddit using RSS feeds to bypass API restrictions and StockTwits handling HTML-escaped message bodies. SEC EDGAR retrieves company financial statements as they were filed, ensuring restatements are handled correctly for the analysis date.

tradingagents/dataflows/vendors · high confidence

New specialized analyst agents for fundamentals, market, news, and sentiment

The trading system now includes four distinct analyst agents that provide specialized reports to inform trading decisions. The Fundamentals Analyst examines financial statements (balance sheet, cash flow, income statement) and insider transactions. The Market Analyst selects relevant technical indicators and uses a verified market snapshot to ground price claims. The News Analyst aggregates company-specific news, global macroeconomic data from FRED, and live prediction market probabilities. The Sentiment Analyst synthesizes data from Yahoo Finance news, StockTwits, and Reddit into a structured sentiment report, optionally screening social posts for quality. Each agent is configured with specific tools and prompts to deliver focused insights.

tradingagents/agents/analysts · high confidence

Behavioural changes

Renamed risk debate agents to aggressive and conservative roles

The risk management debate module has been reorganized to rename the previously 'risky' and 'safe' agents to 'aggressive' and 'conservative' respectively. This change updates the agent prompts and state tracking to reflect these new roles, where the aggressive analyst champions high-reward opportunities and the conservative analyst focuses on asset protection and risk mitigation, while the neutral analyst maintains a balanced perspective.

_tradingagents/agents/risk\mgmt · high confidence

Trader agent now requires absolute price levels and grounds decisions in technical market reports

The Trader agent has been refactored to enforce structured output that mandates absolute price levels (e.g., 189.5) for entry and stop-loss, explicitly rejecting percentage-based or range-based inputs to prevent parsing failures. Additionally, the agent now incorporates the technical market report (including current price, support/resistance, and ATR data) into its system prompt to ground concrete price levels in real market structure, while also accepting the caller's portfolio context to inform position sizing.

tradingagents/agents/trader · high confidence

Trading agents package introduces structured decision-making, social sentiment screening, and robust context handling

The \tradingagents/agents\ package is established with a new architecture that enforces structured, typed outputs from the Research Manager, Trader, and Portfolio Manager via Pydantic schemas, ensuring consistent 5-tier rating scales (Buy, Overweight, Hold, Underweight, Sell) and transaction proposals. A new social post screening module integrates TypeSafe's Jev to filter and analyze sentiment from StockTwits and Reddit, while context utilities now resolve deterministic instrument identity to prevent hallucinations and support localized output languages. The package also standardizes risk management by renaming agents to aggressive/conservative/neutral debators and implements a shared rating parser that flags unreadable decisions as 'REVIEW' rather than defaulting to Hold.

tradingagents/agents · high confidence

Unified multi-provider LLM client architecture with capability-aware structured output

The LLM client layer has been refactored into a modular, factory-based system that standardizes how TradingAgents connects to diverse AI providers. This change introduces a unified client interface (BaseLLMClient) and a central factory (create\_llm\_client) that lazily loads provider-specific implementations for Anthropic, Google, Azure, Amazon Bedrock, and a broad range of OpenAI-compatible endpoints (including xAI, DeepSeek, MiniMax, Qwen, GLM, Kimi, Groq, and Mistral). A key behavioral improvement is the introduction of a declarative capability table (capabilities.py) that automatically handles provider-specific API quirks—such as suppressing unsupported parameters like tool\_choice for DeepSeek V4 or routing reasoning blocks for MiniMax—ensuring structured output works reliably across different models. Additionally, the system now normalizes response content to plain strings for consistent downstream handling, supports configurable output-token caps and sampling temperature, and provides a single source of truth for API key environment variables to streamline CLI authentication flows.

_tradingagents/llm\clients · high confidence

Test coverage

Comprehensive test suite for core platform capabilities

The test suite now covers critical platform areas including Alpha Vantage data hardening (request timeouts, rate-limit detection, and look-ahead filters), Anthropic effort-parameter gating for model compatibility, and secure API key management (ensuring owner-only file permissions and correct environment variable mapping). It also validates the backtesting engine's grid iteration and decision scoring, the checkpoint lifecycle for crash recovery and resume logic, and the CLI command routing for both standard analysis and backtest modes.

tests · high confidence

Dependencies

Introduce pyproject.toml and consolidate dependencies

The project now uses pyproject.toml as the primary configuration file, consolidating build system settings, project metadata, and dependency declarations. This change introduces a structured dependency list including langchain-core, langchain-anthropic, langchain-google-genai, langchain-openai, langgraph, and others, while also defining optional dependencies for development (ruff, pytest) and Amazon Bedrock support (langchain-aws). The requirements.txt file is retained but appears to be a minimal placeholder or generated artifact, with the authoritative dependency definitions now residing in pyproject.toml.

(dependencies) · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings — which rule fired, in which file, on which line, and how to fix it — are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.

Score

  • CAI 47 → 58 (+11.0)
  • Rubric changed (rubric-2026.08.15 → rubric-2026.09.15) — scores are not directly comparable.

Lenses

  • Code Health 95 → 87 (-8.1)
  • Architecture 94 → 93 (-0.6)
  • Maturity 62 → 62 (-0.2)
  • Readiness 18 → 39 (+21.3)
  • Security 77 → 90 (+12.7)

Resolved (27)

  • Coverage not measured — test suite did not build
  • Dimension evaluation failed
  • Duplicated block (12 lines × 2) (tradingagents/graph/trading_graph.py)
  • Duplicated block (7 lines × 2) (tests/test_cli_env_skip.py)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • Low IaC: DS-0026 (Dockerfile)
  • Low: security finding (details withheld)
  • Low: security finding (details withheld)
  • Low: security finding (details withheld)
  • Medium: security finding (details withheld)
  • No exposed public API
  • No tests found
  • Test reliability not included
  • main.display_complete_report (cognitive 34) (main)
  • main.display_complete_report (cyclomatic 21) (main)
  • …and 7 more

New (88)

  • Change coupling clique: fundamentals_analyst.py, market_analyst.py, news_analyst.py (tradingagents/agents/analysts/fundamentals_analyst.py)
  • Change coupling clique: portfolio_manager.py, research_manager.py, trader.py (tradingagents/agents/managers/portfolio_manager.py)
  • Dependency hygiene PARTLY measured — Python dependencies read, no exact pin to grade for currency
  • Documentation: no contributor guidance (README.md)
  • Documentation: no installation or build instructions (README.md)
  • Documentation: no usage examples (README.md)
  • Duplicated block (10 lines × 2) (tradingagents/dataflows/vendors/reddit.py)
  • Duplicated block (10 lines × 3) (tradingagents/reporting.py)
  • Duplicated block (11 lines × 3) (tradingagents/reporting.py)
  • Duplicated block (13 lines × 2) (cli/display.py)
  • Duplicated block (24 lines × 3) (tradingagents/agents/risk_mgmt/aggressive_debator.py)
  • Duplicated block (32–34 lines × 2) (tradingagents/agents/researchers/bear_researcher.py)
  • Duplicated block (40–70 lines × 3) (tradingagents/agents/analysts/fundamentals_analyst.py)
  • Duplicated block (7 lines × 3) (cli/display.py)
  • Duplicated block (8 lines × 2) (cli/display.py)
  • Duplicated block (8 lines × 2) (cli/run.py)
  • Duplicated block (8–10 lines × 5) (tradingagents/agents/researchers/bear_researcher.py)
  • High IaC: WD-COMPOSE-0002 (docker-compose.yml)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • …and 68 more

Changes since last survey

  • 136 commits — 71 feature/other, 65 fixes

By area

  • (root) — 21 commits
  • tradingagents/dataflows — 21 commits
  • tradingagents/agents — 11 commits
  • cli/main.py — 8 commits
  • (repo) — 7 commits
  • tradingagents/graph — 7 commits
  • tests/test_memory_log.py — 6 commits
  • tradingagents/llm_clients — 5 commits
  • tests/test_reddit_fallback.py — 4 commits
  • tests/conftest.py — 3 commits
  • tests/test_backtest.py — 3 commits
  • .github/workflows — 2 commits
  • cli/utils.py — 2 commits
  • tests/test_alpha_vantage_hardening.py — 2 commits
  • tests/test_cli_decision_log.py — 2 commits
  • tests/test_env_overrides.py — 2 commits
  • tests/test_fred.py — 2 commits
  • tests/test_graph_end_to_end.py — 2 commits
  • tests/test_news_lookahead.py — 2 commits
  • tests/test_ohlcv_cache_freshness.py — 2 commits

Notable commits

  • fix: fix(agents): bound tool dates by the run's trade date
  • fix: fix(agents): give every prompt honest inputs
  • fix: fix(agents): give the fundamentals analyst the insider transactions tool
  • fix: fix(agents): ground the Trader in the technical market report
  • fix: fix(agents): keep one unreadable price from discarding the decision
  • fix: fix(agents): record the decision that was made, or flag it for review
  • fix: fix(agents): require absolute price levels from the Trader
  • fix: fix(agents): say when the resolved identity is today's, not the run date's
  • fix: fix(agents): state the output shape in the decision prompts
  • fix: fix(agents): stop conflict alone from defaulting the verdict to Hold
  • fix: fix(agents): stop debate openers from rebutting a nonexistent argument
  • fix: fix(agents): stop the debate managers forcing a direction under ambiguity
  • fix: fix(backtest): score a decision against the direction it claimed
  • fix: fix(cli): finish the run surface
  • fix: fix(cli): make --checkpoint actually resume on the CLI path
  • fix: fix(cli): read and write the decision log on the CLI path
  • fix: fix(cli): resume a checkpoint without duplicating messages or leaking the saver
  • fix: fix(cli): save prompted API keys to an owner-only .env
  • fix: fix(cli): say whether a checkpointed run resumed or started fresh
  • fix: fix(cli): send GLM traffic to the platform its key belongs to
  • …and 116 more

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

TauricResearch/TradingAgents was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 26 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 35543d0248bf89fcb92b17a15858ad0c0e940687 — the exact code this score is about.
  • Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-a15879f6f801.