Compare commits
53 Commits
e6dbd11ba1
...
572ef6c367
| Author | SHA1 | Date |
|---|---|---|
|
|
572ef6c367 | |
|
|
7e4700626e | |
|
|
b6ea4bd939 | |
|
|
24d61e673a | |
|
|
cf1f89adf7 | |
|
|
df916f1c1a | |
|
|
254c6104bb | |
|
|
13b826a31d | |
|
|
b2ef960da7 | |
|
|
a5dcc7da45 | |
|
|
7bb2941b07 | |
|
|
32be17c606 | |
|
|
c07dcf026b | |
|
|
d23fb539e9 | |
|
|
b01051b9f4 | |
|
|
8fdbbcca3d | |
|
|
86bc0e793f | |
|
|
7fc9c28a94 | |
|
|
7bcc2cbd8a | |
|
|
6211b1132a | |
|
|
8b04ec307f | |
|
|
0ab323c2c6 | |
|
|
a6734d71bc | |
|
|
a438acdbbd | |
|
|
c73e374e7c | |
|
|
f704828f89 | |
|
|
fda4f664e8 | |
|
|
718df34932 | |
|
|
43aa9c5d09 | |
|
|
26c5ba5a78 | |
|
|
78ea029a0b | |
|
|
ee3d499894 | |
|
|
7abff0f354 | |
|
|
b575bd0941 | |
|
|
b8f712b170 | |
|
|
52284ce13c | |
|
|
11804f88ff | |
|
|
1e86e74314 | |
|
|
c2f897fc67 | |
|
|
ed32081f57 | |
|
|
2af7ef3d79 | |
|
|
383deb72aa | |
|
|
7eaf4d995f | |
|
|
da84ef43aa | |
|
|
90b23e72f5 | |
|
|
417b09712c | |
|
|
570644d939 | |
|
|
9647359246 | |
|
|
99789f9cd1 | |
|
|
a879868396 | |
|
|
0013415378 | |
|
|
0fdfd35867 | |
|
|
e994e56c23 |
|
|
@ -15,13 +15,3 @@ node_modules/
|
|||
|
||||
# Frontend dev artifacts
|
||||
.frontend-dev/
|
||||
|
||||
# Runtime config
|
||||
schedule_config.json
|
||||
|
||||
# Playwright MCP artifacts
|
||||
.playwright-mcp/
|
||||
|
||||
# Test screenshots (root level)
|
||||
test-*.png
|
||||
prediction-accuracy-new.png
|
||||
|
|
|
|||
|
After Width: | Height: | Size: 321 KiB |
|
After Width: | Height: | Size: 81 KiB |
|
After Width: | Height: | Size: 149 KiB |
|
After Width: | Height: | Size: 171 KiB |
|
After Width: | Height: | Size: 148 KiB |
|
After Width: | Height: | Size: 512 KiB |
|
After Width: | Height: | Size: 63 KiB |
|
After Width: | Height: | Size: 319 KiB |
|
After Width: | Height: | Size: 400 KiB |
|
After Width: | Height: | Size: 226 KiB |
|
After Width: | Height: | Size: 68 KiB |
|
After Width: | Height: | Size: 68 KiB |
|
After Width: | Height: | Size: 64 KiB |
|
After Width: | Height: | Size: 68 KiB |
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 117 KiB |
|
After Width: | Height: | Size: 101 KiB |
|
After Width: | Height: | Size: 138 KiB |
|
After Width: | Height: | Size: 118 KiB |
|
After Width: | Height: | Size: 199 KiB |
|
After Width: | Height: | Size: 117 KiB |
|
After Width: | Height: | Size: 153 KiB |
|
After Width: | Height: | Size: 142 KiB |
|
After Width: | Height: | Size: 138 KiB |
|
After Width: | Height: | Size: 45 KiB |
|
After Width: | Height: | Size: 75 KiB |
|
After Width: | Height: | Size: 78 KiB |
|
After Width: | Height: | Size: 75 KiB |
|
After Width: | Height: | Size: 83 KiB |
|
After Width: | Height: | Size: 79 KiB |
|
After Width: | Height: | Size: 84 KiB |
|
After Width: | Height: | Size: 78 KiB |
|
After Width: | Height: | Size: 83 KiB |
|
After Width: | Height: | Size: 83 KiB |
|
After Width: | Height: | Size: 137 KiB |
|
After Width: | Height: | Size: 140 KiB |
|
After Width: | Height: | Size: 117 KiB |
|
After Width: | Height: | Size: 140 KiB |
|
After Width: | Height: | Size: 163 KiB |
|
After Width: | Height: | Size: 75 KiB |
|
After Width: | Height: | Size: 81 KiB |
|
After Width: | Height: | Size: 75 KiB |
|
After Width: | Height: | Size: 76 KiB |
|
After Width: | Height: | Size: 72 KiB |
|
After Width: | Height: | Size: 74 KiB |
|
After Width: | Height: | Size: 73 KiB |
|
After Width: | Height: | Size: 73 KiB |
|
After Width: | Height: | Size: 73 KiB |
|
After Width: | Height: | Size: 73 KiB |
|
After Width: | Height: | Size: 75 KiB |
|
After Width: | Height: | Size: 65 KiB |
|
After Width: | Height: | Size: 65 KiB |
|
After Width: | Height: | Size: 77 KiB |
|
After Width: | Height: | Size: 77 KiB |
|
After Width: | Height: | Size: 163 KiB |
|
After Width: | Height: | Size: 121 KiB |
|
After Width: | Height: | Size: 121 KiB |
|
After Width: | Height: | Size: 127 KiB |
|
After Width: | Height: | Size: 81 KiB |
|
After Width: | Height: | Size: 85 KiB |
|
After Width: | Height: | Size: 72 KiB |
|
After Width: | Height: | Size: 99 KiB |
BIN
01-dashboard.png
|
Before Width: | Height: | Size: 241 KiB |
|
Before Width: | Height: | Size: 72 KiB |
|
Before Width: | Height: | Size: 208 KiB |
|
Before Width: | Height: | Size: 193 KiB |
|
Before Width: | Height: | Size: 98 KiB |
|
Before Width: | Height: | Size: 345 KiB |
|
Before Width: | Height: | Size: 157 KiB |
|
Before Width: | Height: | Size: 65 KiB |
|
Before Width: | Height: | Size: 381 KiB |
|
Before Width: | Height: | Size: 284 KiB |
|
Before Width: | Height: | Size: 77 KiB |
490
README.md
|
|
@ -1,305 +1,302 @@
|
|||
<p align="center">
|
||||
<img src="assets/TauricResearch.png" style="width: 60%; height: auto;">
|
||||
</p>
|
||||
|
||||
<div align="center" style="line-height: 1;">
|
||||
<a href="https://arxiv.org/abs/2412.20138" target="_blank"><img alt="arXiv" src="https://img.shields.io/badge/arXiv-2412.20138-B31B1B?logo=arxiv"/></a>
|
||||
<a href="https://discord.com/invite/hk9PGKShPK" target="_blank"><img alt="Discord" src="https://img.shields.io/badge/Discord-TradingResearch-7289da?logo=discord&logoColor=white&color=7289da"/></a>
|
||||
<a href="./assets/wechat.png" target="_blank"><img alt="WeChat" src="https://img.shields.io/badge/WeChat-TauricResearch-brightgreen?logo=wechat&logoColor=white"/></a>
|
||||
<a href="https://x.com/TauricResearch" target="_blank"><img alt="X Follow" src="https://img.shields.io/badge/X-TauricResearch-white?logo=x&logoColor=white"/></a>
|
||||
<br>
|
||||
<a href="https://github.com/TauricResearch/" target="_blank"><img alt="Community" src="https://img.shields.io/badge/Join_GitHub_Community-TauricResearch-14C290?logo=discourse"/></a>
|
||||
</div>
|
||||
|
||||
<div align="center">
|
||||
|
||||
<img src="assets/schema.png" width="120" alt="TradingAgents Logo" />
|
||||
|
||||
# TradingAgents
|
||||
|
||||
### Multi-Agent LLM Financial Trading Framework
|
||||
|
||||
[](https://arxiv.org/abs/2412.20138)
|
||||
[](https://www.python.org/)
|
||||
[](LICENSE)
|
||||
[](https://react.dev/)
|
||||
[](https://fastapi.tiangolo.com/)
|
||||
[](https://tailwindcss.com/)
|
||||
|
||||
<br />
|
||||
|
||||
An open-source framework that deploys **specialized AI agents** — analysts, researchers, traders, and risk managers — to collaboratively analyze markets and generate investment recommendations through structured debate.
|
||||
|
||||
<br />
|
||||
|
||||
[Getting Started](#getting-started) • [Web Dashboard](#nifty50-ai-web-dashboard) • [Python API](#python-api) • [Architecture](#architecture) • [Contributing](#contributing)
|
||||
|
||||
<br />
|
||||
|
||||
<!-- Keep these links. Translations will automatically update with the README. -->
|
||||
<a href="https://www.readme-i18n.com/TauricResearch/TradingAgents?lang=de">Deutsch</a> |
|
||||
<a href="https://www.readme-i18n.com/TauricResearch/TradingAgents?lang=es">Español</a> |
|
||||
<a href="https://www.readme-i18n.com/TauricResearch/TradingAgents?lang=fr">français</a> |
|
||||
<a href="https://www.readme-i18n.com/TauricResearch/TradingAgents?lang=ja">日本語</a> |
|
||||
<a href="https://www.readme-i18n.com/TauricResearch/TradingAgents?lang=ko">한국어</a> |
|
||||
<a href="https://www.readme-i18n.com/TauricResearch/TradingAgents?lang=pt">Português</a> |
|
||||
<a href="https://www.readme-i18n.com/TauricResearch/TradingAgents?lang=ru">Русский</a> |
|
||||
<a href="https://www.readme-i18n.com/TauricResearch/TradingAgents?lang=zh">中文</a>
|
||||
</div>
|
||||
|
||||
---
|
||||
|
||||
## Highlights
|
||||
# TradingAgents: Multi-Agents LLM Financial Trading Framework
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td width="50%">
|
||||
> 🎉 **TradingAgents** officially released! We have received numerous inquiries about the work, and we would like to express our thanks for the enthusiasm in our community.
|
||||
>
|
||||
> So we decided to fully open-source the framework. Looking forward to building impactful projects with you!
|
||||
|
||||
**Multi-Agent Collaboration** — Specialized AI agents (Technical, Fundamental, Sentiment, Risk) work together, each bringing domain expertise to stock analysis.
|
||||
<div align="center">
|
||||
<a href="https://www.star-history.com/#TauricResearch/TradingAgents&Date">
|
||||
<picture>
|
||||
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=TauricResearch/TradingAgents&type=Date&theme=dark" />
|
||||
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=TauricResearch/TradingAgents&type=Date" />
|
||||
<img alt="TradingAgents Star History" src="https://api.star-history.com/svg?repos=TauricResearch/TradingAgents&type=Date" style="width: 80%; height: auto;" />
|
||||
</picture>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
**Structured Debate System** — Bull and bear researchers debate findings, challenge assumptions, and reach consensus through reasoned discussion.
|
||||
<div align="center">
|
||||
|
||||
</td>
|
||||
<td width="50%">
|
||||
🚀 [TradingAgents](#tradingagents-framework) | ⚡ [Installation & CLI](#installation-and-cli) | 🎬 [Demo](https://www.youtube.com/watch?v=90gr5lwjIho) | 📦 [Package Usage](#tradingagents-package) | 🤝 [Contributing](#contributing) | 📄 [Citation](#citation)
|
||||
|
||||
**Real-Time Web Dashboard** — Production-grade React frontend with live analysis pipeline visualization, backtesting, and portfolio simulation.
|
||||
</div>
|
||||
|
||||
**Configurable & Extensible** — Swap LLM providers (OpenAI, Anthropic Claude), adjust debate rounds, configure data sources, and extend with custom agents.
|
||||
## TradingAgents Framework
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
TradingAgents is a multi-agent trading framework that mirrors the dynamics of real-world trading firms. By deploying specialized LLM-powered agents: from fundamental analysts, sentiment experts, and technical analysts, to trader, risk management team, the platform collaboratively evaluates market conditions and informs trading decisions. Moreover, these agents engage in dynamic discussions to pinpoint the optimal strategy.
|
||||
|
||||
---
|
||||
|
||||
## Screenshots
|
||||
|
||||
<details open>
|
||||
<summary><b>Dashboard — AI Recommendations at a Glance</b></summary>
|
||||
<br />
|
||||
<p align="center">
|
||||
<img src="frontend/docs/screenshots/01-dashboard.png" width="100%" alt="TradingAgents Dashboard showing all 50 Nifty stocks with AI-powered BUY, SELL, HOLD recommendations, rank badges, confidence levels, and decision filters" />
|
||||
<img src="assets/schema.png" style="width: 100%; height: auto;">
|
||||
</p>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><b>History — Backtesting & Portfolio Simulation</b></summary>
|
||||
<br />
|
||||
> TradingAgents framework is designed for research purposes. Trading performance may vary based on many factors, including the chosen backbone language models, model temperature, trading periods, the quality of data, and other non-deterministic factors. [It is not intended as financial, investment, or trading advice.](https://tauric.ai/disclaimer/)
|
||||
|
||||
Our framework decomposes complex trading tasks into specialized roles. This ensures the system achieves a robust, scalable approach to market analysis and decision-making.
|
||||
|
||||
### Analyst Team
|
||||
- Fundamentals Analyst: Evaluates company financials and performance metrics, identifying intrinsic values and potential red flags.
|
||||
- Sentiment Analyst: Analyzes social media and public sentiment using sentiment scoring algorithms to gauge short-term market mood.
|
||||
- News Analyst: Monitors global news and macroeconomic indicators, interpreting the impact of events on market conditions.
|
||||
- Technical Analyst: Utilizes technical indicators (like MACD and RSI) to detect trading patterns and forecast price movements.
|
||||
|
||||
<p align="center">
|
||||
<img src="frontend/docs/screenshots/10-history-page.png" width="100%" alt="Historical backtesting page with prediction accuracy tracking, Sharpe ratio, max drawdown, win rate, portfolio simulator with Zerodha brokerage, and AI vs Nifty50 index comparison chart" />
|
||||
<img src="assets/analyst.png" width="100%" style="display: inline-block; margin: 0 2%;">
|
||||
</p>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><b>Stock Detail — Deep Analysis View</b></summary>
|
||||
<br />
|
||||
### Researcher Team
|
||||
- Comprises both bullish and bearish researchers who critically assess the insights provided by the Analyst Team. Through structured debates, they balance potential gains against inherent risks.
|
||||
|
||||
<p align="center">
|
||||
<img src="frontend/docs/screenshots/03-stock-detail-overview.png" width="100%" alt="Individual stock analysis page showing AI recommendation with confidence level, risk assessment, recommendation history timeline, and detailed analysis summary" />
|
||||
<img src="assets/researcher.png" width="70%" style="display: inline-block; margin: 0 2%;">
|
||||
</p>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><b>Analysis Pipeline — 12-Step AI Decision Process</b></summary>
|
||||
<br />
|
||||
### Trader Agent
|
||||
- Composes reports from the analysts and researchers to make informed trading decisions. It determines the timing and magnitude of trades based on comprehensive market insights.
|
||||
|
||||
<p align="center">
|
||||
<img src="frontend/docs/screenshots/04-analysis-pipeline.png" width="100%" alt="12-step analysis pipeline visualization showing data collection, technical analysis, fundamental analysis, sentiment analysis, bull vs bear debate, and final trading decision" />
|
||||
<img src="assets/trader.png" width="70%" style="display: inline-block; margin: 0 2%;">
|
||||
</p>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><b>Investment Debates — Bull vs Bear AI Agents</b></summary>
|
||||
<br />
|
||||
### Risk Management and Portfolio Manager
|
||||
- Continuously evaluates portfolio risk by assessing market volatility, liquidity, and other risk factors. The risk management team evaluates and adjusts trading strategies, providing assessment reports to the Portfolio Manager for final decision.
|
||||
- The Portfolio Manager approves/rejects the transaction proposal. If approved, the order will be sent to the simulated exchange and executed.
|
||||
|
||||
<p align="center">
|
||||
<img src="frontend/docs/screenshots/05-debates-tab.png" width="100%" alt="AI-powered investment debate between bull and bear researcher agents with research manager synthesis and final judgment" />
|
||||
<img src="assets/risk.png" width="70%" style="display: inline-block; margin: 0 2%;">
|
||||
</p>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><b>Historical Date View — Ranked Stock Lists</b></summary>
|
||||
<br />
|
||||
<p align="center">
|
||||
<img src="frontend/docs/screenshots/11-history-stocks-expanded.png" width="100%" alt="History page with date cards showing buy/sell/hold breakdown, return percentages, and expanded ranked stock list with hold periods" />
|
||||
</p>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><b>How It Works — Multi-Agent AI System</b></summary>
|
||||
<br />
|
||||
<p align="center">
|
||||
<img src="frontend/docs/screenshots/09-how-it-works.png" width="100%" alt="Educational page explaining the multi-agent AI system architecture with agent role cards and structured debate process flow" />
|
||||
</p>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><b>Settings — Configurable AI Models</b></summary>
|
||||
<br />
|
||||
<p align="center">
|
||||
<img src="frontend/docs/screenshots/02-settings-modal.png" width="60%" alt="Settings panel for configuring LLM provider selection between Claude and OpenAI, model tier selection, API key management, and debate round configuration" />
|
||||
</p>
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><b>Dark Mode</b></summary>
|
||||
<br />
|
||||
<p align="center">
|
||||
<img src="frontend/docs/screenshots/08-dashboard-dark-mode.png" width="100%" alt="Dashboard in dark mode with glassmorphic card design, premium styling, and automatic system theme detection" />
|
||||
</p>
|
||||
</details>
|
||||
|
||||
---
|
||||
|
||||
## Architecture
|
||||
|
||||
TradingAgents mirrors the structure of real-world trading firms by decomposing complex trading tasks into specialized roles:
|
||||
|
||||
```
|
||||
+-------------------------------------+
|
||||
| Data Collection |
|
||||
| (Market, News, Social, Financials) |
|
||||
+-----------------+-------------------+
|
||||
|
|
||||
+-----------------v-------------------+
|
||||
| Analyst Team |
|
||||
| Technical | Fundamental | Sentiment |
|
||||
| | News | |
|
||||
+-----------------+-------------------+
|
||||
|
|
||||
+-----------------v-------------------+
|
||||
| Researcher Team |
|
||||
| Bull Researcher vs Bear Researcher |
|
||||
| (Structured AI Debate) |
|
||||
+-----------------+-------------------+
|
||||
|
|
||||
+-----------------v-------------------+
|
||||
| Trader Agent |
|
||||
| Synthesizes reports -> Decision |
|
||||
+-----------------+-------------------+
|
||||
|
|
||||
+-----------------v-------------------+
|
||||
| Risk Management & Portfolio Mgr |
|
||||
| Evaluates risk -> Approves/Rejects |
|
||||
+-------------------------------------+
|
||||
```
|
||||
|
||||
<details>
|
||||
<summary><b>Agent Details</b></summary>
|
||||
|
||||
| Agent | Role | Key Capabilities |
|
||||
|-------|------|------------------|
|
||||
| **Technical Analyst** | Chart & indicator analysis | RSI, MACD, Bollinger Bands, moving averages, volume patterns |
|
||||
| **Fundamental Analyst** | Financial evaluation | P/E ratios, earnings, debt analysis, intrinsic value |
|
||||
| **Sentiment Analyst** | Market mood assessment | Social media trends, analyst ratings, market psychology |
|
||||
| **News Analyst** | Event impact analysis | Macro indicators, breaking news, sector developments |
|
||||
| **Bull Researcher** | Bullish case builder | Identifies growth catalysts, upside potential |
|
||||
| **Bear Researcher** | Risk challenger | Highlights risks, valuation concerns, downside scenarios |
|
||||
| **Trader Agent** | Decision synthesis | Combines all reports into actionable BUY/SELL/HOLD |
|
||||
| **Risk Manager** | Portfolio protection | Volatility assessment, position sizing, drawdown limits |
|
||||
|
||||
</details>
|
||||
|
||||
---
|
||||
|
||||
## Getting Started
|
||||
|
||||
### Prerequisites
|
||||
|
||||
- Python 3.13+
|
||||
- Node.js 18+ (for web dashboard)
|
||||
- API keys: OpenAI or Anthropic Claude, [Alpha Vantage](https://www.alphavantage.co/support/#api-key) (free)
|
||||
## Installation and CLI
|
||||
|
||||
### Installation
|
||||
|
||||
Clone TradingAgents:
|
||||
```bash
|
||||
# Clone the repository
|
||||
git clone https://github.com/hemangjoshi37a/TradingAgents.git
|
||||
git clone https://github.com/TauricResearch/TradingAgents.git
|
||||
cd TradingAgents
|
||||
```
|
||||
|
||||
# Create virtual environment
|
||||
Create a virtual environment in any of your favorite environment managers:
|
||||
```bash
|
||||
conda create -n tradingagents python=3.13
|
||||
conda activate tradingagents
|
||||
```
|
||||
|
||||
# Install dependencies
|
||||
Install dependencies:
|
||||
```bash
|
||||
pip install -r requirements.txt
|
||||
```
|
||||
|
||||
### API Keys
|
||||
### Required APIs
|
||||
|
||||
You will need the OpenAI API for all the agents, and [Alpha Vantage API](https://www.alphavantage.co/support/#api-key) for fundamental and news data (default configuration).
|
||||
|
||||
```bash
|
||||
export OPENAI_API_KEY=your_openai_key
|
||||
export ALPHA_VANTAGE_API_KEY=your_alpha_vantage_key
|
||||
export OPENAI_API_KEY=$YOUR_OPENAI_API_KEY
|
||||
export ALPHA_VANTAGE_API_KEY=$YOUR_ALPHA_VANTAGE_API_KEY
|
||||
```
|
||||
|
||||
Or create a `.env` file from the template:
|
||||
Alternatively, you can create a `.env` file in the project root with your API keys (see `.env.example` for reference):
|
||||
```bash
|
||||
cp .env.example .env
|
||||
# Edit .env with your actual API keys
|
||||
```
|
||||
|
||||
> **Note:** Alpha Vantage provides a free API key with 60 requests/minute for TradingAgents-sourced requests. For offline experimentation, a local data vendor option is also available.
|
||||
**Note:** We are happy to partner with Alpha Vantage to provide robust API support for TradingAgents. You can get a free AlphaVantage API [here](https://www.alphavantage.co/support/#api-key), TradingAgents-sourced requests also have increased rate limits to 60 requests per minute with no daily limits. Typically the quota is sufficient for performing complex tasks with TradingAgents thanks to Alpha Vantage’s open-source support program. If you prefer to use OpenAI for these data sources instead, you can modify the data vendor settings in `tradingagents/default_config.py`.
|
||||
|
||||
### CLI Usage
|
||||
|
||||
You can also try out the CLI directly by running:
|
||||
```bash
|
||||
python -m cli.main
|
||||
```
|
||||
|
||||
Select your tickers, date, LLMs, and research depth from the interactive interface.
|
||||
You will see a screen where you can select your desired tickers, date, LLMs, research depth, etc.
|
||||
|
||||
<p align="center">
|
||||
<img src="assets/cli/cli_init.png" width="100%" alt="TradingAgents CLI interface showing ticker selection, date picker, and LLM configuration" />
|
||||
<img src="assets/cli/cli_init.png" width="100%" style="display: inline-block; margin: 0 2%;">
|
||||
</p>
|
||||
|
||||
An interface will appear showing results as they load, letting you track the agent's progress as it runs.
|
||||
|
||||
<p align="center">
|
||||
<img src="assets/cli/cli_news.png" width="100%" style="display: inline-block; margin: 0 2%;">
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<img src="assets/cli/cli_transaction.png" width="100%" style="display: inline-block; margin: 0 2%;">
|
||||
</p>
|
||||
|
||||
---
|
||||
|
||||
## Nifty50 AI Web Dashboard
|
||||
## 🌐 Nifty50 AI Trading Dashboard (Web Frontend)
|
||||
|
||||
A production-grade web dashboard built for **Indian Nifty 50 stocks** with full transparency into the multi-agent decision process.
|
||||
A modern, feature-rich web dashboard for TradingAgents, specifically built for **Indian Nifty 50 stocks**. This dashboard provides a complete visual interface for AI-powered stock analysis with full transparency into the multi-agent decision process.
|
||||
|
||||
### Quick Start
|
||||
### 🚀 Quick Start
|
||||
|
||||
```bash
|
||||
# Terminal 1: Start the backend
|
||||
# Start the backend server
|
||||
cd frontend/backend
|
||||
pip install -r requirements.txt
|
||||
python server.py # http://localhost:8001
|
||||
python server.py # Runs on http://localhost:8001
|
||||
|
||||
# Terminal 2: Start the frontend
|
||||
# Start the frontend (in a new terminal)
|
||||
cd frontend
|
||||
npm install
|
||||
npm run dev # http://localhost:5173
|
||||
npm run dev # Runs on http://localhost:5173
|
||||
```
|
||||
|
||||
### Features
|
||||
### ✨ Key Features
|
||||
|
||||
| Feature | Description |
|
||||
|---------|-------------|
|
||||
| **AI Recommendations** | BUY/SELL/HOLD decisions for all 50 Nifty stocks with confidence levels and risk ratings |
|
||||
| **Stock Ranking (1-50)** | Composite scoring algorithm ranks stocks from best to worst investment opportunity |
|
||||
| **Analysis Pipeline** | 12-step visualization showing data collection, agent analysis, debate, and decision |
|
||||
| **Investment Debates** | Full bull vs bear debate transcripts with research manager synthesis |
|
||||
| **Backtesting** | Prediction accuracy tracking, risk metrics (Sharpe, drawdown), win/loss ratios, date backtest runner with cancel support |
|
||||
| **Portfolio Simulator** | Paper trading simulation with Zerodha-accurate brokerage charges and Nifty50 benchmarking |
|
||||
| **Settings Panel** | Configure LLM provider (Claude/OpenAI), model tiers, debate rounds, parallel workers |
|
||||
| **Dark Mode** | Automatic system theme detection with manual toggle |
|
||||
#### Dashboard - AI Recommendations at a Glance
|
||||
View all 50 Nifty stocks with AI recommendations, top picks, stocks to avoid, and one-click bulk analysis.
|
||||
|
||||
### Tech Stack
|
||||
<p align="center">
|
||||
<img src="frontend/docs/screenshots/01-dashboard.png" width="100%" style="display: inline-block;">
|
||||
</p>
|
||||
|
||||
| Layer | Technology |
|
||||
|-------|-----------|
|
||||
| Frontend | React 18 + TypeScript, Vite, Tailwind CSS 4 |
|
||||
| Charts | Recharts |
|
||||
| Icons | Lucide React |
|
||||
| Backend | FastAPI (Python) |
|
||||
| Database | SQLite |
|
||||
| Fonts | DM Sans + Plus Jakarta Sans |
|
||||
#### 🌙 Dark Mode Support
|
||||
Full dark mode with automatic system theme detection for comfortable viewing.
|
||||
|
||||
### Project Structure
|
||||
<p align="center">
|
||||
<img src="frontend/docs/screenshots/08-dashboard-dark-mode.png" width="100%" style="display: inline-block;">
|
||||
</p>
|
||||
|
||||
#### ⚙️ Configurable Settings Panel
|
||||
Configure your AI analysis directly from the browser:
|
||||
- **LLM Provider**: Claude Subscription or Anthropic API
|
||||
- **Model Selection**: Choose Deep Think (Opus) and Quick Think (Sonnet/Haiku) models
|
||||
- **API Key Management**: Securely stored in browser localStorage
|
||||
- **Debate Rounds**: Adjust thoroughness (1-5 rounds)
|
||||
|
||||
<p align="center">
|
||||
<img src="frontend/docs/screenshots/02-settings-modal.png" width="60%" style="display: inline-block;">
|
||||
</p>
|
||||
|
||||
#### 📊 Stock Detail View
|
||||
Detailed analysis for each stock with interactive price charts, recommendation history, and AI analysis summaries.
|
||||
|
||||
<p align="center">
|
||||
<img src="frontend/docs/screenshots/03-stock-detail-overview.png" width="100%" style="display: inline-block;">
|
||||
</p>
|
||||
|
||||
#### 🔬 Analysis Pipeline Visualization
|
||||
See exactly how the AI reached its decision with a 9-step pipeline showing:
|
||||
- Data collection progress
|
||||
- Individual agent reports (Market, News, Social Media, Fundamentals)
|
||||
- Real-time status tracking
|
||||
|
||||
<p align="center">
|
||||
<img src="frontend/docs/screenshots/04-analysis-pipeline.png" width="100%" style="display: inline-block;">
|
||||
</p>
|
||||
|
||||
#### 💬 Investment Debates (Bull vs Bear)
|
||||
Watch AI agents debate investment decisions with full transparency:
|
||||
- **Bull Analyst**: Makes the case for buying
|
||||
- **Bear Analyst**: Presents risks and concerns
|
||||
- **Research Manager**: Weighs both sides and decides
|
||||
|
||||
<p align="center">
|
||||
<img src="frontend/docs/screenshots/05-debates-tab.png" width="100%" style="display: inline-block;">
|
||||
</p>
|
||||
|
||||
<details>
|
||||
<summary><b>📜 View Full Debate Example (Click to expand)</b></summary>
|
||||
<p align="center">
|
||||
<img src="frontend/docs/screenshots/06-investment-debate-expanded.png" width="100%" style="display: inline-block;">
|
||||
</p>
|
||||
</details>
|
||||
|
||||
#### 📈 Historical Analysis & Backtesting
|
||||
Track AI performance over time with comprehensive analytics:
|
||||
- Prediction accuracy metrics (Buy/Sell/Hold)
|
||||
- Risk metrics (Sharpe ratio, max drawdown, win rate)
|
||||
- Portfolio simulator with customizable starting amounts
|
||||
- AI Strategy vs Nifty50 Index comparison
|
||||
|
||||
<p align="center">
|
||||
<img src="frontend/docs/screenshots/10-history-page.png" width="100%" style="display: inline-block;">
|
||||
</p>
|
||||
|
||||
#### 📚 How It Works
|
||||
Educational content explaining the multi-agent AI system and decision process.
|
||||
|
||||
<p align="center">
|
||||
<img src="frontend/docs/screenshots/09-how-it-works.png" width="100%" style="display: inline-block;">
|
||||
</p>
|
||||
|
||||
### 🛠️ Frontend Tech Stack
|
||||
|
||||
| Technology | Purpose |
|
||||
|------------|---------|
|
||||
| React 18 + TypeScript | Core framework |
|
||||
| Vite | Build tool & dev server |
|
||||
| Tailwind CSS | Styling with dark mode |
|
||||
| Recharts | Interactive charts |
|
||||
| Lucide React | Icons |
|
||||
| FastAPI (Python) | Backend API |
|
||||
| SQLite | Data persistence |
|
||||
|
||||
### 📁 Frontend Project Structure
|
||||
|
||||
```
|
||||
frontend/
|
||||
├── src/
|
||||
│ ├── components/ # Reusable UI components
|
||||
│ │ ├── pipeline/ # Analysis pipeline visualization
|
||||
│ │ ├── StockCard.tsx # Stock cards with rank badges
|
||||
│ │ ├── TopPicks.tsx # Top picks & stocks to avoid
|
||||
│ │ └── Header.tsx # Navigation header
|
||||
│ ├── contexts/ # React contexts (Settings, Theme)
|
||||
│ ├── components/
|
||||
│ │ ├── pipeline/ # Pipeline visualization
|
||||
│ │ ├── SettingsModal.tsx # Settings UI
|
||||
│ │ └── Header.tsx
|
||||
│ ├── contexts/
|
||||
│ │ └── SettingsContext.tsx
|
||||
│ ├── pages/
|
||||
│ │ ├── Dashboard.tsx # Main stock grid with filters
|
||||
│ │ ├── StockDetail.tsx # Individual stock analysis
|
||||
│ │ ├── History.tsx # Backtesting & portfolio sim
|
||||
│ │ └── About.tsx # How it works
|
||||
│ ├── services/api.ts # API client
|
||||
│ └── types/index.ts # TypeScript type definitions
|
||||
│ │ ├── Dashboard.tsx
|
||||
│ │ ├── StockDetail.tsx
|
||||
│ │ ├── History.tsx
|
||||
│ │ └── About.tsx
|
||||
│ └── services/
|
||||
│ └── api.ts
|
||||
├── backend/
|
||||
│ ├── server.py # FastAPI server
|
||||
│ ├── database.py # SQLite operations & ranking
|
||||
│ └── backtest_service.py # Backtesting engine
|
||||
└── docs/screenshots/ # Documentation screenshots
|
||||
│ ├── server.py
|
||||
│ └── database.py
|
||||
└── docs/screenshots/
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Python API
|
||||
## TradingAgents Package
|
||||
|
||||
Use TradingAgents programmatically in your own projects:
|
||||
### Implementation Details
|
||||
|
||||
We built TradingAgents with LangGraph to ensure flexibility and modularity. We utilize `o1-preview` and `gpt-4o` as our deep thinking and fast thinking LLMs for our experiments. However, for testing purposes, we recommend you use `o4-mini` and `gpt-4.1-mini` to save on costs as our framework makes **lots of** API calls.
|
||||
|
||||
### Python Usage
|
||||
|
||||
To use TradingAgents inside your code, you can import the `tradingagents` module and initialize a `TradingAgentsGraph()` object. The `.propagate()` function will return a decision. You can run `main.py`, here's also a quick example:
|
||||
|
||||
```python
|
||||
from tradingagents.graph.trading_graph import TradingAgentsGraph
|
||||
|
|
@ -307,76 +304,59 @@ from tradingagents.default_config import DEFAULT_CONFIG
|
|||
|
||||
ta = TradingAgentsGraph(debug=True, config=DEFAULT_CONFIG.copy())
|
||||
|
||||
# Analyze a stock
|
||||
# forward propagate
|
||||
_, decision = ta.propagate("NVDA", "2024-05-10")
|
||||
print(decision)
|
||||
```
|
||||
|
||||
### Custom Configuration
|
||||
You can also adjust the default configuration to set your own choice of LLMs, debate rounds, etc.
|
||||
|
||||
```python
|
||||
from tradingagents.graph.trading_graph import TradingAgentsGraph
|
||||
from tradingagents.default_config import DEFAULT_CONFIG
|
||||
|
||||
# Create a custom config
|
||||
config = DEFAULT_CONFIG.copy()
|
||||
config["deep_think_llm"] = "gpt-4.1-nano"
|
||||
config["quick_think_llm"] = "gpt-4.1-nano"
|
||||
config["max_debate_rounds"] = 3
|
||||
config["deep_think_llm"] = "gpt-4.1-nano" # Use a different model
|
||||
config["quick_think_llm"] = "gpt-4.1-nano" # Use a different model
|
||||
config["max_debate_rounds"] = 1 # Increase debate rounds
|
||||
|
||||
# Configure data vendors (default uses yfinance and Alpha Vantage)
|
||||
config["data_vendors"] = {
|
||||
"core_stock_apis": "yfinance",
|
||||
"technical_indicators": "yfinance",
|
||||
"fundamental_data": "alpha_vantage",
|
||||
"news_data": "alpha_vantage",
|
||||
"core_stock_apis": "yfinance", # Options: yfinance, alpha_vantage, local
|
||||
"technical_indicators": "yfinance", # Options: yfinance, alpha_vantage, local
|
||||
"fundamental_data": "alpha_vantage", # Options: openai, alpha_vantage, local
|
||||
"news_data": "alpha_vantage", # Options: openai, alpha_vantage, google, local
|
||||
}
|
||||
|
||||
# Initialize with custom config
|
||||
ta = TradingAgentsGraph(debug=True, config=config)
|
||||
|
||||
# forward propagate
|
||||
_, decision = ta.propagate("NVDA", "2024-05-10")
|
||||
print(decision)
|
||||
```
|
||||
|
||||
See `tradingagents/default_config.py` for the full list of configuration options.
|
||||
> The default configuration uses yfinance for stock price and technical data, and Alpha Vantage for fundamental and news data. For production use or if you encounter rate limits, consider upgrading to [Alpha Vantage Premium](https://www.alphavantage.co/premium/) for more stable and reliable data access. For offline experimentation, there's a local data vendor option that uses our **Tauric TradingDB**, a curated dataset for backtesting, though this is still in development. We're currently refining this dataset and plan to release it soon alongside our upcoming projects. Stay tuned!
|
||||
|
||||
---
|
||||
You can view the full list of configurations in `tradingagents/default_config.py`.
|
||||
|
||||
## Contributing
|
||||
|
||||
We welcome contributions! Whether it's fixing a bug, improving documentation, or suggesting a new feature — your input helps make this project better.
|
||||
|
||||
1. Fork the repository
|
||||
2. Create a feature branch (`git checkout -b feature/your-feature`)
|
||||
3. Commit your changes
|
||||
4. Push to the branch and open a Pull Request
|
||||
|
||||
---
|
||||
|
||||
## Disclaimer
|
||||
|
||||
TradingAgents is designed for **research and educational purposes only**. Trading performance varies based on LLM selection, model temperature, data quality, and other non-deterministic factors. This software is **not financial, investment, or trading advice**. Always do your own research and consult a qualified financial advisor.
|
||||
|
||||
---
|
||||
We welcome contributions from the community! Whether it's fixing a bug, improving documentation, or suggesting a new feature, your input helps make this project better. If you are interested in this line of research, please consider joining our open-source financial AI research community [Tauric Research](https://tauric.ai/).
|
||||
|
||||
## Citation
|
||||
|
||||
If you find TradingAgents useful in your research, please cite:
|
||||
Please reference our work if you find *TradingAgents* provides you with some help :)
|
||||
|
||||
```bibtex
|
||||
```
|
||||
@misc{xiao2025tradingagentsmultiagentsllmfinancial,
|
||||
title={TradingAgents: Multi-Agents LLM Financial Trading Framework},
|
||||
title={TradingAgents: Multi-Agents LLM Financial Trading Framework},
|
||||
author={Yijia Xiao and Edward Sun and Di Luo and Wei Wang},
|
||||
year={2025},
|
||||
eprint={2412.20138},
|
||||
archivePrefix={arXiv},
|
||||
primaryClass={q-fin.TR},
|
||||
url={https://arxiv.org/abs/2412.20138},
|
||||
url={https://arxiv.org/abs/2412.20138},
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
<div align="center">
|
||||
|
||||
Built and maintained by **[hjlabs.in](https://hjlabs.in)**
|
||||
|
||||
<sub>Made with AI agents that actually debate before deciding.</sub>
|
||||
|
||||
</div>
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 66 KiB |
|
Before Width: | Height: | Size: 170 KiB |
|
Before Width: | Height: | Size: 66 KiB |
|
Before Width: | Height: | Size: 66 KiB |
|
Before Width: | Height: | Size: 61 KiB |
|
After Width: | Height: | Size: 62 KiB |
|
After Width: | Height: | Size: 216 KiB |
|
|
@ -196,7 +196,7 @@ def update_display(layout, spinner_text=None):
|
|||
layout["header"].update(
|
||||
Panel(
|
||||
"[bold green]Welcome to TradingAgents CLI[/bold green]\n"
|
||||
"[dim]© [hjlabs.in](https://hjlabs.in)[/dim]",
|
||||
"[dim]© [Tauric Research](https://github.com/TauricResearch)[/dim]",
|
||||
title="Welcome to TradingAgents",
|
||||
border_style="green",
|
||||
padding=(1, 2),
|
||||
|
|
@ -408,7 +408,7 @@ def get_user_selections():
|
|||
welcome_content += "[bold]Workflow Steps:[/bold]\n"
|
||||
welcome_content += "I. Analyst Team → II. Research Team → III. Trader → IV. Risk Management → V. Portfolio Management\n\n"
|
||||
welcome_content += (
|
||||
"[dim]Built by [hjlabs.in](https://hjlabs.in)[/dim]"
|
||||
"[dim]Built by [Tauric Research](https://github.com/TauricResearch)[/dim]"
|
||||
)
|
||||
|
||||
# Create and center the welcome box
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 64 KiB |
|
Before Width: | Height: | Size: 77 KiB |
|
Before Width: | Height: | Size: 72 KiB |
|
Before Width: | Height: | Size: 72 KiB |
|
Before Width: | Height: | Size: 249 KiB |
|
Before Width: | Height: | Size: 64 KiB |
|
Before Width: | Height: | Size: 70 KiB |
|
Before Width: | Height: | Size: 68 KiB |
|
Before Width: | Height: | Size: 76 KiB |
|
Before Width: | Height: | Size: 68 KiB |
|
Before Width: | Height: | Size: 57 KiB |
|
Before Width: | Height: | Size: 68 KiB |
|
Before Width: | Height: | Size: 65 KiB |
|
Before Width: | Height: | Size: 64 KiB |
|
Before Width: | Height: | Size: 63 KiB |
|
Before Width: | Height: | Size: 67 KiB |
|
Before Width: | Height: | Size: 45 KiB |