Compare commits

..

59 Commits

Author SHA1 Message Date
hemangjoshi37a e6dbd11ba1 Remove Tauric Research branding and improve README SEO/UX
- Delete TauricResearch.png and wechat.png assets
- Fix clone URL to point to hemangjoshi37a/TradingAgents
- Fix broken anchor links in README navigation
- Fix license badge (Apache 2.0, not MIT)
- Add Analysis Pipeline and Investment Debates screenshots
- Improve image alt texts for SEO
- Replace Unicode box-drawing chars with ASCII in architecture diagram
- Update package.json with keywords, author, correct URLs
- Update pyproject.toml description
- Update setup.py URL
- Refresh screenshots after dark mode theme fix
- Update .gitignore for Playwright and test artifacts
2026-02-14 14:32:21 +11:00
hemangjoshi37a 7619a7f9bb ok 2026-02-14 14:24:18 +11:00
hemangjoshi37a b79179cea2 okok 2026-02-11 01:37:36 +11:00
hemangjoshi37a 473478a32d ok 2026-02-08 22:24:13 +11:00
hemangjoshi37a a556099d97 add 2026-02-08 12:59:10 +11:00
hemangjoshi37a bdc27679fa add 2026-02-08 12:33:09 +11:00
hemangjoshi37a 86381157d8 Address PR review feedback from Gemini Code Assist
Fixes:
- Remove duplicate get_running_analyses function (critical)
- Fix N+1 query in get_pipeline_summary_for_date with batch queries (high)
- Add thread-safety warning comment for running_analyses dict (high)
- Remove package-lock.json from .gitignore and track it (high)
- Config param in memory.py kept for backward compatibility (documented)
2026-02-01 08:24:35 +11:00
hemangjoshi37a d9e71b74cd Add Nifty50 AI Frontend documentation with screenshots to main README
- Added comprehensive frontend section with 10 feature screenshots
- Documented all key features: Dashboard, Settings, Pipeline, Debates, History
- Included Quick Start guide and tech stack information
- Added project structure overview
2026-02-01 08:10:21 +11:00
hemangjoshi37a f87ce2495e add all 2026-02-01 08:05:09 +11:00
hemangjoshi37a d1e99c7db9 Add Settings UI, Analysis Pipeline visualization, and comprehensive documentation
Features:
- API key management with secure browser localStorage
- Model selection for Deep Think (Opus) and Quick Think (Sonnet/Haiku)
- Configurable max debate rounds (1-5)
- Full analysis pipeline visualization with 9-step progress tracking
- Agent reports display (Market, News, Social, Fundamentals analysts)
- Investment debate viewer (Bull vs Bear with Research Manager decision)
- Risk debate viewer (Aggressive vs Conservative vs Neutral)
- Data sources tracking panel
- Dark mode support throughout
- Bulk "Analyze All" functionality for all 50 stocks

Backend:
- Added analysis config parameters to API endpoints
- Support for provider/model selection in analysis requests
- Indian market data integration improvements

Documentation:
- Comprehensive README with 10 feature screenshots
- API endpoint documentation
- Project structure guide
- Getting started instructions
2026-02-01 08:01:53 +11:00
hemangjoshi37a 9a292cde34 ok 2026-02-01 06:55:15 +11:00
Hemang Joshi 92ff07a2b1 add 2026-01-31 18:44:53 +05:30
hemangjoshi37a e43acb8247 Add Nifty50 AI Trading Dashboard frontend and Indian market support
- Add React + Vite + Tailwind CSS frontend for Nifty50 recommendations
- Add FastAPI backend for serving stock recommendations
- Add Indian market data sources (jugaad_data, markets API)
- Add Nifty50 stock recommender modules
- Update dataflows for Indian market support
- Fix various utility and configuration updates
2026-01-31 19:41:01 +11:00
Edward Sun 7902d249ca Merge pull request #245 from TauricResearch/feat/tooloptim
Y Finance Tools Optimizations
2025-10-09 00:34:10 -07:00
Edward Sun fabdde86e0 updated readme 2025-10-09 00:32:04 -07:00
Edward Sun 1cea7e837a update readme 2025-10-06 20:33:12 -07:00
Edward Sun 37f3bf7c8d optimized yfin fetching to be much faster 2025-10-06 19:58:01 -07:00
Yijia Xiao 341d49f560 Merge pull request #235 from luohy15/data_vendor
Add Alpha Vantage API Integration and Refactor Data Provider Architecture
2025-10-05 16:01:30 -07:00
Edward Sun c0f0415844 added fallbacks for tools 2025-10-03 22:40:09 -07:00
luohy15 e7d8305a25 minor fix 2025-09-30 13:27:48 +08:00
luohy15 01a12c945f Switch default data vendor 2025-09-30 12:43:27 +08:00
luohy15 5b8a917fff alpha vantage api key url 2025-09-29 18:22:31 +08:00
luohy15 1949ac7d75 minor fix 2025-09-27 00:04:59 +08:00
luohy15 8a61fe0cac Add environment variable configuration support
- Add .env.example file with API key placeholders
- Update README.md with .env file setup instructions
- Add dotenv loading in main.py for environment variables
2025-09-26 23:58:51 +08:00
luohy15 26edb71254 Update configuration documentation for Alpha Vantage data vendor
Add data vendor configuration examples in README and main.py showing how to configure Alpha Vantage as the primary data provider. Update documentation to reflect the current default behavior of using Alpha Vantage for real-time market data access.
2025-09-26 23:52:26 +08:00
luohy15 3e902d58fc Improve Alpha Vantage indicator column parsing with robust mapping
- Replace hardcoded column indices with column name lookup
- Add mapping for all supported indicators to their expected CSV column names
- Handle missing columns gracefully with descriptive error messages
- Strip whitespace from header parsing for reliability
2025-09-26 23:36:36 +08:00
luohy15 a880216c98 minor fix 2025-09-26 23:25:33 +08:00
luohy15 d63c5dcd46 Add Alpha Vantage API integration as primary data provider
- Replace FinnHub with Alpha Vantage API in README documentation
- Implement comprehensive Alpha Vantage modules:
  - Stock data (daily OHLCV with date filtering)
  - Technical indicators (SMA, EMA, MACD, RSI, Bollinger Bands, ATR)
  - Fundamental data (overview, balance sheet, cashflow, income statement)
  - News and sentiment data with insider transactions
- Update news analyst tools to use ticker-based news search
- Integrate Alpha Vantage vendor methods into interface routing
- Maintain backward compatibility with existing vendor system
2025-09-26 22:57:50 +08:00
luohy15 b1d1496ec0 WIP 2025-09-26 16:17:50 +08:00
Yijia Xiao 7e0fca554f Merge pull request #89 from Mirza-Samad-Ahmed-Baig/fixes
Enhancement: agent reflection, logging improvement
2025-07-03 10:15:39 -04:00
Yijia Xiao cedde45285 Update main.py 2025-07-03 10:14:06 -04:00
mirza-samad-ahmed-baig 109941af43 Fix: Prevent infinite loops, enable reflection, and improve logging 2025-07-03 17:43:40 +05:00
Edward Sun 76fd2f5aea Merge pull request #49 from Zhongyi-Lu/a
Exclude `.env` from Git.
2025-07-01 09:17:46 -07:00
Yijia Xiao db73eafd6f Merge pull request #29 from ZeroAct/save_results
Save results
2025-06-26 00:28:30 -04:00
Max Wong fdea6c9d87 Local Ollama (#53)
- Fix typo 'Start' 'End'
- Add llama3.1 selection
- Use 'quick_think_llm' model instead of hard-coding GPT
2025-06-26 00:27:01 -04:00
Yijia Xiao 9b5dbc166b Revert "Docker support and Ollama support (#47)" (#57)
This reverts commit 78ea029a0b.
2025-06-26 00:07:58 -04:00
Geeta Chauhan a8c031fe64 Docker support and Ollama support (#47)
- Added support for running CLI and Ollama server via Docker
- Introduced tests for local embeddings model and standalone Docker setup
- Enabled conditional Ollama server launch via LLM_PROVIDER
2025-06-25 23:57:05 -04:00
Huijae Lee d75ab7cf2e Merge branch 'TauricResearch:main' into save_results 2025-06-25 08:43:19 +09:00
Yijia Xiao 51da620c40 Merge pull request #46 from AtharvSabde/patch-2
Updated requirements.txt based on latest commit
2025-06-23 20:40:58 -04:00
Yijia Xiao bbf0ab24df Merge pull request #52 from TauricResearch/dev
Merge dev into main. Add support for Anthropic and OpenRouter.
2025-06-23 20:38:14 -04:00
Zhongyi Lu caaf399232 Exclude `.env` from Git 2025-06-21 23:29:26 -07:00
Edward Sun d9431181d6 fixed anthropic support. Anthropic has different format of response when it has tool calls. Explicit handling added 2025-06-21 12:51:34 -07:00
Atharv Sabde f2b48c9c85 Updated requirements.txt based on latest commit
PULL REQUEST: Add support for other backends, such as OpenRouter and Ollama

it had two requirments missing. added those
2025-06-20 15:58:22 +05:30
Yijia Xiao adf529a895 Merge pull request #40 from RealMyth21/main
Updated README.md: Swap Trader and Management order.
2025-06-19 15:10:36 -04:00
Yijia Xiao aaf0eb6412 Merge pull request #43 from AtharvSabde/patch-1
fundamentals_analyst.py (spelling mistake in instruction: Makrdown -> Markdown)
2025-06-19 15:05:08 -04:00
Yijia Xiao ed66256aa3 Merge pull request #44 from TauricResearch/dev
Merge dev into main branch
2025-06-19 15:00:07 -04:00
Atharv Sabde 2d2b574327 fundamentals_analyst.py(spelling mistake.markdown) 2025-06-19 21:48:16 +05:30
Mithil Srungarapu 7e2715d045 Updated README.md
The diagrams were switched, so I fixed it.
2025-06-18 19:08:10 -07:00
Edward Sun 71c1e6d08e update clear msg bc anthropic needs at least 1 msg in chat call 2025-06-15 23:14:47 -07:00
Edward Sun a2dfee5996 main works, cli bugs 2025-06-15 22:20:59 -07:00
Edward Sun fc9b0d7247 Merge pull request #25 from maxer137/main
Add support for other backends, such as OpenRouter and Ollama
2025-06-15 16:06:20 -07:00
ZeroAct 4fd8378a2b refactor 2025-06-12 13:53:28 +09:00
saksham0161 dd422893cf Fix ticker hardcoding in prompt (#28) 2025-06-11 19:43:39 -07:00
ZeroAct 88f18d6500 save reports & logs under results_dir 2025-06-12 11:25:07 +09:00
maxer137 1781ec5075 Add support for other backends, such as OpenRouter and olama
This aims to offer alternative OpenAI capable api's.
This offers people to experiment with running the application locally
2025-06-11 14:19:25 +02:00
neo f7a5920e22 docs: add links to other language versions of README (#13)
Added language selection links to the README for easier access to translated versions: German, Spanish, French, Japanese, Korean, Portuguese, Russian, and Chinese.
2025-06-09 15:51:06 -07:00
Yijia-Xiao 887f5262fa Add star history 2025-06-09 15:14:41 -07:00
Edward Sun ff606dfb13 Fix default python usage config code 2025-06-08 13:16:10 -07:00
Edward Sun 8ea3c78dff Remove EODHD from readme 2025-06-07 15:04:43 -07:00
257 changed files with 11798 additions and 3066 deletions

10
.gitignore vendored
View File

@ -15,3 +15,13 @@ 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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 321 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 81 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 149 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 171 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 148 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 512 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 319 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 400 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 226 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 117 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 101 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 138 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 118 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 199 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 117 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 153 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 142 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 138 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 137 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 140 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 117 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 140 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 163 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 81 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 163 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 121 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 121 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 127 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 81 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 85 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 99 KiB

BIN
01-dashboard.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 241 KiB

BIN
02-settings-modal.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 208 KiB

BIN
04-analysis-pipeline.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 193 KiB

BIN
05-debates-tab.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 345 KiB

BIN
07-data-sources-tab.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 157 KiB

BIN
08-dashboard-dark-mode.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

BIN
09-how-it-works.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 381 KiB

BIN
10-history-page.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 284 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

584
README.md
View File

@ -1,302 +1,305 @@
<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">
<!-- 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>
<img src="assets/schema.png" width="120" alt="TradingAgents Logo" />
# TradingAgents
### Multi-Agent LLM Financial Trading Framework
[![arXiv](https://img.shields.io/badge/arXiv-2412.20138-B31B1B?logo=arxiv)](https://arxiv.org/abs/2412.20138)
[![Python 3.13+](https://img.shields.io/badge/Python-3.13+-3776AB?logo=python&logoColor=white)](https://www.python.org/)
[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](LICENSE)
[![React](https://img.shields.io/badge/React_18-TypeScript-61DAFB?logo=react&logoColor=white)](https://react.dev/)
[![FastAPI](https://img.shields.io/badge/FastAPI-Backend-009688?logo=fastapi&logoColor=white)](https://fastapi.tiangolo.com/)
[![Tailwind CSS](https://img.shields.io/badge/Tailwind_CSS-4.0-06B6D4?logo=tailwindcss&logoColor=white)](https://tailwindcss.com/)
<br />
An open-source framework that deploys **specialized AI agents** &mdash; analysts, researchers, traders, and risk managers &mdash; to collaboratively analyze markets and generate investment recommendations through structured debate.
<br />
[Getting Started](#getting-started) &nbsp;&bull;&nbsp; [Web Dashboard](#nifty50-ai-web-dashboard) &nbsp;&bull;&nbsp; [Python API](#python-api) &nbsp;&bull;&nbsp; [Architecture](#architecture) &nbsp;&bull;&nbsp; [Contributing](#contributing)
<br />
</div>
---
# TradingAgents: Multi-Agents LLM Financial Trading Framework
## Highlights
> 🎉 **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!
<table>
<tr>
<td width="50%">
<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>
**Multi-Agent Collaboration** &mdash; Specialized AI agents (Technical, Fundamental, Sentiment, Risk) work together, each bringing domain expertise to stock analysis.
<div align="center">
**Structured Debate System** &mdash; Bull and bear researchers debate findings, challenge assumptions, and reach consensus through reasoned discussion.
🚀 [TradingAgents](#tradingagents-framework) | ⚡ [Installation & CLI](#installation-and-cli) | 🎬 [Demo](https://www.youtube.com/watch?v=90gr5lwjIho) | 📦 [Package Usage](#tradingagents-package) | 🤝 [Contributing](#contributing) | 📄 [Citation](#citation)
</td>
<td width="50%">
</div>
**Real-Time Web Dashboard** &mdash; Production-grade React frontend with live analysis pipeline visualization, backtesting, and portfolio simulation.
## TradingAgents Framework
**Configurable & Extensible** &mdash; Swap LLM providers (OpenAI, Anthropic Claude), adjust debate rounds, configure data sources, and extend with custom agents.
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.
<p align="center">
<img src="assets/schema.png" style="width: 100%; height: auto;">
</p>
> 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="assets/analyst.png" width="100%" style="display: inline-block; margin: 0 2%;">
</p>
### 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="assets/researcher.png" width="70%" style="display: inline-block; margin: 0 2%;">
</p>
### 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="assets/trader.png" width="70%" style="display: inline-block; margin: 0 2%;">
</p>
### 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="assets/risk.png" width="70%" style="display: inline-block; margin: 0 2%;">
</p>
## Installation and CLI
### Installation
Clone TradingAgents:
```bash
git clone https://github.com/TauricResearch/TradingAgents.git
cd TradingAgents
```
Create a virtual environment in any of your favorite environment managers:
```bash
conda create -n tradingagents python=3.13
conda activate tradingagents
```
Install dependencies:
```bash
pip install -r requirements.txt
```
### 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_API_KEY
export ALPHA_VANTAGE_API_KEY=$YOUR_ALPHA_VANTAGE_API_KEY
```
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:** 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 Vantages 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
```
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%" 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>
</td>
</tr>
</table>
---
## 🌐 Nifty50 AI Trading Dashboard (Web Frontend)
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
```bash
# Start the backend server
cd frontend/backend
pip install -r requirements.txt
python server.py # Runs on http://localhost:8001
# Start the frontend (in a new terminal)
cd frontend
npm install
npm run dev # Runs on http://localhost:5173
```
### ✨ Key Features
#### Dashboard - AI Recommendations at a Glance
View all 50 Nifty stocks with AI recommendations, top picks, stocks to avoid, and one-click bulk analysis.
## Screenshots
<details open>
<summary><b>Dashboard &mdash; AI Recommendations at a Glance</b></summary>
<br />
<p align="center">
<img src="frontend/docs/screenshots/01-dashboard.png" width="100%" style="display: inline-block;">
</p>
#### 🌙 Dark Mode Support
Full dark mode with automatic system theme detection for comfortable viewing.
<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;">
<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" />
</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
<details>
<summary><b>History &mdash; Backtesting & Portfolio Simulation</b></summary>
<br />
<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" />
</p>
</details>
<details>
<summary><b>Stock Detail &mdash; Deep Analysis View</b></summary>
<br />
<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" />
</p>
</details>
<details>
<summary><b>Analysis Pipeline &mdash; 12-Step AI Decision Process</b></summary>
<br />
<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" />
</p>
</details>
<details>
<summary><b>Investment Debates &mdash; Bull vs Bear AI Agents</b></summary>
<br />
<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" />
</p>
</details>
<details>
<summary><b>Historical Date View &mdash; 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 &mdash; 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 &mdash; 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
```bash
# Clone the repository
git clone https://github.com/hemangjoshi37a/TradingAgents.git
cd TradingAgents
# Create virtual environment
conda create -n tradingagents python=3.13
conda activate tradingagents
# Install dependencies
pip install -r requirements.txt
```
### API Keys
```bash
export OPENAI_API_KEY=your_openai_key
export ALPHA_VANTAGE_API_KEY=your_alpha_vantage_key
```
Or create a `.env` file from the template:
```bash
cp .env.example .env
```
> **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.
### CLI Usage
```bash
python -m cli.main
```
Select your tickers, date, LLMs, and research depth from the interactive interface.
<p align="center">
<img src="frontend/docs/screenshots/10-history-page.png" width="100%" style="display: inline-block;">
<img src="assets/cli/cli_init.png" width="100%" alt="TradingAgents CLI interface showing ticker selection, date picker, and LLM configuration" />
</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>
## Nifty50 AI Web Dashboard
### 🛠️ Frontend Tech Stack
A production-grade web dashboard built for **Indian Nifty 50 stocks** with full transparency into the multi-agent decision process.
| 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 |
### Quick Start
### 📁 Frontend Project Structure
```bash
# Terminal 1: Start the backend
cd frontend/backend
pip install -r requirements.txt
python server.py # http://localhost:8001
# Terminal 2: Start the frontend
cd frontend
npm install
npm run dev # http://localhost:5173
```
### 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 |
### Tech Stack
| 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 |
### Project Structure
```
frontend/
├── src/
│ ├── components/
│ │ ├── pipeline/ # Pipeline visualization
│ │ ├── SettingsModal.tsx # Settings UI
│ │ └── Header.tsx
│ ├── contexts/
│ │ └── SettingsContext.tsx
│ ├── 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)
│ ├── pages/
│ │ ├── Dashboard.tsx
│ │ ├── StockDetail.tsx
│ │ ├── History.tsx
│ │ └── About.tsx
│ └── services/
│ └── api.ts
│ │ ├── 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
├── backend/
│ ├── server.py
│ └── database.py
└── docs/screenshots/
│ ├── server.py # FastAPI server
│ ├── database.py # SQLite operations & ranking
│ └── backtest_service.py # Backtesting engine
└── docs/screenshots/ # Documentation screenshots
```
---
## TradingAgents Package
## Python API
### 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:
Use TradingAgents programmatically in your own projects:
```python
from tradingagents.graph.trading_graph import TradingAgentsGraph
@ -304,59 +307,76 @@ from tradingagents.default_config import DEFAULT_CONFIG
ta = TradingAgentsGraph(debug=True, config=DEFAULT_CONFIG.copy())
# forward propagate
# Analyze a stock
_, decision = ta.propagate("NVDA", "2024-05-10")
print(decision)
```
You can also adjust the default configuration to set your own choice of LLMs, debate rounds, etc.
### Custom Configuration
```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" # Use a different model
config["quick_think_llm"] = "gpt-4.1-nano" # Use a different model
config["max_debate_rounds"] = 1 # Increase debate rounds
config["deep_think_llm"] = "gpt-4.1-nano"
config["quick_think_llm"] = "gpt-4.1-nano"
config["max_debate_rounds"] = 3
# Configure data vendors (default uses yfinance and Alpha Vantage)
config["data_vendors"] = {
"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
"core_stock_apis": "yfinance",
"technical_indicators": "yfinance",
"fundamental_data": "alpha_vantage",
"news_data": "alpha_vantage",
}
# Initialize with custom config
ta = TradingAgentsGraph(debug=True, config=config)
# forward propagate
_, decision = ta.propagate("NVDA", "2024-05-10")
print(decision)
```
> 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!
See `tradingagents/default_config.py` for the full list of configuration options.
You can view the full list of configurations in `tradingagents/default_config.py`.
---
## Contributing
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/).
We welcome contributions! Whether it's fixing a bug, improving documentation, or suggesting a new feature &mdash; 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.
---
## Citation
Please reference our work if you find *TradingAgents* provides you with some help :)
If you find TradingAgents useful in your research, please cite:
```
```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>

BIN
analysis-cancelled.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

BIN
analysis-live-fullpage.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 170 KiB

BIN
analysis-live-progress.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

BIN
analyze-all-skipped.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 216 KiB

View File

@ -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]© [Tauric Research](https://github.com/TauricResearch)[/dim]",
"[dim]© [hjlabs.in](https://hjlabs.in)[/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 [Tauric Research](https://github.com/TauricResearch)[/dim]"
"[dim]Built by [hjlabs.in](https://hjlabs.in)[/dim]"
)
# Create and center the welcome box

BIN
current-state.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

BIN
dashboard-hold-days.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

BIN
dashboard-polished-full.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 249 KiB

BIN
dashboard-polished.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

BIN
dashboard-ranking-grid.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

BIN
dashboard-ranking.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

BIN
data-source-raw-content.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

BIN
data-source-raw-viewer.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

BIN
data-sources-all.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

BIN
data-sources-fixed.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

BIN
debug-dark-after-fix.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

BIN
debug-light-after-fix.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

BIN
detail-drawer-bottom.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

BIN
detail-drawer-test.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Some files were not shown because too many files have changed in this diff Show More