How tauricresearch/tradingagents works
TradingAgents is a multi-agent financial analysis and trading-decision framework, exposed through a CLI and package API. A run gathers market, company, news, sentiment and macro evidence, coordinates analyst reports and research/risk debate, then produces a rated portfolio decision. The graph also supports backtesting, checkpoint resume, decision memory and saved reports. The graph and agent stages are described in the README; source excerpts and the SOURCE INDEX substantiate selected module relationships. Unsampled wiring is omitted where it cannot be verified.
Main entry points: trading_graph.py Trading Graph · main.py Command Line · router.py Data Router · run.py Run Interface
Components 21
Run Entry
- Command Line
cli/main.py - Run Interface
cli/run.py - Backtesting
tradingagents/backtest.py
Analysis Workflow
- Trading Graph
tradingagents/graph/trading_graph.py - Run Context
tradingagents/agents/context.py - Analyst Team
tradingagents/agents/analysts - Bull Bear Debate
tradingagents/agents/researchers - Risk Debate
tradingagents/agents/risk_mgmt - Research Manager
tradingagents/agents/managers/research_manager.py - Trader
tradingagents/agents/trader/trader.py - Portfolio Manager
tradingagents/agents/managers/portfolio_manager.py - Decision Rating
tradingagents/agents/rating.py
Market Data
- Data Router
tradingagents/dataflows/router.py - Yahoo Feeds
tradingagents/dataflows/vendors/yahoo - Other Data Vendors
tradingagents/dataflows/vendors - Point-In-Time Rules
tradingagents/dataflows/date_window.py
Model Providers
- LLM Clients
tradingagents/llm_clients
Results And Memory
- Decision Memory
tradingagents/memory - Reports
tradingagents/reporting.py - Portfolio Context
tradingagents/portfolio.py
Other components
- Analyst
Connections 21
- Analyst → Command Line: starts analysis
- Command Line → Run Interface: runs analysis
cli/main.py - Run Interface → Trading Graph: starts workflow
- Analyst → Backtesting: requests backtest
- Backtesting → Trading Graph: runs dated analyses
tradingagents/backtest.py - Trading Graph → Analyst Team: coordinates analysis
- Analyst Team → Bull Bear Debate: reports inform debate
- Bull Bear Debate → Research Manager: debate informs plan
- Research Manager → Trader: provides investment plan
- Trader → Risk Debate: plan enters debate
- Risk Debate → Portfolio Manager: debate informs decision
tradingagents/agents/managers/portfolio_manager.py - Portfolio Manager → Decision Rating: produces rating
tradingagents/agents/managers/portfolio_manager.py - Trading Graph → Run Context: builds context
tradingagents/graph/trading_graph.py - Run Context → Point-In-Time Rules: checks run date
tradingagents/agents/context.py - Trading Graph → Data Router: routes data requests
- Data Router → Yahoo Feeds: dispatches vendor calls
tradingagents/dataflows/router.py - Data Router → Other Data Vendors: dispatches vendor calls
tradingagents/dataflows/router.py - Trading Graph → LLM Clients: configures models
tradingagents/graph/trading_graph.py - Trading Graph → Decision Memory: stores decisions
tradingagents/graph/trading_graph.py - Trading Graph → Reports: creates reports
tradingagents/graph/trading_graph.py - Command Line → Portfolio Context: accepts portfolio
cli/main.py