TradingAgents: I Ran the 56k-Star Open-Source Hedge Fund (Full Setup)

Kurze Zusammenfassung

Das Video stellt das Trading Agents Framework vor, eine Open-Source-Lösung für den Aufbau von KI-gestützten Finanzsystemen, die den traditionellen Ansatz von einzelnen LLM-basierten Trading-Bots überwindet. Das Framework simuliert ein autonomes Trading-Unternehmen mit spezialisierten Teams für Analyse, Recherche, Trading und Risikomanagement. Es nutzt eine strukturierte Pipeline und parallele Agenten, um die Genauigkeit zu verbessern und Halluzinationen zu vermeiden. Das Video demonstriert die Installation und Konfiguration des Frameworks und hebt seine potenziellen Vorteile sowie Einschränkungen hervor, wie z.B. hohe API-Kosten und die Notwendigkeit längerer Backtests.

  • Das Trading Agents Framework überwindet die Einschränkungen von Single-Agent-Trading-Bots durch eine Multi-Agenten-Architektur.
  • Version 0.2.4 integriert Langraph für Checkpointing und unterstützt lokale Modelle, wodurch Kosten gesenkt werden.
  • Die Installation und Konfiguration des Frameworks wird Schritt für Schritt demonstriert.

Einführung in das Trading Agents Framework

Das Video beginnt mit der Feststellung, dass viele Versuche, KI-Trading-Bots zu entwickeln, zu finanziellen Verlusten führen. Dies liegt oft daran, dass einzelne Large Language Models (LLMs) mit Finanzdaten und Nachrichtenartikeln gefüttert werden, was zu ungenauen Vorhersagen und riskanten Trades führt. Im Gegensatz dazu verwenden quantitative Firmen an der Wall Street strukturierte Teams mit Analysten, Forschern, Tradern und Risikomanagern. Das Trading Agents Framework, eine Open-Source-Lösung von UCLA, MIT und TOIC Research, zielt darauf ab, diesen Ansatz zu replizieren, indem es ein autonomes Trading-Unternehmen auf dem lokalen Rechner simuliert. In einem Benchmark erzielte das Framework eine kumulative Rendite von 26,6 % mit einer hohen Sharpe Ratio, während traditionelle Strategien Verluste verzeichneten.

Die Schwächen von Single-Agent-Trading-Bots

Das Hauptproblem von Single-Agent-Trading-Bots ist der "Telephone-Effekt". In einem kontinuierlichen Chat-Thread vergessen oder verfälschen die KI-Modelle die ursprünglichen Daten und verlieren den logischen Faden. Das Trading Agents Framework löst dieses Problem, indem es eine strukturierte Pipeline mit spezialisierten Rollen implementiert. Die Architektur besteht aus vier Schichten: Analysten-Team, Forscher-Team, Trader-Agent und Risikomanagement-Team.

Die vier Schichten des Trading Agents Framework

Die erste Schicht, das Analysten-Team, besteht aus vier parallelen Sub-Agenten: einem fundamentalen Analysten, einem technischen Analysten, einem Nachrichtenanalysten und einem Sentiment-Analysten. Diese Agenten arbeiten parallel, um SEC-Einreichungen zu analysieren, technische Indikatoren zu berechnen, globale Nachrichten zu sammeln und Social-Media-Daten zu verarbeiten. Die zweite Schicht, das Forscher-Team, besteht aus einem Bullen- und einem Bären-Forscher, die die Analystenberichte lesen und Argumente für bzw. gegen den Kauf finden. Ein Facilitator-Agent überwacht eine Debatte zwischen den beiden Forschern und wählt den Gewinner aus. Die dritte Schicht ist der Trader-Agent, der das gewonnene Argument und die technischen Indikatoren verwendet, um die Positionsgröße zu bestimmen. Die vierte Schicht ist das Risikomanagement-Team, das aus drei Agenten besteht: einem aggressiven, einem neutralen und einem konservativen Agenten. Diese Agenten debattieren über den vorgeschlagenen Trade und passen das Risikoprofil an, bevor sie es dem Portfoliomanager zur Ausführung übergeben.

Updates in Version 0.2.4

Die Version 0.2.4 des Trading Agents Framework integriert Langraph für Checkpointing, was bedeutet, dass das System bei Verbindungsabbrüchen die Analyse fortsetzen kann, anstatt von vorne zu beginnen. Außerdem wurden unübersichtliche Textprotokolle durch strukturierte Pydantic-Ausgaben ersetzt, die saubere, parsierbare JSON-Daten garantieren. Wichtig ist auch die native Unterstützung für DeepSeek-, Quen- und lokale Olama-Modelle, wodurch die Abhängigkeit von teuren OpenAI-Credits reduziert wird.

Installation und Konfiguration des Trading Agents Framework

Das Video führt Schritt für Schritt durch die Installation und Konfiguration des Trading Agents Framework. Zuerst wird der Code von GitHub geklont und eine isolierte Python-Sandbox erstellt. Anschließend werden die erforderlichen Pakete installiert und die Umgebungsvariablen in der .env-Datei konfiguriert, einschließlich der API-Schlüssel für Open Router und Finnhub.

Ausführen des Trading Agents Framework

Nach der Konfiguration wird das Trading Agents Framework mit dem Befehl python -m trading_agents.main gestartet. Der Benutzer wird aufgefordert, ein Ticker-Symbol, ein Analysedatum und eine Ausgabesprache einzugeben. Anschließend werden die Analysten-Teammitglieder ausgewählt, die Forschungstiefe festgelegt und der LLM-Anbieter ausgewählt. Das System beginnt dann mit der Datenerfassung und -analyse, wobei der Fortschritt in einem Live-Dashboard angezeigt wird.

Einschränkungen des Trading Agents Framework

Das Video weist auf die Einschränkungen des Trading Agents Framework hin. Erstens sind die API-Kosten hoch, da für eine einzige Trading-Entscheidung etwa 11 Deep-LLM-Aufrufe und über 20 Tool-Aufrufe erforderlich sind. Zweitens basiert der Benchmark des Papers nur auf 3 Monaten, was das Risiko von Overfitting birgt. Drittens ist die Datenpipeline fragil, da Nachrichten-APIs oft doppelte Artikel oder verzögerte Zeitstempel liefern.

Fasse jedes YouTube-Video in Sekunden zusammen

Hol dir Zusammenfassungen wie diese für jedes Video, in deiner Sprache, mit der kostenlosen Summ-App.

Laden im App Store
Jetzt bei Google Play

Transkript

Vollständiges Transkript von „TradingAgents: I Ran the 56k-Star Open-Source Hedge Fund (Full Setup)“. Klicke auf einen Zeitstempel, um das Video an dieser Stelle zu öffnen. Du brauchst ein anderes Video? Nutze den YouTube-Transkript-Generator.

0:00 If you have ever tried to build an AI trading bot, you have probably lost money. You take an LLM, you shove a bunch of Yahoo Finance data and a few news articles into its prompt and you ask it what to do. The AI hallucinates a trend. YOLO trades your entire portfolio on a bad signal and crashes. The tech industry has convinced developers that a single massive context window can solve financial markets. But real Wall Street quantitative firms do not rely on one person sitting in a room guessing. They use highly structured teams. Analysts gather data, researchers argue, traders propose, and risk managers audit. A few days ago, a team from UCLA, MIT, and Torek Research dropped an open source framework called Trading Agents. It is quietly crossing

0:45 54,000 stars on GitHub because it fundamentally changes how we build AI financial systems. It doesn't just read data, it mathematically simulates an entire autonomous trading firm right on your local machine. In their recent benchmark, while traditional strategies like MACD and buy and hold actually lost money on Apple stock during a volatile three month period, the Trading Agent's framework captured a 26.6% cumulative return with an absolutely massive Sharpe ratio of 8.2. I will show step by step setup of Trading Agent, and in next six minutes private hedge fund will be running on your machine completely free. Welcome back to Everyday AI School. where we cut the fluff and pack every second with value. Today we are tearing down the trading agents framework. I am going

1:32 to explain why single agent bots fail, how this multi-agent adversarial architecture works, the massive updates they just shipped in version 0.2.4, and exactly how you can install this on your machine today. Let's get into it. To understand why every senior AI engineer is starring this repository, you have to understand the fatal flaw of standard LLM trading bots. the telephone effect. When you use pure natural language in a single continuous chat thread, the AI eventually forgets the initial data, corrupts the context, and loses the logical thread. Trading agents solves this by abandoning the generic chat interface and enforcing a strict, structured pipeline of specialized roles. The architecture is built on four distinct layers.

2:17 Layer 1 is the analyst team. Instead of one agent trying to read everything, four parallel sub-agents are deployed. The fundamental analyst pulls SEC filings and calculates valuation scores. The technical analyst computes over 60 technical indicators like RSI and Bollinger Bands. The news analyst scrapes global macroeconomic headlines. And the sentiment analyst processes social media data. Because they operate in parallel, they do not hallucinate across domains. They each output a strictly formatted quantitative report. Layer 2 is the secret weapon. the researcher team. The framework spawns two new agents, a bull researcher and a bear researcher. The bull's only job is to read the analyst reports and find every reason to buy. The bear's only job is to find every reason to sell. They are

3:06 forced into a multi-round adversarial debate. A facilitator agent watches this debate, evaluates the logic, and declares a winner. This completely eliminates the standard LLM bias where the AI just blindly agrees with whatever the user suggests. Layer 3 is the trader agent. It takes the winning debate argument and the technical indicators and mathematically sizes the proposed position. But it does not execute the trade. Layer 4 is the risk management team. Before any trade is executed, the proposal is sent to a board of three risk agents. An aggressive agent, a neutral agent, and a conservative agent. The conservative agent might look at the high market volatility and demand the position size be cut in half. The neutral agent might suggest hedging. They debate, synthesize an adjusted risk profile, and finally

3:54 hand it to the portfolio manager for execution. You are no longer relying on a single AI guess. You are relying on a peer-reviewed, heavily audited pipeline. And with the newly released version 0.2.4, Torek Research just took this from a research paper to a production-grade tool. They integrated LangGraph under the hood, meaning the system now has opt-in checkpointing. If your API connection drops in the middle of a massive analysis, it resumes exactly where it left off instead of starting over. They also replaced messy text logs with structured Pydantic outputs, guaranteeing the AI returns clean, parsable JSON data every single time. And most importantly for us, they added native support for DeepSeq, Quen, and local Olama models. You are no longer forced to burn expensive OpenAI credits. So how

4:44 do you actually use this? First open your code IDE. Once your empty workspace loads, navigate to the very top menu bar, click on View, then select Terminal from the drop-down. This will open up your command line interface at the bottom of your screen. Now we need to pull the code from GitHub. Type the exact command git clone https colon slash slash github dot com slash toric research slash trading agents dot git and press enter. Once the terminal shows that it is done resolving deltas, type CD Trading Agents and hit enter to navigate directly into that new directory. Before we install anything, we need to create an isolated Python sandbox. Type Python 3-MVENVVENV and press enter. This takes a couple of

5:33 seconds to build. Once the prompt returns, you need to activate it by typing sourcevenv slash bin slash activate and hitting enter. Now if you look over at the file explorer on the left sidebar, you can click the trading agents folder to expand it and see the entire file structure, including the scripts and tools directories. Let's get our dependencies installed. Click back into your terminal window, type pip install dot and press enter. This is going to trigger a massive download, installing all the required packages. You will see a long list of text scrolling by as it downloads and installs everything. This process will take a minute or two to complete, so we will let that run in the background. While PIP is doing its job, go over to your File Explorer sidebar again. Scroll down until you find the file named .env.example.

6:22 Right-click on this file, select Rename from the context menu, Delete the .example part so it just says .env and press enter. Click on your newly renamed .env file to open it in the editor. Inside, you will see a list of environment variables for various LLM providers. As I mentioned at the start, you can use OpenAI, Google, Anthropic, or DeepSeq, but we are utilizing OpenRouter today. Now, let's grab our actual keys. Open your web browser from the dock. I am using Chrome. and navigate to openrouter.ai slash settings slash keys. Click the Create Key button. Give it a name like testing and click Create. Once it generates, click the Copy icon to copy that entire long string. Switch back to Visual Studio Code. Locate the openrouter underscore api underscore key

7:12 variable in your .n file on line 9, and paste your copied key exactly between the quotation marks. Next, jump back to your browser and open up your FinHub dashboard. Locate your FinHub API key under the API key section, click the copy icon, and return to Visual Studio Code. Highlight the placeholder text your "-finhub-api-key-here we typed earlier", and paste your real FinHub API key in its place. By now, your terminal should be finished installing all the packages, displaying a successfully built Trading Agents message. We are completely configured and ready to go. Make sure your terminal is active, type python-mcli.main and hit enter. The terminal will clear and the Trading Agent's Multi-Agent Framework interface will launch with

7:59 its green text logo. Notice right here on the welcome screen, the terminal is showing the same analyst team, research team, trader, and risk management as I explained earlier. Step 1 asks for the ticker symbol. You can add any ticker symbol, I am going with the Apple one, type AAPL and hit enter. Step 2 asks for the analysis date. It defaults to the current date. Step 3 asks for the output language. It defaults to English, so press Enter again. Step 4 is where you select your analysts team. You need to press the down arrow and space bar to select each one individually. Press Space to select the market analyst, social analyst, news analyst, and fundamentals analyst, so they all turn green indicating four selections are done. Then press Enter.

8:45 Step 5 asks for research depth. Use your down arrow key to select Shallow-Quick Research, Few Debate and Strategy Discussion Rounds, and hit Enter. Step 6 asks for your LLM provider. Use the arrow keys to scroll down to Open Router and hit Enter. Finally, Step 7 asks for your Thinking Agents. The setup prompts will disappear and the Live Progress Dashboard will take over your screen. You can see the Analyst Team table pop up. The Market Analyst, Social Analyst, News Analyst, and Fundamentals Analyst are all registered. and their status shows as pending, with market analyst quickly changing to in progress. On the right-hand side, under Messages and Tools, you will see the system actively working. It immediately calls the Get Stock Data tool for Apple, confirming that it has pulled over

9:31 1,300 records of open, high, low, close, and volume data from 2021 to 2026. Moments later you will see it call the Get News tool, fetching the latest articles from Yahoo Finance and identifying recent earnings reports. Your local multi-agent firm is now fully running and compiling its data. This is an open source, state-of-the-art framework, but it has severe limitations you must understand before you trust it with real money. First, the API costs are brutal. Running this full pipeline requires roughly 11 deep LLM calls and over 20 tool calls for a single trading decision. If you backtest an entire year of daily data using premium models like GPT 5.5 or Opus 4.7, you

10:16 will drain your wallet. Second, the paper's benchmark was only three months long. Three months of outperforming the market is an incredible proof of concept, but it is not infinite alpha. The market has different regimes, and short backtests carry a massive risk of overfitting. And finally, the data pipeline itself is fragile. News APIs often return duplicate articles or delayed timestamps. You need serious data engineering to sanitize your inputs before feeding them to the agents.

Share

Weitere Video-Zusammenfassungen