forked from TauricResearch/TradingAgents
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
447 lines (405 loc) · 24.6 KB
/
index.html
File metadata and controls
447 lines (405 loc) · 24.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="description" content="TradingAgents: Multi-Agents LLM Financial Trading Framework">
<meta name="keywords" content="TradingAgents, LLM, Financial Trading, Multi-Agent Systems, Financial Markets, AI Trading">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>TradingAgents: Multi-Agents LLM Financial Trading Framework</title>
<script async src="https://www.googletagmanager.com/gtag/js?id=G-PYVRSFMDRL"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push(arguments); }
gtag('js', new Date());
gtag('config', 'G-PYVRSFMDRL');
</script>
<link href="https://fonts.googleapis.com/css?family=Google+Sans|Noto+Sans|Castoro" rel="stylesheet">
<link rel="stylesheet" href="./static/css/bulma.min.css">
<link rel="stylesheet" href="./static/css/bulma-carousel.min.css">
<link rel="stylesheet" href="./static/css/bulma-slider.min.css">
<link rel="stylesheet" href="./static/css/fontawesome.all.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/jpswalsh/academicons@1/css/academicons.min.css">
<link rel="stylesheet" href="./static/css/index.css">
<link rel="icon" href="./static/images/TradingAgents.png">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script defer src="./static/js/fontawesome.all.min.js"></script>
<script src="./static/js/bulma-carousel.min.js"></script>
<script src="./static/js/bulma-slider.min.js"></script>
<script src="./static/js/index.js"></script>
</head>
<body>
<nav class="navbar" role="navigation" aria-label="main navigation">
<div class="navbar-brand">
<a role="button" class="navbar-burger" aria-label="menu" aria-expanded="false">
<span aria-hidden="true"></span>
<span aria-hidden="true"></span>
<span aria-hidden="true"></span>
</a>
</div>
<div class="navbar-menu">
<div class="navbar-start" style="flex-grow: 1; justify-content: center;">
<a class="navbar-item" href="https://yijia-xiao.github.io/">
<span class="icon">
<i class="fas fa-home"></i>
</span>
</a>
<div class="navbar-item has-dropdown is-hoverable">
<a class="navbar-link">More Research</a>
<div class="navbar-dropdown">
<a class="navbar-item" href="https://arxiv.org/abs/2408.11363">ProteinGPT</a>
<a class="navbar-item" href="https://arxiv.org/abs/2310.02469">PrivacyMind</a>
<a class="navbar-item" href="https://arxiv.org/abs/2412.20138">TradingAgents</a>
</div>
</div>
</div>
</div>
</nav>
<section class="hero">
<div class="hero-body">
<div class="container is-max-desktop">
<div class="columns is-centered">
<div class="column has-text-centered">
<h1 class="title is-1 publication-title">TradingAgents: Multi-Agents LLM Financial Trading Framework</h1>
<div class="is-size-5 publication-authors">
<a href="https://yijia-xiao.github.io/" target="_blank" rel="noopener noreferrer"><span class="author-block">Yijia Xiao<sup>1</sup>,</span></a>
<span class="author-block">Edward Sun<sup>1</sup>,</span>
<span class="author-block">Di Luo<sup>1,2</sup>,</span>
<span class="author-block">Wei Wang<sup>1</sup></span>
</div>
<div class="is-size-5 publication-authors">
<span class="author-block"><sup>1</sup>University of California, Los Angeles,</span>
<span class="author-block"><sup>2</sup>Massachusetts Institute of Technology</span>
</div>
<div class="column has-text-centered">
<div class="publication-links">
<span class="link-block"><a href="https://arxiv.org/abs/2412.20138" class="external-link button is-normal is-rounded is-dark"><span class="icon"><i class="fas fa-file-pdf"></i></span><span>Paper</span></a></span>
<span class="link-block"><a href="https://github.com/TradingAgents-AI" class="external-link button is-normal is-rounded is-dark"><span class="icon"><i class="fab fa-github"></i></span><span>Code</span></a></span>
<span class="link-block"><a href="#citation-ref" class="external-link button is-normal is-rounded is-dark"><span class="icon"><i class="fas fa-quote-right"></i></span><span>Citation</span></a></span>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<section class="section">
<div class="container is-max-desktop">
<div class="columns is-centered has-text-centered">
<div class="column is-four-fifths">
<h2 class="title is-3">Abstract</h2>
<div class="content has-text-justified">
<p>We introduce <strong>TradingAgents</strong>, a novel stock trading framework inspired by trading firms, utilizing multiple LLM-powered agents with specialized roles such as fundamental, sentiment, and technical analysts, as well as traders with diverse risk profiles. The system features Bull and Bear researchers evaluating market conditions, a risk management team overseeing exposure, and traders integrating insights from debates and historical data to make informed decisions. This collaborative, dynamic environment enhances trading performance, as demonstrated by our comprehensive experiments showing significant improvements in cumulative returns, Sharpe ratio, and maximum drawdown compared to baseline models. Our results highlight the effectiveness of multi-agent LLM frameworks in financial trading.</p>
</div>
</div>
</div>
</div>
</section>
<section class="section">
<div class="container is-max-desktop">
<div class="columns is-centered">
<div class="column is-full-width">
<h2 class="title is-3">TradingAgents: Overview</h2>
<div class="content has-text-justified">
<p><strong>TradingAgents</strong> leverages a multi-agent framework to simulate a professional trading firm with distinct roles: fundamental, sentiment, and technical analysts; researchers; traders; and risk managers. These agents collaborate through structured communication and debates, enhancing decision-making and optimizing trading strategies.</p>
<figure class="image">
<img src="./static/images/schema.png" alt="TradingAgents Overall Framework Organization">
<figcaption class="has-text-centered"><strong>Figure 1:</strong> TradingAgents Overall Framework Organization.<br><strong>I. Analysts Team</strong>: Four analysts concurrently gather relevant market information.<br><strong>II. Research Team</strong>: The team discusses and evaluates the collected data.<br><strong>III. Trader</strong>: Based on the researchers' analysis, the trader makes the trading decision.<br><strong>IV. Risk Management Team</strong>: Risk guardians assess the decision against current market conditions to mitigate risks.<br><strong>V. Fund Manager</strong>: The fund manager approves and executes the trade.</em></figcaption>
</figure>
</div>
</div>
</div>
</div>
</section>
<section class="section">
<div class="container is-max-desktop">
<div class="columns is-centered">
<div class="column is-full-width">
<h2 class="title is-3">TradingAgents: Role Specialization</h2>
<div class="content has-text-justified">
<p>Assigning specific roles to LLM agents allows complex trading objectives to be broken down into manageable tasks. Inspired by trading firms, <strong>TradingAgents</strong> features seven distinct roles: Fundamentals Analyst, Sentiment Analyst, News Analyst, Technical Analyst, Researcher, Trader, and Risk Manager. Each agent is equipped with specialized tools and constraints tailored to their function, ensuring comprehensive market analysis and informed decision-making.</p>
<h3 class="title is-4">Analyst Team</h3>
<div class="content has-text-justified">
<p>The Analyst Team gathers and analyzes market data across various domains:</p>
<ul>
<li><strong>Fundamental Analysts:</strong> Assess company fundamentals to identify undervalued or overvalued stocks.</li>
<li><strong>Sentiment Analysts:</strong> Analyze social media and public sentiment to gauge market mood.</li>
<li><strong>News Analysts:</strong> Evaluate news and macroeconomic indicators to predict market movements.</li>
<li><strong>Technical Analysts:</strong> Use technical indicators to forecast price trends and trading opportunities.</li>
</ul>
<p>Combined, their insights provide a holistic market view, feeding into the Researcher Team for further evaluation.</p>
<figure class="image">
<img src="./static/images/Analyst.png" alt="TradingAgents Analyst Team" style="width: 65%;">
<figcaption class="has-text-centered"><strong>Figure 2:</strong> TradingAgents Analyst Team</figcaption>
</figure>
</div>
<h3 class="title is-4">Researcher Team</h3>
<div class="content has-text-justified">
<p>The Researcher Team critically evaluates analyst data through a dialectical process involving bullish and bearish perspectives. This debate ensures balanced analysis, identifying both opportunities and risks to inform trading strategies.</p>
<div class="columns">
<div class="column">
<figure class="image">
<img src="./static/images/Researcher.png" alt="TradingAgents Researcher Team">
<figcaption class="has-text-centered"><strong>Figure 3:</strong> TradingAgents Researcher Team</figcaption>
</figure>
</div>
<div class="column">
<figure class="image">
<img src="./static/images/Trader.png" alt="TradingAgents Trader Decision-Making Process">
<figcaption class="has-text-centered"><strong>Figure 4:</strong> TradingAgents Trader Decision-Making Process</figcaption>
</figure>
</div>
<div class="column">
<figure class="image">
<img src="./static/images/RiskMGMT.png" alt="TradingAgents Risk Management Team Workflow">
<figcaption class="has-text-centered"><strong>Figure 5:</strong> TradingAgents Risk Management Workflow</figcaption>
</figure>
</div>
</div>
<ul>
<li><strong>Bullish Researchers:</strong> Highlight positive market indicators and growth potential.</li>
<li><strong>Bearish Researchers:</strong> Focus on risks and negative market signals.</li>
</ul>
<p>This process ensures a balanced understanding of market conditions, aiding Trader Agents in making informed decisions.</p>
</div>
<h3 class="title is-4">Trader Agents</h3>
<div class="content has-text-justified">
<p>Trader Agents execute decisions based on comprehensive analyses. They evaluate insights from analysts and researchers to determine optimal trading actions, balancing returns and risks in a dynamic market environment.</p>
<ul>
<li>Assessing analyst and researcher recommendations.</li>
<li>Determining trade timing and size.</li>
<li>Executing buy/sell orders.</li>
<li>Adjusting portfolios in response to market changes.</li>
</ul>
<p>Precision and strategic thinking are essential for their role in maximizing performance.</p>
</div>
<h3 class="title is-4">Risk Management Team</h3>
<div class="content has-text-justified">
<p>The Risk Management Team oversees the firm's exposure to market risks, ensuring trading activities stay within predefined limits.</p>
<ul>
<li>Assessing market volatility and liquidity.</li>
<li>Implementing risk mitigation strategies.</li>
<li>Advising Trader Agents on risk exposures.</li>
<li>Aligning portfolio with risk tolerance.</li>
</ul>
<p>They ensure financial stability and safeguard assets through effective risk control.</p>
<p>All agents utilize the ReAct prompting framework, facilitating a collaborative and dynamic decision-making process reflective of real-world trading systems.</p>
</div>
</div>
</div>
</div>
</div>
</section>
<section class="section">
<div class="container is-max-desktop">
<div class="columns is-centered">
<div class="column is-full-width">
<h2 class="title is-3">TradingAgents: Agent Workflow</h2>
<div class="content has-text-justified">
<h3 class="title is-4">Communication Protocol</h3>
<p>To enhance communication efficiency, <strong>TradingAgents</strong> employs a structured protocol that combines clear, structured outputs with natural language dialogue. This approach minimizes information loss and maintains context over long interactions, ensuring focused and effective communication among agents.</p>
<h3 class="title is-4">Types of Agent Interactions</h3>
<p>Unlike previous frameworks that rely heavily on unstructured dialogue, our agents communicate through structured reports and diagrams, preserving essential information and enabling direct queries from the global state.</p>
<ul>
<li><strong>Analyst Team:</strong> Compiles research into concise analysis reports.</li>
<li><strong>Traders:</strong> Review analyst reports and produce decision signals with detailed rationales.</li>
</ul>
<p>Natural language dialogue is reserved for specific interactions, such as debates within the Researcher and Risk Management teams, fostering deeper reasoning and balanced decision-making.</p>
<ul>
<li><strong>Researcher Team:</strong> Engages in debates to form balanced perspectives.</li>
<li><strong>Risk Management Team:</strong> Deliberates on trading plans from multiple risk perspectives.</li>
<li><strong>Fund Manager:</strong> Reviews and approves risk-adjusted trading decisions.</li>
</ul>
<h3 class="title is-4">Backbone LLMs</h3>
<p>We select LLMs based on task requirements, using quick-thinking models for data retrieval and deep-thinking models for in-depth analysis and decision-making. This strategic alignment ensures efficiency and robust reasoning, allowing <strong>TradingAgents</strong> to operate without the need for GPUs and enabling easy integration of alternative models in the future.</p>
</div>
</div>
</div>
</div>
</section>
<section class="section">
<div class="container is-max-desktop">
<div class="columns is-centered">
<div class="column is-full-width">
<h2 class="title is-3">Experiments</h2>
<div class="content has-text-justified">
<p>We evaluated <strong>TradingAgents</strong> using a comprehensive experimental setup to assess its performance against various baselines.</p>
<h3 class="title is-4">Back Trading</h3>
<p>Our simulation utilized a multi-asset, multi-modal financial dataset including historical stock prices, news articles, social media sentiments, insider transactions, financial reports, and technical indicators from January to March 2024.</p>
<h3 class="title is-4">Simulation Setup</h3>
<p>The trading environment spanned from June to November 2024. Agents operated on a daily basis, making decisions based on available data without future information, ensuring unbiased results.</p>
<h3 class="title is-4">Baseline Models</h3>
<p>We compared <strong>TradingAgents</strong> against the following strategies:</p>
<ul>
<li><strong>Buy and Hold:</strong> Investing equally across selected stocks throughout the period.</li>
<li><strong>MACD:</strong> Momentum strategy based on MACD crossovers.</li>
<li><strong>KDJ & RSI:</strong> Combined momentum indicators for trading signals.</li>
<li><strong>ZMR:</strong> Mean reversion strategy based on price deviations.</li>
<li><strong>SMA:</strong> Trend-following strategy using moving average crossovers.</li>
</ul>
<h3 class="title is-4">Evaluation Metrics</h3>
<div class="columns">
<div class="column">
<figure class="image">
<img src="./static/images/CumulativeReturns_AAPL.png" alt="Cumulative Returns on AAPL">
<figcaption class="has-text-centered"><strong>(a)</strong> Cumulative Returns on AAPL</figcaption>
</figure>
</div>
<div class="column">
<figure class="image">
<img src="./static/images/TradingAgents_Transactions_AAPL.png" alt="TradingAgents Transactions for AAPL">
<figcaption class="has-text-centered">
<strong>(b)</strong> TradingAgents Transactions for AAPL.<br>
Green / Red Arrows for Long / Short Positions.
</figcaption>
</figure>
</div>
</div>
<table class="table is-striped is-fullwidth is-centered">
<thead>
<tr>
<th>Categories</th>
<th>Models</th>
<th colspan="4">AAPL</th>
<th></th>
<th colspan="4">GOOGL</th>
<th></th>
<th colspan="4">AMZN</th>
</tr>
<tr>
<th></th>
<th></th>
<th>CR%↑</th>
<th>ARR%↑</th>
<th>SR↑</th>
<th>MDD%↓</th>
<th></th>
<th>CR%↑</th>
<th>ARR%↑</th>
<th>SR↑</th>
<th>MDD%↓</th>
<th></th>
<th>CR%↑</th>
<th>ARR%↑</th>
<th>SR↑</th>
<th>MDD%↓</th>
</tr>
</thead>
<tbody>
<tr>
<td>Market</td>
<td>B&H</td>
<td>-5.23</td><td>-5.09</td><td>-1.29</td><td>11.90</td>
<td></td>
<td>7.78</td><td>8.09</td><td>1.35</td><td>13.04</td>
<td></td>
<td>17.1</td><td>17.6</td><td>3.53</td><td>3.80</td>
</tr>
<tr>
<td rowspan="4">Rule-based</td>
<td>MACD</td>
<td>-1.49</td><td>-1.48</td><td>-0.81</td><td>4.53</td>
<td></td>
<td>6.20</td><td>6.26</td><td>2.31</td><td>1.22</td>
<td></td>
<td>-</td><td>-</td><td>-</td><td>-</td>
</tr>
<tr>
<td>KDJ&RSI</td>
<td>2.05</td><td>2.07</td><td>1.64</td><td>1.09</td>
<td></td>
<td>0.4</td><td>0.4</td><td>0.02</td><td>1.58</td>
<td></td>
<td>-0.77</td><td>-0.76</td><td>-2.25</td><td>1.08</td>
</tr>
<tr>
<td>ZMR</td>
<td>0.57</td><td>0.57</td><td>0.17</td><td>0.86</td>
<td></td>
<td>-0.58</td><td>0.58</td><td>2.12</td><td>2.34</td>
<td></td>
<td>-0.77</td><td>-0.77</td><td>-2.45</td><td>0.82</td>
</tr>
<tr>
<td>SMA</td>
<td>-3.2</td><td>-2.97</td><td>-1.72</td><td>3.67</td>
<td></td>
<td>6.23</td><td>6.43</td><td>2.12</td><td>2.34</td>
<td></td>
<td>11.01</td><td>11.6</td><td>2.22</td><td>3.97</td>
</tr>
<tr>
<td rowspan="1">Ours</td>
<td><strong>TradingAgents</strong></td>
<td><strong style="color:green;">26.62</strong></td><td><strong style="color:green;">30.5</strong></td><td><strong style="color:green;">8.21</strong></td><td>0.91</td>
<td></td>
<td><strong style="color:green;">24.36</strong></td><td><strong style="color:green;">27.58</strong></td><td><strong style="color:green;">6.39</strong></td><td>1.69</td>
<td></td>
<td><strong style="color:green;">23.21</strong></td><td><strong style="color:green;">24.90</strong></td><td><strong style="color:green;">5.60</strong></td><td>2.11</td>
</tr>
<tr>
<td colspan="2">Improvement(%)</td>
<td>24.57</td><td>28.43</td><td>6.57</td><td>-</td>
<td></td>
<td>16.58</td><td>19.49</td><td>4.26</td><td>-</td>
<td></td>
<td>6.10</td><td>7.30</td><td>2.07</td><td>-</td>
</tr>
</tbody>
</table>
<p class="has-text-centered"><strong>Table 1:</strong> TradingAgents: Performance Metrics Comparison across AAPL, GOOGL, and AMZN.</p>
<h3 class="title is-4">Sharpe Ratio</h3>
<p><strong>TradingAgents</strong> achieves superior risk-adjusted returns, consistently outperforming all baselines across AAPL, GOOGL, and AMZN. The enhanced Sharpe Ratios demonstrate the framework's effectiveness in balancing returns with risk, highlighting its robustness in diverse market conditions.</p>
<h3 class="title is-4">Maximum Drawdown</h3>
<p>While rule-based strategies excel in controlling risk, <strong>TradingAgents</strong> maintains a low maximum drawdown without sacrificing high returns. This balance underscores the framework's ability to maximize profits while effectively managing risk.</p>
<h3 class="title is-4">Explainability</h3>
<p>Unlike traditional deep learning models, <strong>TradingAgents</strong> offers transparent decision-making through natural language explanations. Each agent's actions are accompanied by detailed reasoning and tool usage, making the system's operations easily interpretable and debuggable, which is crucial for real-world financial applications.</p>
</div>
</div>
</div>
</div>
</section>
<section class="section">
<div class="container is-max-desktop">
<div class="columns is-centered">
<div class="column is-full-width">
<h2 class="title is-3">Conclusion</h2>
<div class="content has-text-justified">
<p>We presented <strong>TradingAgents</strong>, a multi-agent LLM-driven stock trading framework that emulates a realistic trading firm with specialized agents collaborating through debates and structured communication. Our framework leverages diverse data sources and multi-agent interactions to enhance trading decisions, achieving superior performance in cumulative returns, Sharpe ratio, and risk management compared to traditional strategies. Future work includes live deployment, expanding agent roles, and integrating real-time data processing to further improve performance.</p>
</div>
</div>
</div>
</div>
</section>
<section id="citation-ref" class="section">
<div class="container content">
<h2 class="title">BibTeX</h2>
<pre><code>@inproceedings{xiao2025tradingagentsmultiagentsllmfinancial,
title = {TradingAgents: Multi-Agents LLM Financial Trading Framework},
author = {Yijia Xiao and Edward Sun and Di Luo and Wei Wang},
booktitle = {Multi-Agent AI in the Real World @ AAAI 2025},
year = {2025},
eprint = {2412.20138},
archivePrefix= {arXiv},
primaryClass = {q-fin.TR},
url = {https://arxiv.org/abs/2412.20138},
note = {Workshop paper},
}</code></pre>
</div>
</section>
<footer class="footer">
<div class="container">
<div class="content has-text-centered">
<a class="icon-link" href="https://arxiv.org/abs/2412.20138"><i class="fas fa-file-pdf"></i></a>
<a class="icon-link" href="https://github.com/TradingAgents-AI"><i class="fab fa-github"></i></a>
</div>
<div class="columns is-centered">
<div class="column is-8">
<div class="content">
<p>This website is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/">Creative Commons Attribution-ShareAlike 4.0 International License</a>.</p>
</div>
</div>
</div>
</div>
</footer>
</body>
</html>