Commit Graph
8 Commits
Author SHA1 Message Date
shy3130 8fe5dac7bd feat(v0.2): 完善量化研究与二次开发能力 2026-08-13 20:16:02 +08:00
shy3130 e462c63b45 fix: align AI strategy prompt constraints 2026-07-18 18:31:02 +08:00
shy3130 44ab51e65d feat: improve strategy scoring and backtest execution 2026-07-18 16:59:53 +08:00
lytem28 b6cf0495e1 feat: complete matrix-native backtest engine
Unify strategy execution across backtest, screener, and monitoring; isolate backtest workloads in spawn workers; and add shared matrix caching plus valid-bar indicator acceleration.
2026-07-16 12:17:27 +08:00
wshyandshy3130 2f762b3bcc fix(strategy): import 白名单加 datetime + date 参数处理补进文档 (#123)
问题: ai_single_yang_unbroken 策略用 from datetime import date 做
date 类型参数转换, 被安全修复的 import 白名单(只允许 polars)拦截,
策略加载失败消失。同时 date 列(Polars Date)与字符串参数直接比较
报 InvalidOperationError 导致 500。

修复:
- ai_generator.py: import 白名单加入 datetime (纯日期运算, 无文件/
  网络/进程能力, 安全)。验证 os/sys/subprocess 仍被拦。
- strategy-guide.md: params type 补全(float/int/bool/select/date);
  filter_history 要点新增 date 参数必须 fromisoformat 转换的代码示例
- strategy-guide-compact.md: 同步补充 (AI 运行时实际用的文档)

从源头避免 AI 生成的 date 类型参数策略再犯字符串 vs Date 列比较错误。

Co-authored-by: shy3130 <shy3130@users.noreply.github.com>
2026-07-14 21:47:26 +08:00
shy3130 fbcfd31d6a feat: 优化策略创建流程 2026-07-08 22:17:11 +08:00
shy3130 7c51bf5054 refactor(docs): 策略提示词文档统一归入 prompts/,docs/ 专放使用指南
将 4 个策略运行时文档(strategy-guide/step1/step2/example)从 docs/
迁至 backend/app/strategy/prompts/,与运行时加载路径一致;docs/
回归「项目使用指南与配置说明」定位。

- prompts/ 现自包含 4 个 md,guide 内对 example 的相对链接可正确解析
- 更新 README 与前端 StrategyBuilderDialog 的引用路径
- docs/ 保留 deploy-password.md / screenshots / zhihu 等面向人类的文档

承接 #41 Docker 文档缺失修复
2026-07-03 11:03:24 +08:00
shy3130 56276384e5 fix(strategy): 修复 Docker 镜像中 AI 策略提示词文档缺失
将运行时依赖的 3 个提示词文档(strategy-guide.md / step1 / step2)
从 docs/ 复制到 backend/app/strategy/prompts/,使其随 COPY backend/app
自动进入镜像;并将 GUIDE_PATH/_DOCS_DIR 改为相对当前文件的 prompts/,
路径在开发环境与 Docker 容器中解析一致。

修复 #41
2026-07-03 09:51:30 +08:00