Files
easy_tdx_max/docker-compose.yml
GitHub 917295edaf release: v1.27.0 — 通达信公式解析器三通道 + 轮动组合引擎 + 回测页WF/评估开关 + Docker 部署
升级计划 P3 + P4(部分)。全量 1252 单测、ruff/mypy strict、前端 vue-tsc+vite build 全绿。

- 通达信公式解析器(formula.py):自建 tokenizer + 递归下降 AST + 30+ 函数白名单求值
  (不走 Python eval);命名布尔输出=信号列、数值输出=排名列;除零→NaN、预热期不出信号
- 公式三通道:CLI easy-tdx formula compute|screen|backtest;REST /formula/validate|compute|
  backtest|screen(run/async);Python API run_formula_backtest(买/卖列自动挑选)
- 轮动组合引擎(rotation.py):排名定期换仓(打分只用截至当日数据)、槽位等额、
  跌出排名自动补位、日/周/月刷新、槽内止盈止损;momentum_score/formula_score 打分;
  REST /backtest/rotation/run/async
- 回测页附加分析开关(Web UI):勾选后随回测并行跑 WF(逐窗红涨绿跌柱状图+汇总卡,
  窗口数 2~12)与一条龙评估(评分分项条/高适配徽标/买入持有对比/8 项适配检查);
  新增 WalkForwardPanel/EvaluatePanel 组件与 store runWalkforward/runEvaluate;
  WF 端点 ?n_windows= 透传;修复报告 numpy 标量 REST 400(源头清洗)
- Docker 部署(Dockerfile + docker-compose.yml,/data 卷 + 健康检查)与
  scripts/verify_ci.sh 一键门禁
- 升级计划文档 docs/upgrade-plan-2026H2.md(四阶段全部完成 + 诚实实测数据)
- 未做(独立排期):Playwright E2E、WebSocket 实时联动、引擎逐 bar 向量化
2026-09-01 22:17:57 +08:00

36 lines
1.2 KiB
YAML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# easy-tdx 一键部署:API + Web UIDocker Composev1.27 新增)
#
# 用法:
# docker compose up -d # 构建并启动(http://localhost:8000
# docker compose logs -f easy-tdx
# docker compose down
#
# 说明:
# - 镜像内安装 [web,warehouse] 可选依赖(FastAPI + DuckDB);
# - 数据目录(自选/策略库/任务库/K线仓库)挂载到宿主机 ./data,重建容器不丢;
# - serve 默认 0.0.0.0:8000,自动托管 Web UI;纯 API 用法把 command 换成
# ["easy-tdx", "serve", "--host", "0.0.0.0", "--no-ui"]。
services:
easy-tdx:
image: easy-tdx:latest
build:
context: .
dockerfile: Dockerfile
container_name: easy-tdx
command: ["easy-tdx", "serve", "--host", "0.0.0.0", "--port", "8000", "--no-open-browser"]
ports:
- "8000:8000"
environment:
EASY_TDX_CONFIG_DIR: /data
TZ: Asia/Shanghai
volumes:
- ./data:/data
restart: unless-stopped
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request;urllib.request.urlopen('http://localhost:8000/openapi.json', timeout=5)"]
interval: 30s
timeout: 10s
retries: 3
start_period: 15s