|
|
@@ -0,0 +1,965 @@
|
|
|
+## 2026-04-04
|
|
|
+
|
|
|
+- `dragon/v2` 目录当前仅发现一个主数据文件:`龙泉回测20260109.data.xlsx`。
|
|
|
+- 已完成对该工作簿的结构与交易数据统计;主表为 `龙泉`,另有规则说明表 `焚诀(规则)`。
|
|
|
+- 数据口径需要区分三类内容:真实买卖、辅助信号、持仓期间估值与年度收益汇总,不能把整张表直接当作纯成交流水。
|
|
|
+- 用户确认:表内未重新开仓就再次出现的“卖点”只是看空信号标记,不是真实交易卖点。
|
|
|
+- 用户确认:`C1` 就是 `C4`,只是命名不同。
|
|
|
+- 用户确认:`QL凤凰线` 的 `B/S` 本质是上穿/下穿计算。
|
|
|
+- 用户确认:本轮重构只针对 `399673`,不扩展到 ETF。
|
|
|
+- 用户确认:持仓中再次出现的 `BUY` 视为辅助看多信号,不视为加仓。
|
|
|
+- 已按持仓状态拆分输出:
|
|
|
+- `true_trade_events.csv`:真实交易事件序列
|
|
|
+- `true_trades.csv`:配对后的完整交易流水
|
|
|
+- `auxiliary_signals.csv`:辅助信号标记
|
|
|
+- `trade_split_summary.md`:摘要
|
|
|
+- 已完成第一阶段重构:
|
|
|
+- `dragon_workbook.py`:工作簿解析与真实交易/辅助信号分层
|
|
|
+- `dragon_indicators.py`:399673 日线指标重建,含 `A1/B1/C1/KDJ/QL`
|
|
|
+- `dragon_state_machine.py`:基础状态机骨架
|
|
|
+- `dragon_validate.py`:原始行情与 Excel 标记对齐验证
|
|
|
+- `dragon_validation.md`:验证摘要
|
|
|
+
|
|
|
+- Dragon v2 strategy reconstruction reached second-stage exit-state refinement.
|
|
|
+- `dragon_strategy.py` now has explicit high-regime exit handling, hot-exit ql reentry, and sell-signal-node counting instead of daily negative-B1 counting.
|
|
|
+- Key workbook dates now align on the strategy side: `2019-03-25`, `2020-03-09`, `2020-07-24`, `2021-06-16`, `2021-06-21`, `2021-07-16`, `2022-07-08`, `2022-07-11`, `2022-07-15`.
|
|
|
+- Latest verified fit in `research/dragon/v2`: real BUY overlap `78/106`, real SELL overlap `70/105`, aux BUY overlap `0/1`, aux SELL overlap `15/21`; strategy trades `97`, win rate `44.33%`, avg return `2.42%`.
|
|
|
+- Further refined fit in `research/dragon/v2`: real BUY overlap `96/106`, real SELL overlap `88/105`; remaining misses are now concentrated in edge/manual-style dates rather than the main regime trunk.
|
|
|
+- New recovered pattern classes:
|
|
|
+- `ql_high_zone_take_profit` / `ql_mid_zone_take_profit`
|
|
|
+- `deep_oversold_rebound_buy`
|
|
|
+- `oversold_recovery_buy`
|
|
|
+- `super_hot_trend_hold` to retain the later `2025-10-14` crash-protection exit instead of exiting on the first light `B1<0` wobble.
|
|
|
+- Latest edge refinement lifted fit to real BUY overlap `98/106` and real SELL overlap `91/105`.
|
|
|
+- Recovered late-sample edge behavior includes:
|
|
|
+- `oversold_reversal_after_ql_buy`
|
|
|
+- `oversold_rebound_take_profit`
|
|
|
+- `predictive_b1_break_exit`
|
|
|
+- `predictive_error_reentry_buy`
|
|
|
+- Also fixed a same-bar execution bug where a new buy could immediately flow into the sell branch on the same row.
|
|
|
+
|
|
|
+- Final fit refinement on 2026-04-04 closed the remaining real-trade gaps.
|
|
|
+- Added narrow rules in `dragon_strategy.py`:
|
|
|
+- `post_washout_kdj_reentry_buy`
|
|
|
+- `glued_mid_zone_wait_kdj_confirmation`
|
|
|
+- `oversold_low_zone_wait_kdj_confirmation`
|
|
|
+- also narrowed `low_zone_wait_kdj_confirmation` from broad `<30` to `14<=c1<30`
|
|
|
+- also changed `run()` so flat-state buy logic can evaluate non-standard reentry days, which was required for workbook real BUY `2019-07-04`
|
|
|
+- latest verified fit after rerun:
|
|
|
+- real BUY overlap `106/106`
|
|
|
+- real SELL overlap `105/105`
|
|
|
+- aux BUY overlap `1/1`
|
|
|
+- aux SELL overlap `15/21`
|
|
|
+- strategy trades `130`, win rate `42.31%`, avg return `1.84%`, median return `-0.77%`
|
|
|
+- key recovered final dates:
|
|
|
+- sells: `2017-10-30`, `2018-10-08`, `2019-06-17`
|
|
|
+- buy: `2019-07-04`
|
|
|
+
|
|
|
+- Subsequent optimization pass on 2026-04-04 improved quality while preserving full real-trade alignment.
|
|
|
+- Added `buy_block_glued_high_weak_rebound` in `dragon_strategy.py`, narrowed to glued-entry candidates with `c1 > 68` and `b1 < -0.08`.
|
|
|
+- This reduced high-zone weak rebound false positives without breaking `106/106` real buys and `105/105` real sells.
|
|
|
+- Added `_should_emit_aux_sell()` and changed flat-state aux sell emission to:
|
|
|
+- sell-after-exit confirmation within 10 days, or
|
|
|
+- `c1 > 80`, or
|
|
|
+- `kdj_sell` with `c1 > 60` and `b1 < -0.05`
|
|
|
+- Also corrected `dragon_backtest.py` evaluation window to trim strategy outputs to workbook start and end dates, removing post-workbook 2026 extra events from fit.
|
|
|
+- Latest verified fit after this quality pass:
|
|
|
+- real BUY overlap `106/106`, strategy real BUY `120`, extra real BUY `14`
|
|
|
+- real SELL overlap `105/105`, strategy real SELL `119`, extra real SELL `14`
|
|
|
+- aux BUY overlap `1/1`, strategy aux BUY `45`
|
|
|
+- aux SELL overlap `18/21`, strategy aux SELL `94`, extra aux SELL `76`
|
|
|
+- strategy trades `120`, win rate `44.17%`, avg return `2.10%`, median return `-0.59%`
|
|
|
+
|
|
|
+- Continued refinement later on 2026-04-04 pushed the strategy further while preserving full real-trade alignment.
|
|
|
+- Additional buy-side filters added in `dragon_strategy.py`:
|
|
|
+- more precise glued-entry false-rebound filters
|
|
|
+- deep oversold false-start filters
|
|
|
+- post-sell rebound false-start filters
|
|
|
+- dual-gold false-rebound filter for the narrow `18<c1<20` weak case
|
|
|
+- Latest verified fit after these refinements:
|
|
|
+- real BUY overlap `106/106`, strategy real BUY `111`, extra real BUY `5`
|
|
|
+- real SELL overlap `105/105`, strategy real SELL `110`, extra real SELL `5`
|
|
|
+- aux BUY overlap `1/1`, strategy aux BUY `45`
|
|
|
+- aux SELL overlap `18/21`, strategy aux SELL `89`, extra aux SELL `71`
|
|
|
+- strategy trades `111`, win rate `45.05%`, avg return `2.32%`, median return `-0.60%`
|
|
|
+- remaining extra real BUY dates:
|
|
|
+- `2020-10-28`, `2023-02-13`, `2023-05-10`, `2023-10-26`, `2024-11-27`
|
|
|
+- remaining extra real SELL dates:
|
|
|
+- `2020-10-23`, `2022-12-27`, `2023-05-19`, `2023-11-10`, `2024-11-22`
|
|
|
+- at this stage the remaining extras are harder cases; several are profitable or act as state bridges to preserve workbook-aligned later exits, so future pruning should be more conservative.
|
|
|
+
|
|
|
+- Phase 1 residual attribution completed on 2026-04-04 without changing core strategy logic.
|
|
|
+- Added script `dragon_residual_attribution.py`.
|
|
|
+- Generated outputs:
|
|
|
+- `dragon_residual_trade_attribution.csv`
|
|
|
+- `dragon_residual_trade_review.md`
|
|
|
+- The residual review covers 10 current extra real-trade rows and classifies them into:
|
|
|
+- `DELETE_CANDIDATE`: `2020-10-23`, `2022-12-27`, `2023-05-10`, `2023-05-19`
|
|
|
+- `KEEP_BRIDGE`: `2020-10-28`
|
|
|
+- `KEEP_ALPHA`: `2023-10-26`, `2023-11-10`
|
|
|
+- `OBSERVE_BRIDGE`: `2023-02-13`, `2024-11-27`
|
|
|
+- `OBSERVE`: `2024-11-22`
|
|
|
+- Important conclusion: remaining residuals are no longer homogeneous noise; they split into premature exits, bridge entries needed for aligned downstream sells, and profitable isolated alpha trades.
|
|
|
+
|
|
|
+- Phase 2 residual cleanup completed on 2026-04-04 with additional narrow rule edits in `dragon_strategy.py`.
|
|
|
+- Applied:
|
|
|
+- tighter `oversold_reversal_after_ql_buy` to remove weak sample `2023-05-10` while keeping `2023-08-28`
|
|
|
+- tighter `early_failed_rebound_exit` so it only fires under mild `b1` weakness, removing `2022-12-27`
|
|
|
+- narrow ql-only follow-through hold before `knife_take_profit_2_glued` to suppress `2020-10-23`
|
|
|
+- narrow `mid_hot_wait_ql_confirmation` hold to prevent the aligned `2020-11-11` sell from shifting forward to `2020-11-10`
|
|
|
+- Latest verified fit after serial rerun:
|
|
|
+- real BUY overlap `106/106`, strategy real BUY `108`, extra real BUY `2`
|
|
|
+- real SELL overlap `105/105`, strategy real SELL `107`, extra real SELL `2`
|
|
|
+- aux BUY overlap `1/1`
|
|
|
+- aux SELL overlap `18/21`, strategy aux SELL `85`
|
|
|
+- strategy trades `108`, win rate `44.44%`, avg return `2.49%`, median return `-0.61%`
|
|
|
+- Remaining extra real BUY dates:
|
|
|
+- `2023-10-26`
|
|
|
+- `2024-11-27`
|
|
|
+- Remaining extra real SELL dates:
|
|
|
+- `2023-11-10`
|
|
|
+- `2024-11-22`
|
|
|
+- Updated residual interpretation:
|
|
|
+- `2023-10-26` / `2023-11-10` remain `KEEP_ALPHA`
|
|
|
+- `2024-11-27` remains `OBSERVE_BRIDGE`
|
|
|
+- `2024-11-22` remains `OBSERVE`
|
|
|
+
|
|
|
+- Phase 3 residual cleanup completed on 2026-04-04 by resolving the last bridge chain around `2024-11-22 -> 2024-11-27 -> 2024-11-28 -> 2024-11-29`.
|
|
|
+- Added two narrow rules in `dragon_strategy.py`:
|
|
|
+- `long_glued_wait_predictive_break` to stop the premature `2024-11-22` ql-only exit on a long-held glued trade
|
|
|
+- a long-held extension of `predictive_b1_break_exit` to emit the aligned `2024-11-28` sell after the post-ql decay actually broke down
|
|
|
+- Resulting event chain now matches workbook structure:
|
|
|
+- `2024-11-27` became `AUX_BUY` while still holding
|
|
|
+- `2024-11-28` is the real aligned `predictive_b1_break_exit`
|
|
|
+- `2024-11-29` remains aligned `predictive_error_reentry_buy`
|
|
|
+- Latest verified fit after serial rerun:
|
|
|
+- real BUY overlap `106/106`, strategy real BUY `107`, extra real BUY `1`
|
|
|
+- real SELL overlap `105/105`, strategy real SELL `106`, extra real SELL `1`
|
|
|
+- aux BUY overlap `1/1`, strategy aux BUY `48`
|
|
|
+- aux SELL overlap `18/21`, strategy aux SELL `85`
|
|
|
+- strategy trades `107`, win rate `44.86%`, avg return `2.52%`, median return `-0.60%`
|
|
|
+- Remaining residual real-trade rows are now only one profitable alpha pair:
|
|
|
+- extra real BUY `2023-10-26`
|
|
|
+- extra real SELL `2023-11-10`
|
|
|
+- Current strategic judgment: this residual pair should be kept unless the explicit objective changes from "robust reconstruction + quality" to "strict workbook mimicry even at the cost of profitable alpha".
|
|
|
+
|
|
|
+- Phase 4 auxiliary-signal optimization started on 2026-04-04.
|
|
|
+- Added auxiliary-signal audit outputs:
|
|
|
+- `dragon_aux_signal_audit.py`
|
|
|
+- `dragon_aux_signal_audit.csv`
|
|
|
+- `dragon_aux_signal_review.md`
|
|
|
+- Aux BUY logic in `dragon_strategy.py` was tightened with strength filters and cooldown; it now only emits for stronger holding-period reconfirmation states.
|
|
|
+- Aux SELL logic was kept on the original robust trunk, then refined with:
|
|
|
+- duplicate-cooldown suppression
|
|
|
+- a narrow `state_crash_followthrough` path that recovered workbook aux sell `2025-10-17`
|
|
|
+- suppression of premature high-zone `kdj-only` aux sells when `b1` is not yet meaningfully negative, which moved alignment from `2019-04-10 -> 2019-04-11` and `2021-07-23 -> 2021-07-26`
|
|
|
+- Latest verified fit after serial rerun:
|
|
|
+- real BUY overlap `106/106`, strategy real BUY `107`, extra real BUY `1`
|
|
|
+- real SELL overlap `105/105`, strategy real SELL `106`, extra real SELL `1`
|
|
|
+- aux BUY overlap `1/1`, strategy aux BUY `19`
|
|
|
+- aux SELL overlap `19/21`, strategy aux SELL `82`
|
|
|
+- strategy trades `107`, win rate `44.86%`, avg return `2.52%`, median return `-0.60%`
|
|
|
+- Current audit conclusion:
|
|
|
+- auxiliary BUY redundancy has been materially compressed (`48 -> 19`)
|
|
|
+- auxiliary SELL overlap improved (`18 -> 19`) but count is still only marginally compressed (`85 -> 82`)
|
|
|
+- the dominant remaining unmatched bucket is `SELL / post_exit_confirmation`, so any future compression should focus on clustering repeated post-exit bearish confirmations by exit-cycle rather than by global date spacing
|
|
|
+
|
|
|
+- Stage 2 tail was completed later on 2026-04-04 with structural outputs and cycle-based aux-sell compression.
|
|
|
+- Added and validated `dragon_trade_path_trace.py`.
|
|
|
+- Generated:
|
|
|
+- `dragon_trade_path_trace.csv`
|
|
|
+- `dragon_rule_taxonomy.md`
|
|
|
+- Important fix: Layer 4 path attribution now correctly combines holding-period aux BUY and post-exit aux SELL up to the next real BUY; it no longer misses flat-period bearish confirmations.
|
|
|
+- Added cycle audit tooling:
|
|
|
+- `dragon_aux_sell_cycle_audit.py`
|
|
|
+- `dragon_aux_sell_cycle_audit.csv`
|
|
|
+- `dragon_aux_sell_cycle_summary.csv`
|
|
|
+- `dragon_aux_sell_cycle_review.md`
|
|
|
+- Applied one narrow strategy refinement in `dragon_strategy.py`:
|
|
|
+- for `post_exit_confirmation`, only the first aux signal of the same side (`ql` or `kdj`) is emitted within a flat sell-cycle; this preserves workbook-style `ql -> kdj` double confirmation cycles while removing redundant same-side repeats
|
|
|
+- Latest verified fit after serial rerun:
|
|
|
+- real BUY overlap `106/106`, strategy real BUY `107`, extra real BUY `1` (`2023-10-26`)
|
|
|
+- real SELL overlap `105/105`, strategy real SELL `106`, extra real SELL `1` (`2023-11-10`)
|
|
|
+- aux BUY overlap `1/1`, strategy aux BUY `19`
|
|
|
+- aux SELL overlap `19/21`, strategy aux SELL `75`
|
|
|
+- strategy trades `107`, win rate `44.86%`, avg return `2.52%`, median return `-0.60%`
|
|
|
+- Cycle audit result after compression:
|
|
|
+- repeated `post_exit_confirmation` cycles dropped from `10` to `3`
|
|
|
+- zero-workbook-anchor repeated cycles dropped from `8` to `1`
|
|
|
+- remaining protected double-confirmation cycles:
|
|
|
+- `2022-07-08 -> 2022-09-26` with matched `2022-07-11` and `2022-07-15`
|
|
|
+- `2018-12-06 -> 2019-01-18` with matched `2018-12-07`
|
|
|
+- remaining zero-anchor repeated candidate:
|
|
|
+- `2023-12-04 -> 2024-01-18` with `2023-12-13` and `2023-12-14`
|
|
|
+- Strategic conclusion: Stage 2 is now materially complete; further aux-sell compression should stop unless a new rule can remove the last candidate without risking protected `ql -> kdj` cycles.
|
|
|
+
|
|
|
+- Stage 3 robustness validation was started on 2026-04-04 with executable reporting rather than manual inspection.
|
|
|
+- Added `dragon_robustness_report.py`.
|
|
|
+- Generated:
|
|
|
+- `dragon_trade_quality.csv`
|
|
|
+- `dragon_trade_group_summary.csv`
|
|
|
+- `dragon_yearly_performance.csv`
|
|
|
+- `dragon_rule_contribution_entry.csv`
|
|
|
+- `dragon_rule_contribution_exit.csv`
|
|
|
+- `dragon_rule_stability.csv`
|
|
|
+- `dragon_robustness_report.md`
|
|
|
+- Key first-pass findings from Stage 3:
|
|
|
+- baseline trade quality: avg MFE `6.66%`, avg MAE `-2.66%`, avg exit followthrough over next 5 bars `-2.95%`
|
|
|
+- holding buckets are highly asymmetric:
|
|
|
+- `00-05d`: win rate `0%`, avg return `-2.03%`
|
|
|
+- `06-10d`: avg return `-0.81%`
|
|
|
+- `21-40d`: avg return `6.33%`
|
|
|
+- `41d+`: win rate `100%`, avg return `24.13%`
|
|
|
+- sample split improved in the later regime:
|
|
|
+- `2016-2020`: avg return `1.95%`, profit factor `2.83`
|
|
|
+- `2021-2025`: avg return `3.15%`, profit factor `3.81`
|
|
|
+- current realized-trade attribution highlights:
|
|
|
+- strongest entry contributor remains `glued_buy`
|
|
|
+- weaker entry bucket needing review is `deep_oversold_rebound_buy`
|
|
|
+- largest realized drag removal comes from exit rule `knife_take_profit_2_glued`
|
|
|
+- Important limitation documented in the report:
|
|
|
+- threshold perturbation and true leave-one-rule-out reruns still require parameterizing hard-coded logic in `dragon_strategy.py`
|
|
|
+
|
|
|
+- Stage 3 modules A-D were materially advanced later on 2026-04-04.
|
|
|
+- Module A parameterization:
|
|
|
+- added `dragon_strategy_config.py`
|
|
|
+- `dragon_strategy.py` now accepts `DragonRuleEngine(config=...)`
|
|
|
+- default config was serially verified to preserve the current baseline exactly:
|
|
|
+- real BUY overlap `106/106`
|
|
|
+- real SELL overlap `105/105`
|
|
|
+- aux BUY overlap `1/1`
|
|
|
+- aux SELL overlap `19/21`, strategy aux SELL `75`
|
|
|
+- strategy trades `107`, avg return `2.52%`
|
|
|
+- First parameterized controls now include:
|
|
|
+- post-exit aux sell window / duplicate suppression / same-side cycle cap
|
|
|
+- high-zone kdj-only aux suppression thresholds
|
|
|
+- glued high weak rebound thresholds
|
|
|
+- deep oversold rebound thresholds
|
|
|
+- oversold recovery thresholds
|
|
|
+- oversold reversal after ql thresholds
|
|
|
+- post-sell rebound thresholds
|
|
|
+- predictive b1 break thresholds
|
|
|
+- `knife_take_profit_2_wait_ql` switch
|
|
|
+
|
|
|
+- Module B rerun-based ablation completed:
|
|
|
+- added:
|
|
|
+- `dragon_rule_ablation.py`
|
|
|
+- `dragon_rule_ablation.csv`
|
|
|
+- `dragon_rule_ablation.md`
|
|
|
+- Key ablation findings:
|
|
|
+- `glued_buy` remains the structural backbone; disabling it drops real-buy overlap to `46` and real-sell overlap to `52`
|
|
|
+- `deep_oversold_rebound_buy` is the clearest weak entry family:
|
|
|
+- disabling it improves avg return by about `+0.54%`
|
|
|
+- but drops overlap to real BUY `93`, real SELL `92`
|
|
|
+- `predictive_b1_break_exit`, `early_crash_probe_buy`, `oversold_reversal_after_ql_buy`, and `oversold_recovery_buy` look directionally weak but only small positive deltas and still break alignment when removed
|
|
|
+- disabling `knife_take_profit_2_glued` in rerun form produced no headline metric change, implying its current drag is partly replaced by alternative same-cycle exits rather than disappearing cleanly
|
|
|
+- disabling the aux same-side cycle cap did not change real-trade metrics, confirming the Stage 2 compression is a safe hygiene rule
|
|
|
+
|
|
|
+- Module C threshold perturbation completed:
|
|
|
+- added:
|
|
|
+- `dragon_threshold_perturbation.py`
|
|
|
+- `dragon_threshold_perturbation.csv`
|
|
|
+- `dragon_threshold_perturbation.md`
|
|
|
+- `dragon_threshold_sensitivity_summary.csv`
|
|
|
+- Fragile parameters from first perturbation pack:
|
|
|
+- `predictive_b1_break_short_b1_max`
|
|
|
+- `predictive_b1_break_long_b1_max`
|
|
|
+- `deep_oversold_entry_c1_max`
|
|
|
+- `deep_oversold_entry_b1_min`
|
|
|
+- Relatively robust parameters:
|
|
|
+- `post_exit_confirmation_window_days`
|
|
|
+- `aux_sell_high_zone_kdj_only_block_c1`
|
|
|
+- `glued_high_weak_rebound_high_c1`
|
|
|
+- `glued_high_weak_rebound_high_b1`
|
|
|
+- Important inference: optimization leverage is no longer mainly in the aux layer; it concentrates in weak oversold entry logic and fragile predictive-break exits
|
|
|
+
|
|
|
+- Module D reporting completed:
|
|
|
+- added:
|
|
|
+- `dragon_stability_report.py`
|
|
|
+- `dragon_stage3_stability_report.md`
|
|
|
+- Current stage judgment:
|
|
|
+- Stage 2 is complete
|
|
|
+- Stage 3 now has working trade-quality, rerun ablation, threshold perturbation, and summary reporting
|
|
|
+- best next optimization target is `deep_oversold_rebound_buy`, but only through a guarded redesign that preserves workbook alignment rather than blunt removal
|
|
|
+
|
|
|
+- Continued Stage 3 work then focused specifically on `deep_oversold_rebound_buy`.
|
|
|
+- Added localized audit outputs:
|
|
|
+- `dragon_deep_oversold_audit.py`
|
|
|
+- `dragon_deep_oversold_audit.csv`
|
|
|
+- `dragon_deep_oversold_subtype_summary.csv`
|
|
|
+- `dragon_deep_oversold_review.md`
|
|
|
+- Key finding:
|
|
|
+- all `18` current deep-oversold entries are workbook-aligned, so this family cannot be optimized by blunt deletion
|
|
|
+- the weakest subtypes are:
|
|
|
+- `positive_b1_rebound` (`3` trades, win rate `0%`, avg return about `-2.32%`)
|
|
|
+- `shallow_false_start` (`6` trades, avg return about `-1.71%`)
|
|
|
+- better relative subtype is:
|
|
|
+- `classic_oversold` (`5` trades, win rate `60%`, avg return about `+0.04%`)
|
|
|
+- Strategy was then refactored to preserve identical trading behavior while exposing subtype reasons:
|
|
|
+- `deep_oversold_rebound_buy:positive_b1_rebound`
|
|
|
+- `deep_oversold_rebound_buy:deep_capitulation`
|
|
|
+- `deep_oversold_rebound_buy:classic_oversold`
|
|
|
+- `deep_oversold_rebound_buy:shallow_false_start`
|
|
|
+- `deep_oversold_rebound_buy:mixed_oversold`
|
|
|
+- Important engineering lesson:
|
|
|
+- subtype labels initially broke downstream exact `entry_reason == ...` sell logic; fixed by adding family-aware `_entry_reason_is(...)` checks in `dragon_strategy.py`
|
|
|
+- Final verified result after subtype refactor:
|
|
|
+- trading behavior unchanged
|
|
|
+- real BUY overlap remains `106/106`
|
|
|
+- real SELL overlap remains `105/105`
|
|
|
+- aux BUY overlap `1/1`
|
|
|
+- aux SELL overlap `19/21`, strategy aux SELL `75`
|
|
|
+- strategy trades `107`, avg return `2.52%`
|
|
|
+- New stage judgment:
|
|
|
+- the next safe optimization frontier is not “remove deep oversold”
|
|
|
+- it is “design subtype-aware delayed confirmation or alternate entry routing for `positive_b1_rebound` and `shallow_false_start` while preserving workbook-aligned dates where required”
|
|
|
+
|
|
|
+- A subsequent local redesign pass then implemented the first safe default optimization inside the deep-oversold family.
|
|
|
+- Added config controls in `dragon_strategy_config.py` for deep-oversold subtype routing / blocking experiments.
|
|
|
+- Default strategy change actually applied:
|
|
|
+- shallow-false-start entries with `ql_buy` now defer to same-day fallback rules
|
|
|
+- very light positive-B1 rebound with `a1 > -0.02` now also defers to same-day fallback rules
|
|
|
+- This rerouted four weak subtype dates without changing any real trade dates:
|
|
|
+- `2018-01-02` -> now `glued_buy`
|
|
|
+- `2018-10-19` -> now `dual_gold_resonance_buy`
|
|
|
+- `2023-06-02` -> now `dual_gold_resonance_buy`
|
|
|
+- `2024-09-11` -> now `glued_buy`
|
|
|
+- Verified result after rerun:
|
|
|
+- baseline fit unchanged at real BUY `106/106`, real SELL `105/105`, aux BUY `1/1`, aux SELL `19/21`, strategy trades `107`
|
|
|
+- Deep-oversold family count was reduced from `18` to `14` while preserving all aligned dates.
|
|
|
+- Added focused experiment outputs:
|
|
|
+- `dragon_deep_oversold_experiments.py`
|
|
|
+- `dragon_deep_oversold_experiments.csv`
|
|
|
+- `dragon_deep_oversold_experiments.md`
|
|
|
+- Focused experiment conclusion:
|
|
|
+- blocking remaining `positive_b1_rebound` gives about `+0.10%` avg-return improvement but drops overlap to BUY `104`, SELL `103`
|
|
|
+- blocking remaining `shallow_false_start` without `ql` gives about `+0.15%` but drops overlap to BUY `103`, SELL `102`
|
|
|
+- blocking both gives about `+0.26%` but drops overlap to BUY `101`, SELL `100`
|
|
|
+- Strategic conclusion:
|
|
|
+- safe deep-oversold cleanup has likely been exhausted under the current “preserve 106/105” objective
|
|
|
+- further improvement now requires explicit user acceptance of alignment loss, or a more complex bridge-style replacement rule
|
|
|
+
|
|
|
+- Additional safe simplification was later applied to the entry tree without changing baseline fit or performance.
|
|
|
+- `non_glued_positive_expansion_buy` was narrowed so it only applies when not `dual_gold`.
|
|
|
+- In-sample effect:
|
|
|
+- `2016-07-13` and `2020-04-30` now route to `dual_gold_resonance_buy` on the same dates
|
|
|
+- baseline stays unchanged at real BUY `106/106`, real SELL `105/105`, aux BUY `1/1`, aux SELL `19/21`, strategy trades `107`, avg return `2.52%`
|
|
|
+- Current research judgment:
|
|
|
+- `non_glued_positive_expansion_buy` should be treated as a redundant label, not a separate alpha family
|
|
|
+- `predictive_b1_break` should be treated as a frozen bridge rule under the workbook-preserving objective
|
|
|
+- the remaining meaningful weak-family frontier is no longer generic rule deletion but subtype-aware redesign / replacement under strict alignment constraints
|
|
|
+
|
|
|
+- The workbook-preserving version is now formalized as the current research baseline rather than only a working reconstruction state.
|
|
|
+- New baseline-pack outputs:
|
|
|
+- `dragon_walk_forward_validation.py`
|
|
|
+- `dragon_walk_forward_summary.csv`
|
|
|
+- `dragon_walk_forward_family_year.csv`
|
|
|
+- `dragon_walk_forward_family_stability.csv`
|
|
|
+- `dragon_walk_forward_report.md`
|
|
|
+- `dragon_research_baseline.py`
|
|
|
+- `dragon_baseline_config_snapshot.json`
|
|
|
+- `dragon_formal_research_baseline.md`
|
|
|
+- Fixed-baseline walk-forward conclusions:
|
|
|
+- anchored expanding windows positive `8/10`
|
|
|
+- rolling 3Y windows positive `7/8`
|
|
|
+- `glued_buy` remains the clearest persistent structural alpha family
|
|
|
+- `deep_oversold_rebound_buy` remains the weakest persistent family and should be handled via subtype redesign, not blunt deletion under the current objective
|
|
|
+- Formal family classification now used for future work:
|
|
|
+- core alpha: `glued_buy`, `early_crash_probe_buy`, `oversold_recovery_buy`
|
|
|
+- structural support: `dual_gold_resonance_buy`, `deep_oversold_rebound_buy:classic_oversold`
|
|
|
+- frozen bridge: `predictive_b1_break_exit`, `predictive_error_reentry_buy`, related split-preserving hold gates
|
|
|
+- redundant label: `non_glued_positive_expansion_buy`
|
|
|
+- active research: weak deep-oversold subtypes, `post_washout_kdj_reentry_buy`, `oversold_reversal_after_ql_buy`, `post_sell_rebound_buy`, and the short-holding drag buckets `00-05d` / `06-10d`
|
|
|
+- Operational implication:
|
|
|
+- future optimization should fork from `dragon_baseline_config_snapshot.json`
|
|
|
+- any alignment loss must be treated as a branch with an explicit objective change, not as a silent tweak on the formal baseline
|
|
|
+
|
|
|
+- Further Track A work added a switchable delayed-confirmation experiment path for weak `deep_oversold` subtypes without changing the formal baseline.
|
|
|
+- Strategy-side additions:
|
|
|
+- pending-state handling for weak deep-oversold setups in `dragon_strategy.py`
|
|
|
+- config switches `deep_oversold_confirm_weak_with_ql` and `deep_oversold_confirm_window_bars`
|
|
|
+- New outputs:
|
|
|
+- `dragon_deep_oversold_confirmation_experiments.csv`
|
|
|
+- `dragon_deep_oversold_confirmation_event_changes.csv`
|
|
|
+- `dragon_deep_oversold_confirmation_experiments.md`
|
|
|
+- `dragon_deep_oversold_confirmation_review.md`
|
|
|
+- Stable conclusion from that pack:
|
|
|
+- delayed `QL` confirmation improves alpha-first branch metrics mainly by vetoing weak subtype trades, not by producing genuinely better confirmed entries
|
|
|
+- `2022-03-11`, `2024-01-18`, `2024-01-23` are clean veto candidates
|
|
|
+- delayed confirmed replacements like `2022-03-17` and `2024-08-30` still lose money
|
|
|
+- Research implication:
|
|
|
+- for weak deep-oversold subtypes, the higher-priority alpha-first direction is selective veto / removal before more elaborate confirmation logic
|
|
|
+- under the workbook-preserving objective, this branch should remain experimental only and should not be ported into the formal baseline
|
|
|
+
|
|
|
+- Follow-up Track-A work confirmed that narrow selective veto is stronger than both delayed confirmation and broad weak-subtype blocking for the alpha-first branch.
|
|
|
+- New strategy-side experiment hooks:
|
|
|
+- `deep_oversold_selective_positive_b1_c1_max`
|
|
|
+- `deep_oversold_selective_shallow_c1_min`
|
|
|
+- `deep_oversold_selective_shallow_b1_min`
|
|
|
+- `deep_oversold_selective_mixed_c1_max`
|
|
|
+- `deep_oversold_selective_mixed_require_no_ql`
|
|
|
+- New outputs:
|
|
|
+- `dragon_deep_oversold_selective_veto_experiments.csv`
|
|
|
+- `dragon_deep_oversold_selective_veto_event_changes.csv`
|
|
|
+- `dragon_deep_oversold_selective_veto_experiments.md`
|
|
|
+- `dragon_deep_oversold_selective_veto_review.md`
|
|
|
+- Best alpha-first branch in that pack:
|
|
|
+- `selective_veto_plus_mixed_c1_lt_10_2_no_ql`
|
|
|
+- result about `103` trades, avg_return `2.81%`, profit_factor `3.96`, real BUY / SELL overlap `102 / 101`
|
|
|
+- This beats broad blocking of all remaining weak deep-oversold subtypes while losing fewer aligned dates.
|
|
|
+- Trade-level implication:
|
|
|
+- the valuable direction is not “delete all weak subtype trades”
|
|
|
+- it is “remove a smaller pathological subset”
|
|
|
+- current best veto candidate removes:
|
|
|
+- `2022-02-09` mixed_oversold
|
|
|
+- `2022-03-11` positive_b1_rebound
|
|
|
+- `2024-01-18` shallow_false_start
|
|
|
+- `2024-01-23` shallow_false_start
|
|
|
+- while keeping:
|
|
|
+- `2022-03-16` positive_b1_rebound
|
|
|
+- `2024-08-29` shallow_false_start
|
|
|
+- Operational conclusion:
|
|
|
+- Track A priority order is now:
|
|
|
+- narrow selective veto
|
|
|
+- then delayed confirmation only if paired with extra quality filters
|
|
|
+- broad subtype deletion last
|
|
|
+
|
|
|
+- Stage 3 is now formally complete and split into two explicit baselines.
|
|
|
+- Official reconstruction branch:
|
|
|
+- `workbook_preserving`
|
|
|
+- metrics `106/106` real BUY, `105/105` real SELL, `107` trades, avg_return `2.52%`, profit_factor `3.31`
|
|
|
+- Performance-oriented research branch:
|
|
|
+- `alpha_first_selective_veto`
|
|
|
+- metrics `102/101` real BUY / SELL overlap, `103` trades, avg_return `2.81%`, profit_factor `3.96`
|
|
|
+- branch outputs:
|
|
|
+- `dragon_alpha_first_baseline.md`
|
|
|
+- `dragon_alpha_first_config_snapshot.json`
|
|
|
+- `dragon_alpha_first_branch_summary.csv`
|
|
|
+- `dragon_alpha_first_branch_comparison.csv`
|
|
|
+- `dragon_alpha_first_branch_walk_forward.csv`
|
|
|
+- `dragon_alpha_first_branch_trade_diff.csv`
|
|
|
+- `dragon_stage3_completion.md`
|
|
|
+- Stable governance going forward:
|
|
|
+- `workbook_preserving` is the authoritative reconstruction baseline
|
|
|
+- `alpha_first_selective_veto` is the leading alpha-first research branch
|
|
|
+- future optimization must declare branch first; do not mix workbook-preserving and alpha-first changes silently
|
|
|
+
|
|
|
+- Post-closure branch extension review on 2026-04-04 formally tested a glued-focused short-holding candidate above the current alpha-first branch.
|
|
|
+- Added:
|
|
|
+- `dragon_glued_alpha_candidate.py`
|
|
|
+- `dragon_glued_alpha_candidate_summary.csv`
|
|
|
+- `dragon_glued_alpha_candidate_comparison.csv`
|
|
|
+- `dragon_glued_alpha_candidate_holding_buckets.csv`
|
|
|
+- `dragon_glued_alpha_candidate_walk_forward.csv`
|
|
|
+- `dragon_glued_alpha_candidate_trade_diff_vs_alpha.csv`
|
|
|
+- `dragon_glued_alpha_candidate_trade_diff_vs_workbook.csv`
|
|
|
+- `dragon_glued_alpha_candidate_config_snapshot.json`
|
|
|
+- `dragon_glued_alpha_candidate_review.md`
|
|
|
+- New research branch definition:
|
|
|
+- `alpha_first_glued_selective_veto`
|
|
|
+- config = current `alpha_first_selective_veto` plus glued veto:
|
|
|
+- `glued_selective_hot`: `c1 >= 40`, `b1 >= 0.10`
|
|
|
+- `glued_selective_low`: `23 <= c1 < 28`, `b1 <= 0.02`
|
|
|
+- Branch-level result:
|
|
|
+- trades `92`
|
|
|
+- avg_return `3.35%`
|
|
|
+- profit_factor `4.95`
|
|
|
+- real BUY / SELL overlap `90 / 89`
|
|
|
+- walk-forward:
|
|
|
+- anchored `9/10` positive years, avg test return `3.86%`
|
|
|
+- rolling 3Y `7/8` positive years, avg test return `4.78%`
|
|
|
+- Important governance conclusion:
|
|
|
+- glued candidate is stronger on performance and short-holding drag than `alpha_first_selective_veto`
|
|
|
+- but overlap loss is much larger (`102/101 -> 90/89`)
|
|
|
+- therefore keep `alpha_first_selective_veto` as the official alpha-first baseline
|
|
|
+- treat `alpha_first_glued_selective_veto` as the next research branch, not a replacement baseline
|
|
|
+- Trade-diff nuance:
|
|
|
+- candidate mostly removes `glued_buy` trades (`12` removals vs alpha-first), but also introduces one fallback reroute:
|
|
|
+- `2021-11-22 -> 2021-11-30`, `dual_gold_resonance_buy -> small_positive_a1_declining:kdj_sell`
|
|
|
+
|
|
|
+- Follow-up glued attribution and refinement work on 2026-04-04 split the glued veto branch into two qualitatively different buckets.
|
|
|
+- Added:
|
|
|
+- `dragon_glued_veto_attribution.py`
|
|
|
+- `dragon_glued_veto_attribution.csv`
|
|
|
+- `dragon_glued_veto_bucket_summary.csv`
|
|
|
+- `dragon_glued_veto_review.md`
|
|
|
+- Attribution result for the `12` removed trades vs `alpha_first_selective_veto`:
|
|
|
+- removed-set avg_return `-1.60%`
|
|
|
+- removed-set win_rate `8.33%`
|
|
|
+- removed-set profit_factor `0.03`
|
|
|
+- bucket split:
|
|
|
+- `low_weak_range`: `4` trades, win_rate `0%`, avg_return `-2.35%`, avg_holding `3.0` -> clean promotion candidate
|
|
|
+- `hot_positive_b1`: `8` trades, win_rate `12.5%`, avg_return `-1.23%`, avg_holding `6.1` -> directionally correct, but one micro-profit sample remains
|
|
|
+- key attribution judgment:
|
|
|
+- `low_weak_range` should be treated as the clean conservative glued filter
|
|
|
+- `hot_positive_b1` should not be rolled back, but should be narrowed rather than used in the original broad form
|
|
|
+
|
|
|
+- Strategy parameterization was extended with `glued_selective_hot_c1_max` and then tested through:
|
|
|
+- `dragon_glued_refine_experiments.py`
|
|
|
+- `dragon_glued_refine_experiments.csv`
|
|
|
+- `dragon_glued_refine_experiments.md`
|
|
|
+- `dragon_glued_refined_candidate_config.json`
|
|
|
+- `dragon_glued_refined_trade_diff_vs_full.csv`
|
|
|
+- new branch config helper:
|
|
|
+- `alpha_first_glued_refined_hot_cap_config()`
|
|
|
+
|
|
|
+- New refined glued research candidate:
|
|
|
+- `glued_veto_hot_cap75_and_low`
|
|
|
+- metrics:
|
|
|
+- trades `92`
|
|
|
+- avg_return `3.36%`
|
|
|
+- profit_factor `4.98`
|
|
|
+- real BUY / SELL overlap `91 / 90`
|
|
|
+- short buckets:
|
|
|
+- `00-05d` `-1.67%`
|
|
|
+- `06-10d` `-0.59%`
|
|
|
+- This refined candidate dominates the previous full glued candidate (`90/89`, `3.35%`, `PF 4.95`) by restoring the only super-hot micro-profit trade:
|
|
|
+- restored `2021-11-05 -> 2021-11-18`, `glued_buy -> ql_mid_zone_take_profit`
|
|
|
+- removed the fallback reroute `2021-11-22 -> 2021-11-30`, `dual_gold_resonance_buy -> small_positive_a1_declining:kdj_sell`
|
|
|
+- Governance implication:
|
|
|
+- current official alpha-first baseline still remains `alpha_first_selective_veto`
|
|
|
+- but the next best research branch is no longer the old full glued candidate
|
|
|
+- it is now the refined glued branch with hot cap `75` plus the intact low weak-range veto
|
|
|
+
|
|
|
+- Formal upgrade-review package for the refined glued branch was completed on 2026-04-04.
|
|
|
+- Added:
|
|
|
+- `dragon_glued_refined_branch_review.py`
|
|
|
+- `dragon_glued_refined_branch_summary.csv`
|
|
|
+- `dragon_glued_refined_branch_comparison.csv`
|
|
|
+- `dragon_glued_refined_branch_walk_forward.csv`
|
|
|
+- `dragon_glued_refined_branch_trade_diff.csv`
|
|
|
+- `dragon_glued_refined_holding_breakdown.csv`
|
|
|
+- `dragon_glued_refined_yearly_breakdown.csv`
|
|
|
+- `dragon_glued_refined_family_breakdown.csv`
|
|
|
+- `dragon_glued_refined_regime_breakdown.csv`
|
|
|
+- `dragon_glued_refined_branch_config_snapshot.json`
|
|
|
+- `dragon_glued_refined_branch_review.md`
|
|
|
+- Branch-level result for `alpha_first_glued_refined_hot_cap`:
|
|
|
+- trades `92`
|
|
|
+- avg_return `3.36%`
|
|
|
+- profit_factor `4.98`
|
|
|
+- avg_MFE `7.57%`
|
|
|
+- avg_MAE `-2.57%`
|
|
|
+- real BUY / SELL overlap `91 / 90`
|
|
|
+- Walk-forward versus current `alpha_first_selective_veto`:
|
|
|
+- anchored `8/10 -> 9/10`, avg test return `3.40% -> 3.87%`
|
|
|
+- rolling 3Y `7/8 -> 7/8`, avg test return `4.30% -> 4.79%`
|
|
|
+- Refined-vs-alpha trade diff:
|
|
|
+- removed `11`
|
|
|
+- added `0`
|
|
|
+- avg_return delta `+0.55%`
|
|
|
+- profit_factor delta `+1.02`
|
|
|
+- overlap delta `-11 / -11`
|
|
|
+- Formal governance judgment from the review:
|
|
|
+- upgrade gate passes on headline quality and walk-forward thresholds
|
|
|
+- but governance still should remain explicit because overlap loss is still large
|
|
|
+- current recommendation remains:
|
|
|
+- keep `alpha_first_selective_veto` as the formal alpha-first baseline
|
|
|
+- mark `alpha_first_glued_refined_hot_cap` as the leading next alpha-first candidate
|
|
|
+
|
|
|
+- Added removed-trade attribution package for the refined branch:
|
|
|
+- `dragon_glued_refined_removed_trade_attribution.py`
|
|
|
+- `dragon_glued_refined_removed_trade_attribution.csv`
|
|
|
+- `dragon_glued_refined_removed_trade_review.md`
|
|
|
+- Removed-set result vs current alpha-first:
|
|
|
+- removed trades `11`
|
|
|
+- removed-set avg_return `-1.81%`
|
|
|
+- removed-set win_rate `0%`
|
|
|
+- removed-set profit_factor `0.00`
|
|
|
+- recommendation mix:
|
|
|
+- `KEEP_REMOVAL` `11`
|
|
|
+- `OBSERVE_REMOVAL` `0`
|
|
|
+- `OVER_REMOVAL` `0`
|
|
|
+- bucket split:
|
|
|
+- `hot_positive_b1_cap75`: `7` trades, avg_return `-1.50%`
|
|
|
+- `low_weak_range`: `4` trades, avg_return `-2.35%`
|
|
|
+- Strong inference:
|
|
|
+- the refined branch no longer removes any profitable sample from the current alpha-first baseline
|
|
|
+- it is now a fully removal-driven cleanup of weak short-holding glued trades
|
|
|
+
|
|
|
+- Final alpha-branch governance package was completed on 2026-04-04.
|
|
|
+- Added:
|
|
|
+- `dragon_alpha_branch_governance.py`
|
|
|
+- `dragon_alpha_branch_governance_matrix.csv`
|
|
|
+- `dragon_alpha_branch_governance_decision.json`
|
|
|
+- `dragon_alpha_branch_governance.md`
|
|
|
+- Governance gates used:
|
|
|
+- `headline_quality_gate`
|
|
|
+- `stability_gate`
|
|
|
+- `removal_quality_gate`
|
|
|
+- `alignment_cost_gate`
|
|
|
+- Gate definitions:
|
|
|
+- headline quality requires avg_return delta `>= +0.30%`, profit_factor delta `>= +0.50`, and no short-bucket deterioration
|
|
|
+- stability requires anchored and rolling walk-forward to be no worse than the current formal alpha branch
|
|
|
+- removal quality requires `OVER_REMOVAL = 0`, `OBSERVE_REMOVAL <= 1`, removed-set win_rate `<= 5%`, removed-set avg_return `< 0`
|
|
|
+- alignment cost requires incremental overlap loss no worse than `8` additional BUYs and `8` additional SELLs vs the current formal alpha branch for automatic promotion
|
|
|
+- Final governance result:
|
|
|
+- current formal alpha branch remains `alpha_first_selective_veto`
|
|
|
+- leading candidate branch is `alpha_first_glued_refined_hot_cap`
|
|
|
+- gate status:
|
|
|
+- `headline_quality_gate = PASS`
|
|
|
+- `stability_gate = PASS`
|
|
|
+- `removal_quality_gate = PASS`
|
|
|
+- `alignment_cost_gate = FAIL`
|
|
|
+- final decision:
|
|
|
+- `DUAL_TRACK_GOVERNANCE`
|
|
|
+- practical meaning:
|
|
|
+- keep `alpha_first_selective_veto` as the formal alpha branch for now
|
|
|
+- keep `alpha_first_glued_refined_hot_cap` as the governed leading candidate
|
|
|
+- if objective explicitly shifts toward stronger alpha at the cost of more workbook divergence, refined glued should be the first branch promoted
|
|
|
+
|
|
|
+- User explicitly endorsed the stronger alpha-first judgment after reviewing the governance package and requested a forward research plan under that direction.
|
|
|
+- Working implication for next planning round:
|
|
|
+- research should pivot from workbook-style residual cleanup to formalizing and validating the stronger alpha candidate path
|
|
|
+- `alpha_first_glued_refined_hot_cap` should be treated as the primary forward research subject, with `alpha_first_selective_veto` retained as the control branch
|
|
|
+
|
|
|
+- Formalization validation pack for the stronger alpha candidate was completed after the user approved the alpha-first direction.
|
|
|
+- Added governance-direction docs:
|
|
|
+- `dragon_research_direction_update.md`
|
|
|
+- `dragon_forward_branch_roles.md`
|
|
|
+
|
|
|
+- Added cost-stress package:
|
|
|
+- `dragon_cost_stress_test.py`
|
|
|
+- `dragon_cost_stress_test.csv`
|
|
|
+- `dragon_cost_stress_test.md`
|
|
|
+- Cost-stress conclusion:
|
|
|
+- refined branch remains ahead of current alpha under all tested cost levels
|
|
|
+- at `20 bps/side`, current alpha CAGR `23.55%`, refined CAGR `26.62%`
|
|
|
+- refined minus current alpha CAGR delta widens from about `+2.62%` at `0 bps` to about `+3.07%` at `20 bps`
|
|
|
+- implication: refined edge is not only a zero-cost backtest artifact
|
|
|
+
|
|
|
+- Added local-neighborhood sensitivity package:
|
|
|
+- `dragon_glued_refined_sensitivity.py`
|
|
|
+- `dragon_glued_refined_sensitivity.csv`
|
|
|
+- `dragon_glued_refined_sensitivity_summary.csv`
|
|
|
+- `dragon_glued_refined_sensitivity.md`
|
|
|
+- Sensitivity conclusion:
|
|
|
+- tested local neighborhood cases `81`
|
|
|
+- avg_return range `3.23% -> 3.42%`
|
|
|
+- profit_factor range `4.66 -> 5.11`
|
|
|
+- overlap floor `89/89`
|
|
|
+- robust-nearby cases `52`
|
|
|
+- important inference:
|
|
|
+- the refined branch is locally stable; it is not dependent on a single knife-edge threshold point
|
|
|
+
|
|
|
+- Added year/regime consistency package:
|
|
|
+- `dragon_glued_refined_year_regime_review.py`
|
|
|
+- `dragon_glued_refined_year_regime_review.csv`
|
|
|
+- `dragon_glued_refined_regime_review.csv`
|
|
|
+- `dragon_glued_refined_holding_review.csv`
|
|
|
+- `dragon_glued_refined_family_review.csv`
|
|
|
+- `dragon_glued_refined_year_regime_review.md`
|
|
|
+- Year/regime conclusion:
|
|
|
+- refined improves yearly avg_return in `6` sell-year buckets out of `11`
|
|
|
+- refined improves avg_return in `3` regime buckets out of `4`
|
|
|
+- holding-bucket improvements are concentrated exactly where intended:
|
|
|
+- `00-05d` and `06-10d`
|
|
|
+- medium and long holding buckets are preserved rather than damaged
|
|
|
+- strongest family-level improvement is still `glued_buy`
|
|
|
+
|
|
|
+- Added equity/drawdown package:
|
|
|
+- `dragon_equity_curve_review.py`
|
|
|
+- `dragon_equity_curve_review.csv`
|
|
|
+- `dragon_drawdown_review.csv`
|
|
|
+- `dragon_monthly_return_review.csv`
|
|
|
+- `dragon_yearly_return_review.csv`
|
|
|
+- `dragon_equity_curve_review.md`
|
|
|
+- Equity/drawdown conclusion:
|
|
|
+- refined branch has the best growth-quality profile in the pack
|
|
|
+- CAGR `31.32%`
|
|
|
+- max_drawdown `-12.79%`
|
|
|
+- drawdown_duration `16` trades
|
|
|
+- Calmar `2.45`
|
|
|
+- compared with current alpha:
|
|
|
+- current alpha CAGR `28.70%`, max_drawdown `-14.84%`, Calmar `1.93`
|
|
|
+- implication: refined branch improves both growth and drawdown quality rather than trading one for the other
|
|
|
+
|
|
|
+- Stage judgment after formalization validation:
|
|
|
+- `alpha_first_glued_refined_hot_cap` now passes:
|
|
|
+- headline quality
|
|
|
+- walk-forward stability
|
|
|
+- removed-trade quality
|
|
|
+- cost pressure
|
|
|
+- local threshold-neighborhood stability
|
|
|
+- equity-curve / drawdown quality
|
|
|
+- remaining blocker is no longer quantitative robustness
|
|
|
+- remaining blocker is only governance preference around workbook divergence
|
|
|
+
|
|
|
+- Added `dragon_alpha_promotion_decision.md` to convert the current dual-track governance into an explicit promotion tree.
|
|
|
+- New operational conclusion:
|
|
|
+- governance-neutral default remains `DUAL_TRACK_GOVERNANCE`
|
|
|
+- if objective is explicitly alpha-first, the recommended promoted branch is `alpha_first_glued_refined_hot_cap`
|
|
|
+- branch roles are now fixed more clearly:
|
|
|
+- `alpha_first_glued_refined_hot_cap` = forward research default
|
|
|
+- `alpha_first_selective_veto` = benchmark control
|
|
|
+- `workbook_preserving` = reconstruction reference
|
|
|
+- main blocker to formal promotion is documented as governance preference only, not missing quantitative proof
|
|
|
+
|
|
|
+- Added `dragon_forward_research_plan.md` as the explicit next-stage plan file.
|
|
|
+- This plan fixes the next research sequence as:
|
|
|
+- Phase 1: freeze branch roles and objective
|
|
|
+- Phase 2: refined-branch alpha attribution
|
|
|
+- Phase 3: execution-aware robustness validation
|
|
|
+- Phase 4: formal strategy governance
|
|
|
+- Phase 5: final strategy memo
|
|
|
+- Immediate next execution target is Phase 2 on `alpha_first_glued_refined_hot_cap`.
|
|
|
+
|
|
|
+- Completed the refined-branch alpha attribution pack:
|
|
|
+- `dragon_refined_alpha_attribution.py`
|
|
|
+- `dragon_refined_family_decomposition.csv`
|
|
|
+- `dragon_refined_alpha_attribution.csv`
|
|
|
+- `dragon_refined_removed_trade_recheck.csv`
|
|
|
+- `dragon_refined_edge_review.md`
|
|
|
+- Main finding:
|
|
|
+- refined alpha is still primarily a `glued_buy` story
|
|
|
+- improvement comes from deleting low-quality short glued trades, not from adding complex new paths
|
|
|
+- removed trades vs control remain `11`, all `KEEP_REMOVAL`, removed-set avg_return `-1.81%`, win_rate `0%`
|
|
|
+
|
|
|
+- Completed the execution-aware robustness pack:
|
|
|
+- `dragon_refined_execution_validation.py`
|
|
|
+- `dragon_refined_execution_stress.csv`
|
|
|
+- `dragon_refined_latency_review.csv`
|
|
|
+- `dragon_refined_risk_cluster_review.csv`
|
|
|
+- `dragon_refined_stability_review.md`
|
|
|
+- Key findings:
|
|
|
+- next-open execution still favors refined: avg_return `3.31%` vs control `2.76%`, PF `4.73` vs `3.78`
|
|
|
+- next-close execution still favors refined: avg_return `2.44%` vs control `1.98%`, PF `2.78` vs `2.37`
|
|
|
+- next-open + `20 bps/side` still favors refined: CAGR `25.51%` vs `22.40%`, PF `3.64` vs `2.92`
|
|
|
+- risk clustering also improved under next-open:
|
|
|
+- max loss streak `8` vs `10`
|
|
|
+- worst 5-trade sum `-7.96%` vs `-10.11%`
|
|
|
+- max drawdown `-13.19%` vs `-17.84%`
|
|
|
+
|
|
|
+- Completed the formal governance package:
|
|
|
+- `dragon_formal_strategy_governance.md`
|
|
|
+- `dragon_parameter_governance.md`
|
|
|
+- `dragon_strategy_monitoring_template.csv`
|
|
|
+- `dragon_formal_strategy_memo.md`
|
|
|
+- Current terminal judgment in workspace:
|
|
|
+- `alpha_first_glued_refined_hot_cap` is now the best strategy branch from a quant perspective
|
|
|
+- if it is not formally promoted, that should be treated as a governance choice rather than an unresolved research gap
|
|
|
+
|
|
|
+## 2026-04-05
|
|
|
+
|
|
|
+- Moved from research formalization into quasi-production packaging.
|
|
|
+- Added `dragon_rc1_release.py` and generated:
|
|
|
+- `dragon_rc1_release.md`
|
|
|
+- `dragon_rc1_config_snapshot.json`
|
|
|
+- `RC1` is now the frozen release candidate of `alpha_first_glued_refined_hot_cap`.
|
|
|
+
|
|
|
+- Added `dragon_daily_signal_pipeline.py` and generated:
|
|
|
+- `dragon_daily_signal_snapshot.csv`
|
|
|
+- `dragon_daily_branch_status.csv`
|
|
|
+- `dragon_daily_monitor_snapshot.csv`
|
|
|
+- `dragon_daily_rc1_manifest.json`
|
|
|
+- `dragon_daily_signal_report.md`
|
|
|
+- plus dated archives in `daily_reports/`
|
|
|
+
|
|
|
+- Latest live run used request date `2026-04-05` and correctly resolved the actual latest market bar to `2026-04-03`.
|
|
|
+- Latest live status on `2026-04-03`:
|
|
|
+- both refined and control branches are flat
|
|
|
+- latest real event for both is `2026-02-13 SELL knife_take_profit_2_glued`
|
|
|
+- no new event fired on `2026-04-03`
|
|
|
+
|
|
|
+- Monitoring snapshot after threshold fix:
|
|
|
+- warnings `0`
|
|
|
+- hard breaches `0`
|
|
|
+- next_open avg_return delta vs control `+0.53%`
|
|
|
+- next_open PF delta vs control `+0.92`
|
|
|
+- next_open max_drawdown refined `-13.19%`
|
|
|
+- next_open max loss streak refined `8`
|
|
|
+- next_open + `20 bps/side` CAGR refined/control `25.17% / 22.07%`
|
|
|
+
|
|
|
+- Monitoring template bug fixed:
|
|
|
+- `next_open_max_drawdown` threshold direction was wrong for negative drawdown values
|
|
|
+- corrected from `>=` style to `<=` style
|
|
|
+- after rerun the monitor became fully green
|
|
|
+
|
|
|
+- Added forward-observation infrastructure:
|
|
|
+- `dragon_forward_observation_pipeline.py`
|
|
|
+- `dragon_forward_observation_log.csv`
|
|
|
+- `dragon_forward_observation_state.json`
|
|
|
+- `dragon_signal_change_log.csv`
|
|
|
+- `dragon_signal_change_review.md`
|
|
|
+- `dragon_branch_divergence_log.csv`
|
|
|
+- `dragon_branch_divergence_report.md`
|
|
|
+- `dragon_monitor_history.csv`
|
|
|
+- `dragon_monitor_health_report.md`
|
|
|
+- `dragon_forward_weekly_summary.csv`
|
|
|
+- `dragon_forward_weekly_review.md`
|
|
|
+- `forward_reports/` for dated observation archives
|
|
|
+
|
|
|
+- First forward-observation state on latest market bar `2026-04-03`:
|
|
|
+- refined and control are both flat
|
|
|
+- same latest real event `2026-02-13 SELL knife_take_profit_2_glued`
|
|
|
+- divergence level `none`
|
|
|
+- all monitor metrics currently `ok`
|
|
|
+- the system is now able to accumulate forward logs and streak-based monitor history instead of only producing one-off daily snapshots
|
|
|
+
|
|
|
+- Added `dragon_next_stage_opinion_cn.md`.
|
|
|
+- This Chinese memo fixes the current strategic opinion explicitly:
|
|
|
+- do not continue optimizing the strategy core now
|
|
|
+- the best next action is to stop core tuning and accumulate forward observations on `RC1`
|
|
|
+- future research should only touch weak secondary families in separate branches
|
|
|
+- promotion or non-promotion of `RC1` should now be decided by forward samples plus governance, not by more in-sample tuning
|
|
|
+
|
|
|
+- HTML reporting layer is now available for the forward-observation workflow.
|
|
|
+- Daily and weekly HTML outputs now exist as first-class artifacts:
|
|
|
+- `dragon_reports_index.html`
|
|
|
+- `dragon_daily_signal_report.html`
|
|
|
+- `dragon_forward_weekly_review.html`
|
|
|
+- dated archives in `html_reports/`
|
|
|
+- Daily / weekly report coverage now includes all three strategy roles:
|
|
|
+- `workbook_preserving`
|
|
|
+- `alpha_first_selective_veto`
|
|
|
+- `alpha_first_glued_refined_hot_cap`
|
|
|
+- Important note for future sessions:
|
|
|
+- PowerShell terminal output may display Chinese mojibake when reading UTF-8 files directly
|
|
|
+- the generated HTML files themselves were verified as valid UTF-8 and should be checked in a browser, not judged from terminal rendering alone
|
|
|
+
|
|
|
+- HTML nav bug was fixed after the first rollout:
|
|
|
+- root pages and archived pages require different relative hrefs
|
|
|
+- archived pages in `html_reports/` now link within their own directory correctly
|
|
|
+- HTML presentation was upgraded further with:
|
|
|
+- RC1 summary cards on the index page
|
|
|
+- inline equity-curve and yearly-return charts on the index page
|
|
|
+- `update_dragon_reports.ps1` as a one-click refresh entry point
|
|
|
+
|
|
|
+- Chinese usage docs now also have HTML pages:
|
|
|
+- `dragon_html_report_usage_cn.html`
|
|
|
+- `dragon_html_report_quickstart_cn.html`
|
|
|
+- they are linked from the index page and generated for both root and `html_reports/`
|
|
|
+
|
|
|
+- Historical full-trade detail reporting is now part of the daily HTML package.
|
|
|
+- Generated artifacts:
|
|
|
+- `dragon_historical_trade_details.csv`
|
|
|
+- `dragon_historical_trade_details.html`
|
|
|
+- dated CSV archive in `daily_reports/`
|
|
|
+- dated HTML archive in `html_reports/`
|
|
|
+- This page is linked from the daily report and index page so the user can audit complete historical trade flows directly from the latest report.
|
|
|
+
|
|
|
+- There is now a dedicated investor-facing theory page for the strategy and indicators:
|
|
|
+- `dragon_indicator_strategy_guide_cn.md`
|
|
|
+- `dragon_indicator_strategy_guide_cn.html`
|
|
|
+- That guide page was later upgraded into a fuller illustrated explainer with:
|
|
|
+- indicator quick-reference cards
|
|
|
+- market-state interpretation table
|
|
|
+- detailed threshold / trigger examples
|
|
|
+- representative real BUY / SELL rule glossary with RC1 counts
|
|
|
+- live three-branch comparison table
|
|
|
+- common-misconception section
|
|
|
+- report-reading path section
|
|
|
+- The guide and historical detail pages are now cross-linked:
|
|
|
+- clicking a rule name in the guide jumps into historical detail with prefilled URL-query filters
|
|
|
+- historical detail page shows the incoming filter source and offers a one-click clear-filters link
|
|
|
+- historical detail page also supports expandable per-trade drilldown rows with quick same-rule navigation
|
|
|
+- expanded detail rows now include previous/next same-branch trade navigation with auto-expand + scroll
|
|
|
+- linked from the shared HTML nav as `指标原理`
|
|
|
+- Historical detail reporting now includes per-trade indicator audit windows.
|
|
|
+- Each expanded row lazily renders buy-date and sell-date `前后 10 个交易日` mini-tables.
|
|
|
+- Fields include `close / a1 / b1 / c1 / KDJ / QL`.
|
|
|
+- Report generation can auto-refresh full indicator coverage through `DragonIndicatorEngine`.
|
|
|
+- Persisted cache file: `dragon_indicator_snapshot_full.csv`.
|
|
|
+- Embedded indicator coverage in detail HTML now reaches `2026-04-03` instead of stopping at `2026-01-30`.
|
|
|
+- Historical detail snapshots now also include per-branch same-window strategy events.
|
|
|
+- Snapshot cards show rule summary plus tagged `真实BUY / 真实SELL / 辅助BUY / 辅助SELL` entries in a `策略事件` column.
|
|
|
+- Historical detail snapshots were then upgraded with a window-level event summary strip.
|
|
|
+- Each snapshot card now summarizes the +/-10 trading-day window using embedded event payloads:
|
|
|
+- total event count
|
|
|
+- counts for `真实BUY / 真实SELL / 辅助BUY / 辅助SELL`
|
|
|
+- nearest event before the marker day
|
|
|
+- same-day event summary
|
|
|
+- nearest event after the marker day
|
|
|
+- Implementation stayed inside `dragon_html_reports.py`; no strategy-core logic was changed.
|
|
|
+- Verified by rerunning:
|
|
|
+- `py -3 -m py_compile dragon_html_reports.py`
|
|
|
+- `py -3 dragon_html_reports.py`
|
|
|
+- and checking both root and archived historical detail HTML for `snapshot-summary` / `总事件` / `前一条` markers.
|
|
|
+- Explicit handoff state for future Codex CLI/session switches:
|
|
|
+- latest finished task is this historical-detail event-summary-strip enhancement
|
|
|
+- refreshed artifacts:
|
|
|
+- `dragon_historical_trade_details.html`
|
|
|
+- `html_reports/dragon_historical_trade_details_2026-04-03.html`
|
|
|
+- this was a reporting/auditability change only, not a strategy or signal-logic change
|
|
|
+
|
|
|
+- A later formal code review on the current production chain found and fixed three practical issues:
|
|
|
+- `dragon_daily_signal_pipeline.py` had two governance monitor metrics hard-coded (`removed_trade_over_removal_count`, `local_sensitivity_robust_case_count`)
|
|
|
+- they now load dynamically from:
|
|
|
+- `dragon_glued_refined_removed_trade_attribution.csv`
|
|
|
+- `dragon_glued_refined_sensitivity.csv`
|
|
|
+- next-bar execution models in both:
|
|
|
+- `dragon_daily_signal_pipeline.py`
|
|
|
+- `dragon_refined_execution_validation.py`
|
|
|
+- no longer silently fall back to same-bar close when no next bar exists
|
|
|
+- missing next-bar execution prices are now `NaN` and excluded by `_apply_execution_model(...)`
|
|
|
+- `dragon_forward_observation_pipeline.py` weekly summary no longer duplicates global warning/divergence counts into every branch row
|
|
|
+- it now adds a separate `system_monitor` row for global monitor-level counts
|
|
|
+- verification reruns completed successfully after these fixes
|
|
|
+
|
|
|
+- Later external review findings were also fixed:
|
|
|
+- `dragon_indicators.py` no longer hard-codes a workstation-only dependency path
|
|
|
+- it now resolves the repo root relative to `__file__` and loads shared dependencies from `<repo>/dragon`
|
|
|
+- `dragon_alpha_first_baseline.py` now filters branch trades by both `buy_date` and `sell_date` against the workbook event window
|
|
|
+- this removes post-window exits from alpha-branch summary statistics
|
|
|
+- alpha-vs-workbook trade-diff generation in the same script was aligned to the same filtered workbook trade set
|
|
|
+- verified result:
|
|
|
+- `dragon_alpha_first_branch_trade_diff.csv` no longer contains the old `2026-01-05 -> 2026-01-20` out-of-window trade
|
|
|
+- `dragon_alpha_first_baseline.md` now reports removed trades `4`
|
|
|
+
|
|
|
+- A later consistency sweep standardized workbook-window trade filtering across the research/evaluation pack.
|
|
|
+- Principle fixed:
|
|
|
+- in workbook-window statistics, trade filters must constrain both `buy_date` and `sell_date`
|
|
|
+- not only `buy_date`
|
|
|
+- Updated scripts include:
|
|
|
+- `dragon_backtest.py`
|
|
|
+- `dragon_cost_stress_test.py`
|
|
|
+- deep-oversold experiment scripts
|
|
|
+- glued/refined candidate and branch-review scripts
|
|
|
+- predictive-break experiment script
|
|
|
+- `dragon_rc1_release.py`
|
|
|
+- `dragon_refined_alpha_attribution.py`
|
|
|
+- `dragon_refined_execution_validation.py`
|
|
|
+- `dragon_rule_ablation.py`
|
|
|
+- short-holding audit / experiment scripts
|
|
|
+- `dragon_strategy_overview.py`
|
|
|
+- `dragon_threshold_perturbation.py`
|
|
|
+- Explicit exception kept:
|
|
|
+- `dragon_daily_signal_pipeline.py` remains live/forward oriented and is not capped by workbook end date
|
|
|
+- representative reruns succeeded after the sweep
|
|
|
+
|
|
|
+- System review closure on `2026-04-05`:
|
|
|
+- fixed the last cross-report inconsistencies by unifying bounded evaluation windows and CAGR year calculations
|
|
|
+- `dragon_alpha_first_baseline.py` now uses the same `2016-01-01 -> 2025-12-31` release window as `dragon_strategy_overview.py` and `dragon_glued_refined_branch_review.py`
|
|
|
+- `dragon_rc1_release.py` and `dragon_refined_execution_validation.py` now derive evaluation years from the window dates instead of hard-coding `10.0`
|
|
|
+- important execution lesson: if `dragon_system_review.py` is run in parallel with its upstream generators, it can temporarily read stale outputs; rerun it after upstream artifacts complete
|
|
|
+- final result after rerun:
|
|
|
+- `dragon_review_branch_metric_consistency.md` shows `0` mismatches
|
|
|
+- `dragon_strategy_overview.csv` is now aligned with the branch-specific summary and release artifacts
|
|
|
+- review focus has shifted from internal metric-definition drift to governance / monitoring interpretation
|
|
|
+
|
|
|
+- Later second-pass review on `2026-04-05` fixed additional governance/reporting defects:
|
|
|
+- in `dragon_alpha_branch_governance.py`, `alignment_cost_gate` no longer incorrectly fails when overlap delta is positive
|
|
|
+- in the same file, an empty removed-trade set no longer fails `removal_quality_gate`
|
|
|
+- the same governance report's final recommendation section now follows `final_decision` instead of always defaulting toward keeping the old alpha branch
|
|
|
+- in `dragon_html_reports.py`, `system_monitor` is now rendered with user-facing Chinese labels instead of raw internal names
|
|
|
+- no new high-severity strategy-core issue was found in that second pass
|
|
|
+
|
|
|
+- The next P1 engineering fix on `2026-04-05` closed the monitor-chain silent-failure gap:
|
|
|
+- `dragon_daily_signal_pipeline.py` now marks missing metric values as `missing_data` instead of blank status
|
|
|
+- `dragon_forward_observation_pipeline.py` now treats `missing_data` as hard-breach-equivalent for monitoring purposes while also tracking a separate `missing_data_count`
|
|
|
+- daily/weekly HTML now expose the missing-metric count, and weekly HTML remains backward-compatible with older observation/divergence logs
|
|
|
+- this means missing upstream research artifacts will now surface explicitly in monitoring rather than appearing as a false clean run
|
|
|
+
|
|
|
+- The next major P2 refactor on `2026-04-05` introduced shared single-source modules:
|
|
|
+- `dragon_shared.py` for evaluation window constants, year calculation, formatting helpers, and profit-factor helper
|
|
|
+- `dragon_execution_common.py` for execution-aware apply/summary/risk-cluster helpers
|
|
|
+- main-chain scripts and core branch-summary scripts were migrated to these shared modules
|
|
|
+- this removed key script-to-script helper imports such as:
|
|
|
+- daily pipeline importing formatting from `dragon_strategy_overview.py`
|
|
|
+- daily pipeline importing execution helpers from `dragon_refined_execution_validation.py`
|
|
|
+- post-refactor system review still reports `0` metric mismatches, so the consolidation did not change quantitative outputs
|
|
|
+
|
|
|
+- Session governance update on `2026-04-05`:
|
|
|
+- the useful code changes for `dragon/v2` were already committed in git as `9f7ce16` with message `Add dragon v2 strategy research and reporting code`
|
|
|
+- user explicitly requires workspace memory files to be committed too, not just kept locally
|
|
|
+- follow-up git work should therefore include `MEMORY.md`, `USER.md`, and daily notes under `memory/` when they contain important session context
|