Files
Chan/docs/ECR/ECR-004-wyckoff-harden.md
T
jackyu66gitandCursor ac6be80278 docs: 开启 ECR-004 威科夫硬化与 VP 减负(Draft)
跟进 ECR-003 Review Findings;待 Approve 后实现。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-06 18:35:25 +08:00

63 lines
2.2 KiB
Markdown
Raw 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.
# ECR-004
**Title:** 威科夫区间评分硬化与主站 VP 绘图减负
**Status:** Draft(待 Human/Architect Approve 后编码)
**Date:** 2026-08-06
**Change Level:** L2
## Change
跟进 ECR-003 CODE_REVIEW Findings:改进交易区间选取启发式、阶段最小长度、收紧单测;主站 VP/叠层降低 Lightweight series 数量;`include_wyckoff` 与主周期分析同门闩。
## Motivation
003 已 Approve 合入;质量与内存项不得回塞已审变更,须独立可审闭环。
## Scope
### Allowed
- `chanlun/analysis/wyckoff/range.py` / `events.py`(阶段)启发式与单测
- `web/static/js/app/chart_tv.js` 威科夫 VP/填充绘制路径
- `web/api/analyze.py``elements_only` 时不跑威科夫;可选调低默认 `vp_bins` 上限
- ESS 文档与契约测试补充断言(不删既有 `wyckoff` 键)
### Forbidden
- 改笔/段/中枢/买卖点语义
- `config/` / `strategies/`
- `/chan_tv`
- 新数据源 / 订单流
## Risk
| Risk | Mitigation |
|------|------------|
| TR 结果相对 003 漂移 | 合成夹具锁定高低与起点;文档标明启发式迭代 |
| 前端 VP 观感变化 | 保留 POC/VAH/VAL;密度可用更少线表示 |
| 回归 | 扩展 `tests/test_wyckoff.py` + 既有契约套件 |
## Acceptance Criteria
- [ ] 合成箱体夹具:`trading_range` 高低接近箱体边界,起点不落入明显前置趋势段
- [ ] 开启 VP 时主图新增 series 数显著低于「每 bin 一条」(目标:填充+VP ≤ ~15 或等价合并策略)
- [ ] 阶段输出满足最小跨度或合并退化段;文档说明规则
- [ ] `elements_only=true` 即使 `include_wyckoff=1` 也不返回 `wyckoff`(或明确文档例外——实现选前者)
- [ ] golden 缠论基线不变;相关 pytest 绿
- [ ] TEST/IMPL/CHANGELOG/TRACEABILITY + CODE_REVIEW
## Rollback
`git revert`UI 关威科夫即可无图面影响。
## Risk Review
- `docs/RISK_REVIEW/ECR-004.md` — N/A(展示/启发式,非 Live 策略)
## Linked
- IDEA: `docs/IDEA/IDEA-005-wyckoff-harden.md`
- 上游: `docs/CODE_REVIEW/ECR-003.md` Findings 15
- PRODUCT_SPEC / ENGINEERING_SPEC: 同目录 ECR-004-*
- TRACEABILITY: Yes