TradingAgents-CN 是一个基于多智能体大语言模型的投资分析框架,能够为您提供专业的股票分析报告。
确保您已经配置了必要的API密钥:
# 检查配置状态
python -m cli.main config
# 运行集成测试
python -m cli.main test
# 启动Web界面
python -m streamlit run web/app.py
然后在浏览器中访问 http://localhost:8501
优点:
详细使用说明: 请参考 Web界面使用指南
# 中文优化版本(推荐)
python examples/dashscope/demo_dashscope_chinese.py
# 完整功能版本
python examples/dashscope/demo_dashscope.py
# 简化测试版本
python examples/dashscope/demo_dashscope_simple.py
优点:
您可以通过修改示例程序来自定义分析:
# 在 demo_dashscope_chinese.py 中修改
STOCK_SYMBOL = "TSLA" # 改为您想分析的股票
ANALYSIS_DATE = "2024-06-26" # 修改分析日期
# 在配置中选择不同的模型
"deep_think_llm": "qwen-max", # 最高质量,适合深度分析
"quick_think_llm": "qwen-plus", # 平衡性能,日常使用
# "qwen-turbo" 适合快速查询
# 修改分析日期来分析历史表现
ANALYSIS_DATE = "2024-01-01" # 年初分析
ANALYSIS_DATE = "2024-06-01" # 半年度分析
您可以在提示词中强调特定分析方向:
# 查看帮助信息
python -m cli.main help
# 查看示例程序
python -m cli.main examples
您可以修改程序来分析多只股票:
stocks = ["AAPL", "MSFT", "GOOGL", "TSLA"]
for stock in stocks:
# 运行分析逻辑
analyze_stock(stock)
设置定时任务来定期生成分析报告:
# 使用cron或Windows任务计划程序
# 每日运行分析
0 9 * * * python examples/dashscope/demo_dashscope_chinese.py
免责声明: 本工具仅用于教育和研究目的,不构成投资建议。投资有风险,决策需谨慎。