# TradingAgents

> A team of LLM agents that debate and decide on stock trades, for research

- Repository: https://github.com/TauricResearch/TradingAgents
- Category: AI agents
- Stars: 113,077 · Forks: 21,880 · Language: Python · License: Apache-2.0
- Experience: Some experience
- Page: https://ir.adyog.com/repos/tauricresearch/tradingagents/

TradingAgents models a trading firm with LLM agents. Each agent has one job. Analysts study a stock from different angles, researchers argue for and against it, a trader proposes a move, and a risk team and portfolio manager approve or reject it.

You pick a ticker and a date. Four analysts (fundamentals, sentiment, news, technical) work at the same time and write reports. A bullish and a bearish researcher then debate those reports, the trader drafts a decision, and the risk team reviews it. Approved orders go to a simulated exchange, not a real one.

It works with many model providers, including OpenAI, Google, Anthropic, xAI, DeepSeek, Mistral, Groq, AWS Bedrock, and local servers such as Ollama, vLLM and LM Studio. It comes from an academic paper (arXiv 2412.20138) and is meant for research. The authors say it is not financial, investment or trading advice.

## What it does

- **Four specialist analysts**: Fundamentals, sentiment, news and technical analysts run in parallel, each with its own tools. The research debate starts once all their reports are in.
- **Debate and risk review**: Bullish and bearish researchers critique the analyst reports in structured debates. A risk team and a portfolio manager then review the trader's proposal.
- **Many LLM providers**: Works with a long list of hosted providers, plus Ollama and any OpenAI-compatible server. Quick-thinking and deep-thinking models are set separately.
- **Interactive and scripted CLI**: An interactive CLI asks for ticker, date, provider and research depth. It can also run without prompts using flags such as --ticker and --date, for scripts or scheduled jobs.
- **Docker and local models**: A Docker Compose setup is included, with a separate profile for running local models through Ollama.

## What you could build

- Study how a group of LLM agents with different roles reaches a trading decision.
- Compare how different language models behave in the same analyst, researcher or trader role.
- Generate analysis reports for a ticker on a chosen date and read the reasoning behind each step.
- Run backtest-style experiments over tickers and dates from a script or scheduled job.
- Build on the Python package to try your own agent roles or data sources.

## Who it's for

Suits students and researchers curious about multi-agent LLM systems who are comfortable with Python and API keys; it is not meant for real trading decisions.

## Get started

Clone the repo, create a Python 3.11+ virtual environment, and install it with pip. Set an API key for your chosen LLM provider (or point it at a local Ollama server), then run the tradingagents command and pick a ticker and date.

```
git clone https://github.com/TauricResearch/TradingAgents.git
```
```
pip install .
```
```
tradingagents
```

Tags: multi-agent, llm, finance, trading, research
