This commit is contained in:
Yijia-Xiao
2024-12-28 12:28:02 +08:00
parent db9f63fa54
commit 8b7b5b9c78

View File

@@ -188,12 +188,34 @@
<h3 class="title is-4">Analyst Team</h3>
<div class="content has-text-justified">
<p>The Analyst Team (Figure 2) is composed of specialized agents responsible for gathering and analyzing various types of market data to inform trading decisions. Each agent focuses on a specific aspect of market analysis, bringing together a comprehensive view of the market's conditions.</p>
<p>The Analyst Team is composed of specialized agents responsible for gathering and analyzing various types of market data to inform trading decisions. Each agent focuses on a specific aspect of market analysis, bringing together a comprehensive view of the market's conditions.</p>
<figure class="image">
<img src="./static/images/Analyst.png" alt="TradingAgents Analyst Team">
<figcaption class="has-text-centered"><strong>Figure 2:</strong> TradingAgents Analyst Team</figcaption>
</figure>
<div class="columns is-multiline">
<div class="column is-one-quarter">
<figure class="image">
<img src="./static/images/Analyst.png" alt="TradingAgents Analyst Team">
<figcaption class="has-text-centered"><strong>Figure 2:</strong> TradingAgents Analyst Team</figcaption>
</figure>
</div>
<div class="column is-one-quarter">
<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: Bullish Perspectives and Bearish Perspectives</figcaption>
</figure>
</div>
<div class="column is-one-quarter">
<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 is-one-quarter">
<figure class="image">
<img src="./static/images/RiskMGMT.png" alt="TradingAgents Risk Management Team and Fund Manager Approval Workflow">
<figcaption class="has-text-centered"><strong>Figure 5:</strong> TradingAgents Risk Management Team and Fund Manager Approval Workflow</figcaption>
</figure>
</div>
</div>
<ul>
<li><strong>Fundamental Analyst Agents</strong>: These agents evaluate company fundamentals by analyzing financial statements, earnings reports, insider transactions, and other pertinent data. They assess a company's intrinsic value to identify undervalued or overvalued stocks, providing insights into long-term investment potential.</li>
@@ -207,12 +229,7 @@
<h3 class="title is-4">Researcher Team</h3>
<div class="content has-text-justified">
<p>The Researcher Team (Figure 3) is responsible for critically evaluating the information provided by the Analyst Team. Comprised of agents adopting both bullish and bearish perspectives, they engage in multiple rounds of debate to assess the potential risks and benefits of investment decisions.</p>
<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: Bullish Perspectives and Bearish Perspectives</figcaption>
</figure>
<p>The Researcher Team is responsible for critically evaluating the information provided by the Analyst Team. Comprised of agents adopting both bullish and bearish perspectives, they engage in multiple rounds of debate to assess the potential risks and benefits of investment decisions.</p>
<ul>
<li><strong>Bullish Researchers</strong>: These agents advocate for investment opportunities by highlighting positive indicators, growth potential, and favorable market conditions. They construct arguments supporting the initiation or continuation of positions in certain assets.</li>
@@ -224,14 +241,7 @@
<h3 class="title is-4">Trader Agents</h3>
<div class="content has-text-justified">
<p>Trader Agents (Figure 4) are responsible for executing trading decisions based on the comprehensive analysis provided by the Analyst Team and the nuanced perspectives from the Researcher Team. They assess the synthesized information, considering both quantitative data and qualitative insights, to determine optimal trading actions.</p>
<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>
<p>The tasks of <strong>TradingAgents</strong> Trader include:</p>
<p>Trader Agents are responsible for executing trading decisions based on the comprehensive analysis provided by the Analyst Team and the nuanced perspectives from the Researcher Team. They assess the synthesized information, considering both quantitative data and qualitative insights, to determine optimal trading actions.</p>
<ul>
<li>Evaluating recommendations and insights from analysts and researchers.</li>
@@ -245,14 +255,7 @@
<h3 class="title is-4">Risk Management Team</h3>
<div class="content has-text-justified">
<p>The Risk Management Team (Figure 5) monitors and controls the firm's exposure to various market risks. These agents continuously evaluate the portfolio's risk profile, ensuring that trading activities remain within predefined risk parameters and comply with regulatory requirements.</p>
<figure class="image">
<img src="./static/images/RiskMGMT.png" alt="TradingAgents Risk Management Team and Fund Manager Approval Workflow">
<figcaption class="has-text-centered"><strong>Figure 5:</strong> TradingAgents Risk Management Team and Fund Manager Approval Workflow</figcaption>
</figure>
<p>The responsibilities of Risk Management Team include:</p>
<p>The Risk Management Team monitors and controls the firm's exposure to various market risks. These agents continuously evaluate the portfolio's risk profile, ensuring that trading activities remain within predefined risk parameters and comply with regulatory requirements.</p>
<ul>
<li>Assessing factors such as market volatility, liquidity, and counterparty risks.</li>
@@ -363,107 +366,82 @@
<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>
<th>Metric</th>
<th>Buy and Hold</th>
<th>MACD</th>
<th>KDJ & RSI</th>
<th>ZMR</th>
<th>SMA</th>
<th>TradingAgents</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>
<td><strong>Cumulative Return (CR%)</strong></td>
<td>-5.23</td>
<td>-1.49</td>
<td>2.05</td>
<td>0.57</td>
<td>-3.2</td>
<td><strong style="color:green;">26.62</strong></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><strong style="color:green;">1.22</strong></td>
<td></td>
<td>-</td><td>-</td><td>-</td><td>-</td>
<td><strong>Annualized Return (AR%)</strong></td>
<td>-5.09</td>
<td>-1.48</td>
<td>2.07</td>
<td>0.57</td>
<td>-2.97</td>
<td><strong style="color:green;">30.50</strong></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>
<td><strong>Sharpe Ratio (SR)</strong></td>
<td>-1.29</td>
<td>-0.81</td>
<td>1.64</td>
<td>0.17</td>
<td>-1.72</td>
<td><strong style="color:green;">8.21</strong></td>
</tr>
<tr>
<td>ZMR</td>
<td>0.57</td><td>0.57</td><td>0.17</td><td><strong style="color:green;">0.86</strong></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><strong style="color:green;">0.82</strong></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>
<td><strong>Maximum Drawdown (MDD%)</strong></td>
<td>11.90</td>
<td>4.53</td>
<td>1.09</td>
<td>0.86</td>
<td>3.67</td>
<td>0.91</td>
</tr>
</tbody>
</table>
<p class="has-text-centered"><strong>Table 1:</strong> TradingAgents (<strong>AIS</strong>): Comparison of RNA Sequence (left), Modality Fusion (middle), and TradingAgents (right). Embedding base models are BERT, PubMedBERT, and OpenAI's GPT text-embedding-3-large.</p>
<p class="has-text-centered"><strong>Table 1:</strong> Performance comparison of TradingAgents against baseline models using four evaluation metrics.</p>
<h3 class="title is-4">Sharpe Ratio</h3>
<p>The Sharpe Ratio performance highlights <strong>TradingAgents</strong>' exceptional ability to deliver superior risk-adjusted returns, consistently outperforming all baseline models across AAPL, GOOGL, and AMZN with Sharpe Ratios of at least 5.60—surpassing the next best models by a significant margin of at least 2.07 points. This result underscores <strong>TradingAgents</strong>' effectiveness in balancing returns against risk, a critical metric for sustainable and predictable investment growth. By excelling over market benchmarks like Buy-and-Hold and advanced strategies such as KDJRSI, SMA, MACD, and ZMR, <strong>TradingAgents</strong> demonstrates its adaptability and robustness in diverse market conditions. Its ability to maximize returns while maintaining controlled risk exposure establishes a solid foundation for multi-agent and debate-based automated trading algorithms.</p>
<h4 class="title is-5">Cumulative Return (CR)</h4>
<p>The cumulative return measures the total return generated over the simulation period. It is calculated as:</p>
<p>
<strong>CR</strong> = ((V<sub>end</sub> - V<sub>start</sub>) / V<sub>start</sub>) × 100%
</p>
<p>where V<sub>end</sub> is the portfolio value at the end of the simulation, and V<sub>start</sub> is the initial portfolio value.</p>
<h3 class="title is-4">Maximum Drawdown</h3>
<p>While rule-based baselines demonstrated superior performance in controlling risk, as reflected by their maximum drawdown scores, they fell short in capturing high returns. This trade-off between risk and reward underscores <strong>TradingAgents</strong>' strength as a balanced approach. Despite higher returns being typically associated with higher risks, <strong>TradingAgents</strong> maintained a relatively low maximum drawdown compared to many baselines. Its effective risk-control mechanisms, facilitated by the debates among risk-control agents, ensured that the maximum drawdown remained within a manageable limit, not exceeding 2%. This demonstrates <strong>TradingAgents</strong>' capability to strike a robust balance between maximizing returns and managing risk effectively.</p>
<h4 class="title is-5">Annualized Return (AR)</h4>
<p>The annualized return normalizes the cumulative return over the number of years:</p>
<p>
<strong>AR</strong> = (((V<sub>end</sub> / V<sub>start</sub>)^(1/N)) - 1) × 100%
</p>
<p>where N is the number of years in the simulation.</p>
<h3 class="title is-4">Explainability</h3>
<p>A significant drawback of current deep learning methods for trading is their dense and complex architectures, which often render the decisions made by trading agents indecipherable to humans. This challenge, rooted in the broader issue of AI explainability, is particularly critical for trading agents, as they operate in real-world financial markets, often involving substantial sums of money where incorrect decisions can lead to severe consequences and losses.</p>
<h4 class="title is-5">Sharpe Ratio (SR)</h4>
<p>The Sharpe ratio measures risk-adjusted return by comparing a portfolio's excess return over the risk-free rate to its volatility:</p>
<p>
<strong>SR</strong> = (R̄ - R<sub>f</sub>) / σ
</p>
<p>where R̄ is the average portfolio return, R<sub>f</sub> is the risk-free rate (e.g., yield of 3-month Treasury bills), and σ is the standard deviation of the portfolio returns.</p>
<p>In contrast, an LLM-based agentic framework for trading offers a transformative advantage: its operations and decisions are communicated in natural language, making them highly interpretable to humans. To illustrate this, we provide the full trading log of <strong>TradingAgents</strong> for a single day in the Appendix, showcasing its use of the ReAct-style prompting framework. Each decision made by the agents is accompanied by detailed reasoning, tool usage, and thought processes, enabling traders to easily understand and debug the system. This transparency empowers traders to fine-tune and adjust the framework to account for factors influencing decisions, offering a significant edge in explainability over traditional deep-learning trading algorithms.</p>
<h4 class="title is-5">Maximum Drawdown (MDD)</h4>
<p>Maximum drawdown measures the largest peak-to-trough decline in the portfolio value:</p>
<p>
<strong>MDD</strong> = max<sub>t ∈ [0, T]</sub> ((Peak<sub>t</sub> - Trough<sub>t</sub>) / Peak<sub>t</sub>) × 100%
</p>
</div>
</div>
</div>