feat: add A-share training and web controls - #1
Open
Altrouge7 wants to merge 1 commit into
Open
Conversation
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.
改动说明
本次 PR 为 AlphaMaster 增加了 A 股市场支持,并完善了训练设备选择、数据下载、训练参数配置和进度展示。
主要改动
1. 增加训练设备选择
CPU、CUDA和Auto三种训练设备。2. 增加市场类型选择
generic。a_share。3. 增加 A 股交易限制
A 股模式下新增以下约束:
4. 增加 A 股数据下载
002192。pytdx分页下载。5. 增加 Web 训练参数配置
Web 页面现在支持配置:
6. 支持自定义训练集和验证集划分
7. 调整最低数据量限制
数据量限制调整为:
1000 bars3000 bars具体行为:
1000 bars:拒绝训练。1000~2999 bars:允许训练,但显示样本偏少警告。3000 bars及以上:正常训练,不显示警告。8. 优化训练进度展示
未开始训练时显示:
训练开始后显示:
同时将原来的“进度”改为“训练进度”,避免把训练步数误认为数据 bars 数量。
测试情况
A 股交易规则、Walk-forward 划分和数据限制定向测试:26 passed
JavaScript 语法检查通过
Git 差异格式检查通过
完整单元测试结果:211 passed, 7 failed
完整测试中的 7 个失败来自仓库现有基线断言不一致,涉及算子数量、特征维度以及依赖系统时间的测试,与本次改动无直接关系。