Commit Graph

68 Commits

Author SHA1 Message Date
liuping 61f2cbfdbf config: remove Chinese docs from .gitignore to include in version control
� .gitignore Update:
- Remove docs/zh-CN/ from .gitignore
- Allow Chinese documentation to be included in version control
- Keep tests/ directory excluded as intended

� Rationale:
Chinese documentation provides value to the global community
and should be available to all users, not just local development.
2025-07-06 02:54:19 +08:00
liuping 87f942d40c docs: add comprehensive Chinese documentation to version control
� Complete Chinese Documentation Suite:

� New Chinese Documents:
- docs/zh-CN/README.md - 中文版系统概览和快速开始
- docs/zh-CN/architecture_guide.md - 系统架构和技术实现详解
- docs/zh-CN/quick_start_guide.md - 5分钟快速设置和使用教程

� Enhanced Chinese Documents:
- docs/zh-CN/configuration_guide.md - 新功能配置详解
  - 百炼(DashScope)配置
  - 多市场支持配置
  - 数据库集成配置
  - API密钥需求说明

� Updated Main Documentation:
- docs/README.md - 更新版本控制策略,包含中文文档

� Key Features Covered:
- �� 中国A股市场支持 (通达信API)
- � 百炼(DashScope)大模型集成
- �️ 数据库集成 (MongoDB + Redis)
- � 多市场选择和配置
- � 智能缓存和回退机制

� Documentation Structure:
docs/
├── README.md (Updated)
├── en-US/ (English docs)
│   ├── configuration_guide.md
│   ├── architecture_guide.md
│   ├── quick_start_guide.md
│   ├── quick_reference.md
│   └── prompt_templates.md
└── zh-CN/ (Chinese docs)  Now in version control
    ├── README.md (New)
    ├── configuration_guide.md (Enhanced)
    ├── architecture_guide.md (New)
    ├── quick_start_guide.md (New)
    ├── quick_reference.md
    └── prompt_templates.md

� Bilingual Support Benefits:
- Comprehensive coverage for both international and Chinese users
- Localized examples and use cases
- Market-specific configuration guidance
- Cultural and technical context adaptation

Now both English and Chinese users have complete
documentation covering all system features and capabilities.
2025-07-06 02:53:30 +08:00
liuping 2933046060 docs: clarify DashScope API key requirements - only needed for Chinese stocks or Qwen models
� Important Clarification - DashScope API Key Requirements:

� Updated Documentation:
- docs/en-US/quick_start_guide.md
- docs/en-US/configuration_guide.md
- .env.example

� DashScope API Key is ONLY required when:
1. � Analyzing Chinese A-share stocks (uses TongDaXin data + DashScope embeddings)
2. � Choosing DashScope as LLM provider (Qwen models)

 For US Stock Analysis:
- OpenAI + FinnHub:  No DashScope needed
- Google AI + FinnHub:  No DashScope needed
- Anthropic + FinnHub:  No DashScope needed

 DashScope Required Cases:
- China A-Share + Any LLM:  DashScope needed (for embeddings)
- US Stock + DashScope LLM:  DashScope needed (for Qwen models)
- China A-Share + DashScope LLM:  DashScope needed (both reasons)

� Updated Configuration Examples:
- Example 1: US stocks with OpenAI (no DashScope)
- Example 2: US stocks with Google AI (no DashScope)
- Example 3: China A-shares (DashScope required)
- Example 4: US stocks with DashScope LLM (DashScope required)
- Example 5: Full features with database

� Key Benefits:
- Users can start with familiar LLM providers (OpenAI/Google)
- DashScope only needed for Chinese market features
- Clear separation of requirements by use case
- Reduced barrier to entry for US-only users

This clarification makes it easier for users to understand
exactly when they need which API keys based on their
specific use case and market focus.
2025-07-06 02:45:35 +08:00
liuping a7d68205af docs: translate .env.example comments from Chinese to English
� Environment Configuration Localization:
- Translate all Chinese comments to English
- Maintain same configuration structure and values
- Update project references from TradingAgents-CN to TradingAgents
- Add enhanced usage instructions and quick start guide

� Key Changes:
- Header: TradingAgents Environment Variables Configuration Example
- API Keys: Clear English descriptions for all providers
- Database: English explanations for MongoDB and Redis configuration
- Reddit API: English comments for social media integration
- Usage Instructions: Comprehensive English setup guide

� Enhanced Documentation:
- Added Quick Start Guide section
- Separate instructions for minimal vs full feature setup
- Clear step-by-step configuration process
- Docker commands for database setup
- Dependency installation instructions

Now .env.example provides clear English guidance for:
- International users and developers
- API key configuration and sources
- Database setup (optional)
- Quick start vs full feature deployment
- Testing and validation steps

This makes the project more accessible to global users
while maintaining all functionality and configuration options.
2025-07-06 02:29:36 +08:00
liuping 08dd78b42a docs: update Chinese merge documentation to match English version
� 中文合并文档全面更新:
- 与英文版本MERGE_DOCUMENTATION.md保持一致
- 详细记录所有5个主要集成功能
- 添加技术改进和向后兼容性说明
- 完整的已知问题和限制列表
- 详细的未完成功能和未来工作规划
- 全面的测试和验证状态
- 三种部署场景的详细建议
- 影响评估和总结

� 主要章节:
1.  成功集成的功能 (5个主要组件)
2. � 技术改进 (依赖管理、错误处理、兼容性)
3. ⚠️ 已知问题和限制 (3个识别的领域)
4. �� 未完成功能/未来工作 (5个增强领域)
5. � 测试和验证状态 (全面测试结果)
6. � 部署建议 (3种部署场景)
7. � 影响评估 (积极影响和考虑因素)

� 涵盖所有合并功能:
- 百炼(DashScope)大模型集成 
- 中国A股市场支持(通达信) 
- 高级数据库集成(MongoDB + Redis) 
- 增强的CLI市场选择 
- 智能缓存系统集成 

此文档为中文功能合并提供完整参考,
适用于开发者、用户和部署团队。
2025-07-06 02:27:05 +08:00
liuping 53a88c4d2f docs: add comprehensive merge documentation
� Complete Merge Documentation:
- Executive summary of all integrated features
- Detailed technical implementation details
- Configuration requirements and examples
- Testing status and validation results
- Known issues and limitations
- Future work and recommendations
- Deployment guidelines for different environments

� Key Sections:
1.  Successfully Integrated Features (5 major components)
2. � Technical Improvements (dependencies, error handling, compatibility)
3. ⚠️ Known Issues & Limitations (3 identified areas)
4. � Incomplete Features (5 future enhancement areas)
5. � Testing & Validation Status (comprehensive test results)
6. � Deployment Recommendations (3 deployment scenarios)
7. � Impact Assessment (positive impacts and considerations)

� Covers All Merged Features:
- DashScope (Alibaba Cloud) LLM Integration 
- China A-Share Market Support (TongDaXin) 
- Advanced Database Integration (MongoDB + Redis) 
- Enhanced CLI Market Selection 
- Intelligent Cache System Integration 

This documentation provides a complete reference for the
Chinese features merge, suitable for developers, users,
and deployment teams.
2025-07-06 02:22:38 +08:00
liuping e3811b6192 fix: resolve get_ticker function parameter mismatch error
� Problem Fixed:
- Remove duplicate get_ticker() function in main.py that had no parameters
- This function was overriding the correct get_ticker(market=None) from utils.py
- Caused TypeError: get_ticker() takes 0 positional arguments but 1 was given

 Solution:
- Delete old get_ticker() function from main.py (line 506-508)
- Keep only the correct get_ticker(market=None) function in utils.py
- Function now properly accepts market parameter for market-specific validation

� Test Results:
- Function signature: (market=None) -> str 
- Function location: cli/utils.py line 67 
- No import conflicts 
- CLI startup working 
- Market selection working 

Now users can successfully:
1. Select market (US Stock or China A-Share)
2. Enter ticker with market-specific validation
3. Continue with analysis workflow

The CLI now properly handles market selection and ticker input without parameter errors.
2025-07-06 02:18:15 +08:00
liuping 1c6b54a48e refactor: simplify market selection to English-only with US Stock and China A-Share
� Market Selection Simplification:
- Remove all Chinese text from CLI interface
- Remove Hong Kong Stock support (as requested)
- Keep only US Stock and China A-Share markets
- English-only error messages and validation

� Supported Markets:
1. US Stock
   - Examples: SPY, AAPL, TSLA, NVDA, MSFT
   - Format: 1-5 letter stock symbols
   - Data Source: Yahoo Finance
   - Pattern: ^[A-Z]{1,5}$

2. China A-Share
   - Examples: 000001, 600036, 300001, 688001
   - Format: 6-digit numeric codes
   - Data Source: TongDaXin API
   - Pattern: ^\d{6}$

� Technical Changes:
- Simplified market selection function
- Removed Chinese text from all user-facing messages
- Maintained TongDaXin integration for A-shares
- Kept format validation and data source routing
- English-only interface throughout

 Test Results:
- Market Selection:  Pass
- Supported Markets:  Pass (US + China A-Share only)
- Ticker Validation:  Pass (English messages)
- Data Source Routing:  Pass
- English-Only Interface:  Pass

� User Experience:
- Clean English-only interface
- Two clear market options
- Automatic format validation
- TongDaXin real-time data for A-shares
- No language barriers for international users

Supported Chinese Exchanges:
• Shanghai Stock Exchange: 60xxxx
• Shenzhen Stock Exchange: 00xxxx
• ChiNext Board: 30xxxx
• STAR Market: 68xxxx
2025-07-06 02:11:02 +08:00
liuping 1bbe898812 feat: integrate database cache into CLI startup logic
� Cache Integration Enhancements:
- Modify get_cache() to use IntegratedCacheManager by default
- Automatic fallback from database cache to file cache
- Intelligent cache selection based on configuration

� Integration Features:
- IntegratedCacheManager now used in CLI startup
- Supports both database and file-based caching
- Automatic detection of database availability
- Graceful degradation when databases unavailable

 Test Results:
- Cache selection logic:  Pass
- Cache functionality:  Pass
- Database cache available but disabled by default
- File cache working as fallback

� User Experience:
- Default: File-based cache (fast, no setup required)
- Optional: Database cache (enable with MONGODB_ENABLED=true)
- Seamless transition between cache types
- No breaking changes to existing functionality

� Current Status:
- Cache Type: IntegratedCacheManager
- Adaptive Cache: Disabled (databases disabled in .env)
- MongoDB: Disabled by default
- Redis: Disabled by default
- Fallback: Traditional file cache working perfectly

Now users get database cache benefits when enabled,
with automatic fallback to reliable file cache.
2025-07-06 01:52:50 +08:00
liuping 8acf6feec0 fix: resolve DashScope embedding 404 error and add CLI model options
� Fixed Issues:
- Resolve 404 error when using DashScope LLM with OpenAI embeddings
- Add missing DashScope model options in CLI selection
- Improve embedding provider fallback logic

� Memory System Updates:
- Add DashScope embedding support (text-embedding-v3)
- Implement intelligent fallback: DashScope → OpenAI → Error
- Add proper API key validation and error messages
- Support multiple embedding providers based on LLM selection

� CLI Enhancements:
- Add DashScope models to SHALLOW_AGENT_OPTIONS and DEEP_AGENT_OPTIONS
- Support qwen-turbo, qwen-plus, qwen-max, qwen-max-longcontext
- Fix KeyError when selecting DashScope as LLM provider

 Test Results:
- All .env configuration tests pass
- DashScope embeddings working correctly
- Proper fallback to OpenAI when DashScope unavailable
- Memory initialization successful with real API keys

� Now users can successfully:
1. Select DashScope in CLI without errors
2. Use DashScope embeddings for memory system
3. Automatic fallback if DashScope unavailable
4. Complete end-to-end DashScope workflow
2025-07-06 01:43:13 +08:00
liuping eba4e1f7ec fix: improve DashScope integration and fix import paths
- Fix DashScope adapter import path in trading_graph.py
- Improve error handling for DashScope initialization
- Add comprehensive DashScope integration testing
- Verify all DashScope components work correctly

Integration test results:
 DashScope adapter import successful
 TradingAgentsGraph import with DashScope support
 CLI utils include DashScope option (first choice)
 DashScope configuration creation
 DashScope LLM instances creation

DashScope is now fully integrated and ready for use:
- Available in CLI as 'DashScope (Alibaba Cloud)'
- Supports qwen-turbo, qwen-plus, qwen-max models
- Proper error handling for missing API keys
- Complete documentation and examples
2025-07-06 01:20:25 +08:00
liuping cdba5bf780 feat: add DashScope (Alibaba Cloud) LLM provider support
- Add DashScope to CLI LLM provider selection (first option)
- Add DashScope support in TradingAgentsGraph with proper error handling
- Import ChatDashScope adapter with fallback for missing dependencies
- Update default_config.py with DashScope configuration comments
- Create comprehensive DashScope configuration example

Features added:
- DashScope provider selection in CLI (cli/utils.py)
- LLM initialization for DashScope models (trading_graph.py)
- Configuration validation and testing (examples/dashscope_config_example.py)
- Support for qwen-turbo, qwen-plus, qwen-max models
- Proper error handling for missing dashscope package

Usage:
1. Install: pip install dashscope
2. Configure: DASHSCOPE_API_KEY in .env file
3. Select 'DashScope (Alibaba Cloud)' in CLI
4. Use models: qwen-turbo (fast), qwen-plus (balanced), qwen-max (best)

This enables Chinese users to use Alibaba Cloud's Qwen models
for financial analysis with optimized Chinese language support.
2025-07-06 01:15:35 +08:00
liuping 114f7f0618 feat: add environment configuration files
- Add .env.example with comprehensive configuration template
- Add .env with sanitized default values (no real API keys)
- Based on Chinese version configuration with English comments
- Includes all necessary API configurations:
  * DashScope (Chinese LLM)
  * Finnhub (Financial data)
  * OpenAI, Google AI, Anthropic (Optional LLMs)
  * Reddit API (Social sentiment)
  * MongoDB and Redis (Database/Cache)

Configuration features:
- Clear instructions for each API key
- Database enable/disable switches
- Comprehensive comments and usage guide
- Security warnings about sensitive data

Usage:
1. Copy .env.example to .env
2. Fill in actual API keys
3. Configure at minimum: DASHSCOPE_API_KEY and FINNHUB_API_KEY
4. Run: python main.py
2025-07-06 01:05:59 +08:00
liuping 1f292d5ab1 feat: merge requirements.txt and add optional dependencies
- Add 5 new dependencies from Chinese version:
  * dashscope - Alibaba Cloud LLM support
  * streamlit - Web app framework
  * plotly - Interactive plotting
  * pytdx - TongDaXin API for Chinese stock data
  * pymongo - MongoDB database support

- Create requirements-optional.txt for optional dependencies
- Update pyproject.toml with optional dependency groups:
  * chinese: pytdx, dashscope
  * database: pymongo
  * visualization: streamlit, plotly
  * development: pytest, black, flake8
  * all: includes all optional dependencies

Installation options:
- Basic: pip install -r requirements.txt
- With Chinese support: pip install .[chinese]
- With all features: pip install .[all]
2025-07-06 00:50:20 +08:00
liuping 1cbdd4c76b chore: remove temporary merge script 2025-07-06 00:28:42 +08:00
liuping 0de847601e feat: merge Chinese version features
- Add 18 new feature files from Chinese version
- Support for Chinese market data (A-shares)
- Database integration with MongoDB
- Advanced caching system with adaptive strategies
- LLM adapters for DashScope and other providers
- API services and real-time data utilities
- Enhanced configuration management
- Comprehensive English documentation

New features:
- Chinese finance data aggregation
- TDX (TongDaXin) API integration
- Optimized China stock data provider
- Adaptive and integrated caching
- Database cache management
- Stock data services
- Real-time news utilities

Breaking changes: None (all new features are additive)
Dependencies: Added pymongo, beautifulsoup4, dashscope (optional)

For detailed information, see MERGE_SUMMARY.md
2025-07-06 00:26:49 +08:00
Yijia Xiao a438acdbbd
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 c73e374e7c
Update main.py 2025-07-03 10:14:06 -04:00
mirza-samad-ahmed-baig f704828f89 Fix: Prevent infinite loops, enable reflection, and improve logging 2025-07-03 17:43:40 +05:00
Edward Sun fda4f664e8
Merge pull request #49 from Zhongyi-Lu/a
Exclude `.env` from Git.
2025-07-01 09:17:46 -07:00
Yijia Xiao 718df34932
Merge pull request #29 from ZeroAct/save_results
Save results
2025-06-26 00:28:30 -04:00
Max Wong 43aa9c5d09
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 26c5ba5a78
Revert "Docker support and Ollama support (#47)" (#57)
This reverts commit 78ea029a0b.
2025-06-26 00:07:58 -04:00
Geeta Chauhan 78ea029a0b
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 ee3d499894
Merge branch 'TauricResearch:main' into save_results 2025-06-25 08:43:19 +09:00
Yijia Xiao 7abff0f354
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 b575bd0941
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 b8f712b170 Exclude `.env` from Git 2025-06-21 23:29:26 -07:00
Edward Sun 52284ce13c 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 11804f88ff
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 1e86e74314
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 c2f897fc67
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 ed32081f57
Merge pull request #44 from TauricResearch/dev
Merge dev into main branch
2025-06-19 15:00:07 -04:00
Atharv Sabde 2af7ef3d79
fundamentals_analyst.py(spelling mistake.markdown) 2025-06-19 21:48:16 +05:30
Mithil Srungarapu 383deb72aa
Updated README.md
The diagrams were switched, so I fixed it.
2025-06-18 19:08:10 -07:00
Edward Sun 7eaf4d995f update clear msg bc anthropic needs at least 1 msg in chat call 2025-06-15 23:14:47 -07:00
Edward Sun da84ef43aa main works, cli bugs 2025-06-15 22:20:59 -07:00
Edward Sun 90b23e72f5
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 417b09712c refactor 2025-06-12 13:53:28 +09:00
saksham0161 570644d939
Fix ticker hardcoding in prompt (#28) 2025-06-11 19:43:39 -07:00
ZeroAct 9647359246 save reports & logs under results_dir 2025-06-12 11:25:07 +09:00
maxer137 99789f9cd1 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 a879868396
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 0013415378 Add star history 2025-06-09 15:14:41 -07:00
Edward Sun 0fdfd35867
Fix default python usage config code 2025-06-08 13:16:10 -07:00
Edward Sun e994e56c23
Remove EODHD from readme 2025-06-07 15:04:43 -07:00
Yijia-Xiao 47176ba8a2 chore(release): v0.1.1 – TradingAgents cleaned release 2025-06-07 12:17:58 -07:00
Edward Sun 5f1c9c43cf removed static site 2025-06-05 11:14:05 -07:00
Yijia-Xiao cc97cb6d5d chore(release): v0.1.0 – initial public release of TradingAgents 2025-06-05 04:27:57 -07:00
Yijia-Xiao 635e91ac75 Schema upload 2025-02-02 12:53:37 -08:00