fix: 提升基本面报告数据完整性#735
Open
xiaodutou wants to merge 13 commits into
Open
Conversation
- 新增 TUSHARE_USE_CUSTOM_API / TUSHARE_API_URL 环境变量配置 - 新增 _custom_api_call() 方法,通过 HTTP POST 调用自定义 Tushare API - 所有数据接口(实时行情、历史K线、基本面等)优先走自定义API,不可用时降级到官方API - 清理代码中多余控制字符和冗余注释 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
feat: 添加 Tushare 自定义 API 支持,支持自定义 API 端点调用与自动降级
- 测试连接时优先检查 TUSHARE_USE_CUSTOM_API 环境变量 - 配置了自定义 API 时,测试请求走自定义端点而非官方 tushare.pro - 未配置自定义 API 时保持原有的官方 API 测试逻辑 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
fix: Tushare 测试连接支持自定义 API
…bug; add data quality gates for analysis pipeline - Fix tushare_adapter.py: _normalize_symbol → _normalize_ts_code, causing K-line API to return empty data for all A-share stocks (e.g. 601127) - Add data quality checks (data_quality.py) to terminate analysis when all data sources fail, preventing hangs in fundamentals/market/news analysts - Update conditional_logic.py, agent_states.py, research_manager.py to support data_all_failed flag for early termination - Remove dead custom API code paths from tushare_adapter.py Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…bug; add data quality gates for analysis pipeline - Fix tushare_adapter.py: _normalize_symbol → _normalize_ts_code, causing K-line API to return empty data for all A-share stocks (e.g. 601127) - Add data quality checks (data_quality.py) to terminate analysis when all data sources fail, preventing hangs in fundamentals/market/news analysts - Update conditional_logic.py, agent_states.py, research_manager.py to support data_all_failed flag for early termination - Remove dead custom API code paths from tushare_adapter.py Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
fix: K-line chart display + data quality gates for analysis pipeline
核心修复: 1. PB/PE 价格修复:当 MongoDB 不可用时,价格从默认值 10.0 降级为从 app cache (market_quotes) 获取真实股价,修复 PB=0.42x(应为 3.46x)的严重误判 2. 价格提取修复:_generate_fundamentals_report 增加对 "最新价格:" 格式的兜底提取, 兼容 get_china_stock_data_unified 返回的数据格式 3. 净利润单位修复:_extract_quarterly_financials 智能判断 AKShare 返回值的单位 (元 vs 万元),修复 61,054.53 亿元的单位转换错误 4. 全链路事实约束:在 9 个 agent(Fundamentals Analyst、Bull/Bear Researcher、 Research Manager、3 Debaters、Risk Manager、Trader)的 prompt 中注入 6 点 反编造事实约束,杜绝 LLM 编造财务数据、未来事件等 5. 前端空代码防护:Detail.vue、Favorites、Screening 增加空股票代码守卫, 消除 "股票代码不能为空" 错误提示 验证结果(第二次分析): - PB: 0.42x → 3.46x ✅ - PE: 23.3x → 190.8x ✅ - 净利润引用: 全部为正确的 7.54亿元 ✅ - 无编造未来事件 ✅ Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
echopoison0712
pushed a commit
to echopoison0712/TradingAgents-CN
that referenced
this pull request
Jun 8, 2026
* fix: restore schedule immediate-run compatibility * test: move config compatibility coverage * fix: preserve blank immediate-run semantics
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Generated with Claude Code