Ray Fu, ex-Meta senior engineer and AI automation educator

Ray Fu

I'm an Ex Meta Senior Engineer that makes content and teaches OpenClaw and AI Automations.

stan.store/raycfu

How to Build a Trading Firm with AI Agents

A Trading Floor of Agents

 

IMPORTANT: This guide is for educational purposes only. Nothing here is financial advice. The framework it describes is a research tool, and its own authors state plainly that it is designed for research purposes and is not intended as financial, investment, or trading advice. Trading involves real risk of loss. Never trade money you cannot afford to lose, paper trade extensively first, and verify every number yourself before acting on anything.

Someone rebuilt the structure of a Wall Street trading floor as a team of AI agents, and open sourced the whole thing. You give it one ticker, and a full firm goes to work: analysts gather the data, a bull and a bear argue the trade, a trader plans the execution, risk management can veto it, and a portfolio manager signs off.

The repo: github.com/TauricResearch/TradingAgents

Apache 2.0 licensed, backed by a published research paper, and currently sitting past 100,000 stars. This guide covers the architecture, the install, and the two things about it that decide whether it is useful to you or dangerous.

Don't want to figure this out alone? I walk members through every step inside the community. Join the Skool → skool.com/raycfu

The Architecture: A Firm, Not a Bot

The Debate Is the Point

 

What makes this different from every "AI trading bot" is that it does not ask one model for an opinion. It reproduces the structure of a real firm, where the answer emerges from specialists disagreeing.

Four analysts gather evidence first. The Fundamentals Analyst reads company financials and performance metrics, looking for intrinsic value and red flags. The Sentiment Analyst aggregates news headlines, StockTwits, and Reddit into a read on short-term mood. The News Analyst tracks global news and macroeconomic indicators and interprets what events mean for conditions. The Technical Analyst works the indicators, MACD, RSI, and price action.

Then the researchers argue. A bull agent and a bear agent take opposite sides of the same evidence and debate it. This is the most interesting design choice in the whole system, because a single model asked "should I buy this" will produce a confident answer and hide its uncertainty inside it. Two agents forced to argue surface the hidden risk instead, because the bear's entire job is finding what the bull glossed over.

Then execution gets planned and checked. The trader agent builds the actual plan. A separate risk management team can veto it. And a portfolio manager signs off or does not.

And it remembers. Recommendations get logged and graded against what the market actually did, so the agents can study their own past calls. That reflection layer is what separates a system from a very expensive opinion generator.

The Install

Clone it, make an environment, install dependencies:

git clone https://github.com/TauricResearch/TradingAgents.git
cd TradingAgents
conda create -n tradingagents python=3.13
conda activate tradingagents
pip install -r requirements.txt

Then two API keys. FinnHub for financial data, and the free tier is enough because the whole codebase is built against it:

export FINNHUB_API_KEY=your_key

And one LLM provider. It supports OpenAI, Gemini, Claude, Grok, and anything through OpenRouter:

export OPENAI_API_KEY=your_key

Then run it on a ticker and watch the firm work. The CLI shows each agent's output as it goes, which is the best part of the experience and worth watching in full at least once so you understand what each stage actually contributes.

The First Thing You Need to Know: It Does Not Repeat

Same Ticker Different Answer

 

Straight from the repo's own documentation. Two runs on the same ticker on the same date can produce different answers, and that is expected behavior for a research tool built on language models, not a bug.

Three reasons. Language model sampling is non-deterministic, so even at a fixed temperature, providers do not guarantee identical output between calls. Reasoning models vary the most, because their internal reasoning is itself sampled. And live data moves underneath you between runs.

Sit with what that means before you put money anywhere near it. A system that gives you a different recommendation on Tuesday afternoon than it gave on Tuesday morning, on identical inputs, is not producing a signal you can act on directly. It is producing one plausible analysis out of many possible ones.

The way to use that honestly is to run the same ticker several times and look at where the runs agree. Consensus across runs is information. A single run is one draw from a distribution, and treating it as a verdict is the single fastest way to lose money with this thing.

The Second Thing: It Makes a Lot of API Calls

Every run puts four analysts, two debating researchers, a trader, a risk team, and a manager through a language model, some of them multiple times. The authors explicitly recommend using cheaper models for testing because the framework makes many calls.

So configure the cheap models first, get a feel for the output, and only move up when you know what you are paying for. And do not leave it running across a watchlist of forty tickers while you sleep unless you have checked what one ticker costs first.

How to Actually Use This

Use It as an Analyst

 

The version of this that is genuinely valuable is not "let it trade for me." It is using it as a research analyst that never gets tired and never skips the bear case.

Use it to build the case, not to make the call. Run it on a stock you are already considering, and read the bear agent's argument specifically. The most useful output in the whole system is a well-argued case against a trade you already wanted to make, because that is exactly what your own thinking will not produce for you.

Run it multiple times and look for agreement. Where the runs converge is more meaningful than any single run's conclusion.

Verify every number against the primary source. These are language models reading financial data, and a fluent but wrong figure is the failure mode that costs money. If the fundamentals analyst cites a revenue number, go look at the filing.

Paper trade for months, not weeks, before real money is anywhere in the conversation. Log its recommendations and score them against what actually happened. You will learn more from that log than from any backtest.

And if you ever do connect it to real execution, keep the position sizes small enough that being wrong repeatedly is survivable, because you will be wrong repeatedly.

What This Is and What It Is Not

It is a genuinely impressive piece of open research, a great way to understand how multi-agent systems handle disagreement, and a real analytical tool that will surface considerations you would have missed.

It is not a money printer, and the people who built it say so directly. The disclaimer in the README is not legal boilerplate, it is an accurate description of what they built. Performance varies with your model choice, your temperature setting, the period you test, and the quality of the data going in, and none of those are stable.

Anyone selling you a course about how this repo prints money is selling the course, not trading the system. The repo is free and the paper is public, so the entire value of that course is the confidence it is wrapped in.

The Recap

Clone TauricResearch/TradingAgents, set up a Python 3.13 environment, add a free FinnHub key and one LLM key, and run it on a ticker to watch four analysts, a bull and bear debate, a trader, risk management, and a portfolio manager work through the decision.

Then treat it as what it is: a research tool with non-deterministic output that makes many API calls. Run tickers multiple times and trust the agreement rather than any single run. Read the bear case above everything else. Verify every figure at the source. Paper trade for months. And keep the disclaimer in mind, because its own authors put it there for a reason.

Don't want to figure this out alone? I walk members through every step inside the community. Join the Skool → skool.com/raycfu