## 2026-04-05 - Started the quasi-production phase after the formal research and governance pack was completed on `2026-04-04`. - The next practical objective shifted from further historical tuning to: - freeze the current best branch as `RC1` - generate daily signals on live-updated data - generate a monitoring snapshot against formal thresholds - Added `dragon_rc1_release.py`. - Generated: - `dragon_rc1_release.md` - `dragon_rc1_config_snapshot.json` - `RC1` was frozen from branch `alpha_first_glued_refined_hot_cap`. - Frozen headline: - trades `91` - win_rate `52.75%` - avg_return `3.42%` - profit_factor `5.11` - compounded `1424.12%` - CAGR `31.31%` - max_drawdown `-12.79%` - Added `dragon_daily_signal_pipeline.py`. - 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 archive copies under `daily_reports/` - Live data fetch was validated through `akshare -> data_fetcher_v2 -> dragon_indicators`. - Request date was `2026-04-05`, but the actual latest available market bar was correctly identified as `2026-04-03`. - This avoids treating the weekend as a trading day. - Daily branch status on latest available bar `2026-04-03`: - refined branch `alpha_first_glued_refined_hot_cap`: flat - control branch `alpha_first_selective_veto`: flat - latest real event for both branches: `2026-02-13 SELL knife_take_profit_2_glued` - latest bar values: - close `3317.184` - a1 `-0.0157` - b1 `-0.1435` - c1 `47.26` - latest bar had no new real or aux events for either branch - Monitoring snapshot on `2026-04-03` after fixing the drawdown-threshold direction: - warnings `0` - hard breaches `0` - next_open avg_return delta vs control `+0.53%` - next_open profit_factor 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%` - A small implementation bug was found and fixed: - `dragon_strategy_monitoring_template.csv` had the drawdown threshold direction wrong for negative drawdown values - it was corrected from `>=` to `<=` - after rerun, monitoring status became fully `ok` - Practical workspace status after this step: - the best branch is now frozen as `RC1` - daily signal production is runnable - daily monitoring is runnable - the project is ready to move into forward observation / daily tracking rather than more in-sample tuning - Continued immediately into the forward-observation layer. - Patched `dragon_daily_signal_pipeline.py` so `as_of_request_date` is dynamic rather than hard-coded. - Added `dragon_forward_observation_pipeline.py`. - Generated: - `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` - plus dated CSV archives under `forward_reports/` - First forward-observation snapshot on latest bar `2026-04-03`: - both refined and control branches remained flat - same latest real event: `2026-02-13|SELL|knife_take_profit_2_glued` - divergence level `none` - signal change log only contains initial `branch_initialized` records for both branches - monitor history now has the first dated row-set with all metrics in `ok` - Practical implication: - the project now has: - frozen `RC1` - daily signal generation - daily monitor generation - cumulative forward observation log - branch divergence tracking - monitor history with streak counters - weekly forward summary scaffold - next work should focus on accumulating real forward observations rather than changing the strategy core - Added formal HTML reporting pages on top of the forward-observation layer. - `dragon_daily_signal_pipeline.py` now emits three-strategy daily status including: - `workbook_preserving` - `alpha_first_selective_veto` - `alpha_first_glued_refined_hot_cap` - `dragon_forward_weekly_summary.csv` now also includes all three strategies. - Rebuilt `dragon_html_reports.py` to generate: - `dragon_reports_index.html` - `dragon_daily_signal_report.html` - `dragon_forward_weekly_review.html` - dated archive copies under `html_reports/` - `html_reports/index.html` - Verified the HTML files are proper UTF-8 text; prior Chinese mojibake came from PowerShell display, not file corruption. - Fixed HTML internal-link bug: - root pages and archived pages now use different relative link maps - links inside `html_reports/` no longer incorrectly point to nested `html_reports/html_reports/...` - Added next-step presentation upgrade: - index page now includes headline RC1 summary cards - index page now includes inline equity and yearly-return charts - added one-click refresh script `update_dragon_reports.ps1` - Added HTML versions of the Chinese usage docs: - `dragon_html_report_usage_cn.html` - `dragon_html_report_quickstart_cn.html` - these are now linked from the main HTML index page and from the shared top navigation - archived copies are also generated into `html_reports/` - Added historical full-trade detail outputs for all three strategies: - `dragon_historical_trade_details.csv` - `dragon_historical_trade_details.html` - dated archive CSV in `daily_reports/` - dated archive HTML in `html_reports/` - Detail fields now include: - buy/sell date - buy/sell price - buy/sell reason - holding days - return_pct - capital_before - pnl_amount - capital_after - Daily report and index page now both link directly to the historical detail page for audit use. - Added investor-facing indicator/strategy theory guide: - source markdown: `dragon_indicator_strategy_guide_cn.md` - html page: `dragon_indicator_strategy_guide_cn.html` - archived html copy in `html_reports/` - Upgraded the investor-facing guide page into a fuller illustrated explainer. - Added sections: - `指标速查卡` - `按市场状态来理解指标` - `详细指标值与触发举例` - `常见真实买卖规则速查表` - `三版本当前统计对照` - `普通投资者最容易误解的 4 件事` - `看完原理后,下一步看哪里` - Verified that both `dragon_indicator_strategy_guide_cn.html` and `html_reports/dragon_indicator_strategy_guide_cn.html` contain the new sections and still include the 3 SVG diagrams. - The guide now also includes RC1-oriented rule tables with: - representative real BUY / SELL rules - typical trigger ranges / event conditions - historical occurrence counts from `dragon_historical_trade_details.csv` - Added cross-page drilldown: - rule names in `dragon_indicator_strategy_guide_cn.html` now link directly to `dragon_historical_trade_details*.html` - links carry URL params for `branch=alpha_first_glued_refined_hot_cap` plus rule keyword - historical detail page now reads `branch/year/keyword` from query parameters and auto-applies filters on load - historical detail page also now shows a visible source banner when opened from a filtered deep link - added a `清空筛选,查看完整明细` link that resets back to the plain page path - historical detail page was further upgraded with expandable per-trade detail rows - each trade now has: - `详情 / 收起` toggle - verdict, point-difference, equivalent units, holding bucket - quick links for same buy rule / same sell rule / same strategy-year / full detail - Added adjacent-trade navigation inside expanded detail rows: - `上一笔同策略交易` - `下一笔同策略交易` - clicking adjacent-trade links expands the target row and scrolls to it - linked from index, daily report, and the shared top navigation as `指标原理` - Historical detail HTML was upgraded again for audit depth. - Each expanded trade row now includes: - `买入日前后 10 个交易日` - `卖出日前后 10 个交易日` - Snapshot fields: - `date` - marker (`买入日` / `卖出日`) - `close` - `a1` - `b1` - `c1` - `KDJ` - `QL` - Snapshots are rendered on demand when a row is expanded, not pre-expanded for all trades. - `dragon_html_reports.py` now auto-loads indicator coverage for this page: - first tries local snapshot coverage - if coverage is insufficient, fetches and recomputes full history through `DragonIndicatorEngine` - writes `dragon_indicator_snapshot_full.csv` - uses an in-process cache so root + archived historical detail pages only fetch once per rebuild - Verified final embedded indicator coverage now reaches `2026-04-03`. - This fixes the earlier detail-page gap where embedded indicator rows stopped at `2026-01-30`. - Historical detail HTML was upgraded one more step from indicator-only snapshots to audit snapshots. - Each snapshot card now also shows: - rule summary in the card header - same-window strategy events for the current branch - event tags distinguish: - `真实BUY` - `真实SELL` - `辅助BUY` - `辅助SELL` - `dragon_html_reports.py` now rebuilds branch event payloads for: - `workbook_preserving` - `alpha_first_selective_veto` - `alpha_first_glued_refined_hot_cap` - these event payloads are rendered inside the snapshot mini-table as a new `策略事件` column - Historical detail snapshots were upgraded again with a window-level event summary strip. - In each buy/sell snapshot card, `dragon_html_reports.py` now computes from embedded `eventMap`: - total event count in the +/-10 trading-day window - counts for `真实BUY / 真实SELL / 辅助BUY / 辅助SELL` - nearest event before the marker day - same-day event summary - nearest event after the marker day - The summary is rendered as `.snapshot-summary` under the mini-table and above the indicator note. - Rebuild verification completed successfully: - `py -3 -m py_compile dragon_html_reports.py` - `py -3 dragon_html_reports.py` - verified root and archived historical detail HTML both contain the new summary script/output markers: - `snapshot-summary` - `总事件` - `前一条 / 当日 / 后一条` - Handoff note for future Codex CLI/session switch: - latest completed UI/reporting change is the historical-detail snapshot event-summary strip in `dragon_html_reports.py` - generated outputs already refreshed: - `dragon_historical_trade_details.html` - `html_reports/dragon_historical_trade_details_2026-04-03.html` - status: - implemented - rebuilt - verified - scope remained reporting-only; no strategy-core or branch-logic changes were made in this step - A formal code review was then run on the current productionized chain: - `dragon_strategy.py` - `dragon_daily_signal_pipeline.py` - `dragon_forward_observation_pipeline.py` - `dragon_refined_execution_validation.py` - `dragon_html_reports.py` - Main findings fixed immediately: - daily monitor no longer hard-codes `removed_trade_over_removal_count=0` and `local_sensitivity_robust_case_count=52` - these two metrics are now loaded dynamically from: - `dragon_glued_refined_removed_trade_attribution.csv` - `dragon_glued_refined_sensitivity.csv` - next-bar execution models no longer silently fall back to same-bar close when the next bar is missing - missing next-bar prices are now set to `NaN`, then excluded inside `_apply_execution_model(...)` - `_summary(...)` and `_risk_cluster(...)` were hardened for empty post-filter trade sets - weekly summary no longer repeats global warning/divergence counts inside every branch row - `dragon_forward_weekly_summary.csv` now keeps branch rows branch-local and adds a separate `system_monitor` row for global monitor/divergence counts - Verification rerun completed: - `py -3 -m py_compile dragon_daily_signal_pipeline.py dragon_refined_execution_validation.py dragon_forward_observation_pipeline.py dragon_html_reports.py` - `py -3 dragon_daily_signal_pipeline.py` - `py -3 dragon_forward_observation_pipeline.py` - `py -3 dragon_refined_execution_validation.py` - External review findings were then fixed: - `dragon_indicators.py` no longer depends on hard-coded workstation path `D:\\work\\project\\cyb50-quant\\dragon` - it now resolves repo root from `__file__` and imports dependencies from `/dragon` - `dragon_alpha_first_baseline.py` now trims trades by both: - `buy_date` - `sell_date` - against workbook event window, so post-window exits are excluded from branch summary stats - also aligned alpha-vs-workbook trade diff to the same filtered workbook trade set - verified after rerun: - `py -3 -m py_compile dragon_indicators.py dragon_alpha_first_baseline.py` - `py -3 dragon_alpha_first_baseline.py` - `py -3 dragon_daily_signal_pipeline.py` - confirmed: - `dragon_alpha_first_branch_trade_diff.csv` no longer contains `2026-01-05 -> 2026-01-20` - `dragon_alpha_first_baseline.md` now reports removed trades `4` instead of the stale `5` - A broader workbook-window consistency sweep was then completed across evaluation/research scripts. - Rule used for this sweep: - if a script is generating in-sample / workbook-window research statistics, trade filtering must constrain both: - `buy_date` - `sell_date` - not just `buy_date` - Files updated in this sweep: - `dragon_backtest.py` - `dragon_cost_stress_test.py` - `dragon_deep_oversold_confirmation_experiments.py` - `dragon_deep_oversold_experiments.py` - `dragon_deep_oversold_selective_veto_experiments.py` - `dragon_equity_curve_review.py` - `dragon_glued_alpha_candidate.py` - `dragon_glued_refined_branch_review.py` - `dragon_glued_refined_removed_trade_attribution.py` - `dragon_glued_refined_sensitivity.py` - `dragon_glued_refine_experiments.py` - `dragon_predictive_break_experiments.py` - `dragon_rc1_release.py` - `dragon_refined_alpha_attribution.py` - `dragon_refined_execution_validation.py` - `dragon_rule_ablation.py` - `dragon_short_holding_audit.py` - `dragon_short_holding_experiments.py` - `dragon_strategy_overview.py` - `dragon_threshold_perturbation.py` - Explicit non-sweep exception: - `dragon_daily_signal_pipeline.py` remained live-oriented and was not upper-bounded by workbook end date on purpose - Regression verification completed: - full `py_compile` passed for all updated scripts - representative reruns passed for: - `dragon_backtest.py` - `dragon_strategy_overview.py` - `dragon_rc1_release.py` - `dragon_refined_execution_validation.py` - `dragon_cost_stress_test.py` - `dragon_rule_ablation.py` - `dragon_threshold_perturbation.py` - `dragon_glued_refined_branch_review.py` - `dragon_glued_refined_sensitivity.py` - `dragon_glued_alpha_candidate.py` - `dragon_short_holding_audit.py` - System review closure completed later on `2026-04-05`. - Root cause of the remaining review warnings was confirmed to be metric-window inconsistency, not strategy-core divergence. - `dragon_alpha_first_baseline.py` was further aligned to the same bounded release window used by the main summary pack: - `2016-01-01` to `2025-12-31` - This removed the stale real-BUY overlap drift caused by the workbook terminal `2026-01-05` BUY event being counted in only one report family. - CAGR-year consistency was also unified: - `dragon_rc1_release.py` no longer hard-codes `10.0` years - `dragon_refined_execution_validation.py` no longer hard-codes `10.0` years - both now derive evaluation years from the release window dates, matching `dragon_strategy_overview.py` - Important operational lesson: - the first rerun of `dragon_system_review.py` was launched in parallel with upstream generators, so it briefly read stale outputs - rerunning `dragon_system_review.py` after upstream artifacts finished removed the false residual mismatches - Final verified review state after the sequential rerun: - `dragon_review_branch_metric_consistency.md` -> mismatches `0` - `dragon_alpha_first_branch_summary.csv` -> workbook `105/105`, alpha `101/101` - `dragon_strategy_overview.csv` -> fully aligned with branch summaries - `dragon_rc1_config_snapshot.json` CAGR -> aligned with `dragon_strategy_overview.csv` - `dragon_system_review_final.md` now classifies `dragon_strategy_overview.csv` as directly trustable - Remaining caution is now report interpretation / forward monitoring, not internal metric-definition drift. - A second-pass governance/reporting review was completed after system-review closure. - Confirmed and fixed two real governance/reporting issues: - `dragon_alpha_branch_governance.py` - fixed `alignment_cost_gate` so it only blocks on overlap loss worse than `-8`; positive overlap improvements no longer fail the gate by mistake - fixed `removal_quality_gate` so an empty removed-trade set no longer fails promotion automatically - fixed the final `## Recommendation` section so it now matches `final_decision` instead of always biasing toward “keep current alpha” - `dragon_html_reports.py` - normalized `system_monitor` display labels from internal raw names to user-facing Chinese labels - removed the ad-hoc post-dict assignment for `BRANCH_ROLES["system_monitor"]` - verification rerun completed: - `py -3 -m py_compile dragon_alpha_branch_governance.py dragon_html_reports.py` - `py -3 dragon_alpha_branch_governance.py` - `py -3 dragon_html_reports.py` - current reviewed judgment: - no new high-severity strategy-core issue found in this second pass - remaining items are mainly governance-threshold choices and presentation polish, not signal correctness defects - The highest-priority remaining engineering risk was then fixed: - monitor-chain missing values no longer pass silently - `dragon_daily_signal_pipeline.py` - `_compare_numeric(...)` now returns `missing_data` for `NaN` - monitor rows no longer get blank status when `actual_value` is missing - daily monitor summary now reports: - `warning_count` - `hard_breach_count` where `missing_data` is treated as hard-breach-equivalent - `missing_data_count` - `dragon_forward_observation_pipeline.py` - monitor summary now carries `missing_data_count` and includes `missing_data` inside `hard_breach_count` - monitor change log now tracks `monitor_missing_data_count_changed` - monitor history `hard_breach_streak` now also counts `missing_data` - observation log and divergence log now persist `monitor_missing_data_count` / `missing_data_count` - `dragon_html_reports.py` - added `missing_data` badge color - daily/weekly HTML now display `缺失指标数` - weekly HTML is backward-compatible with older logs that do not yet contain the new column - verification completed: - `py -3 -m py_compile dragon_daily_signal_pipeline.py dragon_forward_observation_pipeline.py dragon_html_reports.py dragon_system_review.py` - `py -3 dragon_daily_signal_pipeline.py` - `py -3 dragon_forward_observation_pipeline.py` - `py -3 dragon_html_reports.py` - `py -3 dragon_system_review.py` - direct function-level verification: - `daily._compare_numeric(float('nan'), ...) -> 'missing_data'` - forward monitor summary treats `missing_data` as part of hard-breach-equivalent count - P2 single-source refactor was then executed on the main reporting/evaluation chain. - Added shared modules: - `dragon_shared.py` - centralizes `START_DATE`, `END_DATE`, `evaluation_years(...)`, `profit_factor(...)`, `format_pct(...)`, `format_num(...)` - `dragon_execution_common.py` - centralizes execution-aware `apply_execution_model(...)`, `summary(...)`, `risk_cluster(...)` - Main-chain scripts migrated to shared modules: - `dragon_strategy_overview.py` - `dragon_rc1_release.py` - `dragon_refined_execution_validation.py` - `dragon_daily_signal_pipeline.py` - `dragon_cost_stress_test.py` - `dragon_equity_curve_review.py` - Also migrated core branch-summary family scripts: - `dragon_alpha_first_baseline.py` - `dragon_glued_refined_branch_review.py` - `dragon_glued_refined_sensitivity.py` - Important structural improvement: - daily/RC1 scripts no longer import formatting helpers from `dragon_strategy_overview.py` - daily signal pipeline no longer imports execution helpers from `dragon_refined_execution_validation.py` - instead both use dedicated shared modules - Verification reruns completed: - `py -3 -m py_compile` passed for shared modules and migrated scripts - reruns passed for: - `dragon_strategy_overview.py` - `dragon_rc1_release.py` - `dragon_refined_execution_validation.py` - `dragon_daily_signal_pipeline.py` - `dragon_cost_stress_test.py` - `dragon_equity_curve_review.py` - `dragon_alpha_first_baseline.py` - `dragon_glued_refined_branch_review.py` - `dragon_glued_refined_sensitivity.py` - `dragon_system_review.py` - Post-refactor consistency check: - `dragon_review_branch_metric_consistency.md` still shows `Mismatches: 0` - `dragon_strategy_overview.csv`, `dragon_alpha_first_branch_summary.csv`, `dragon_glued_refined_branch_summary.csv`, and `dragon_rc1_config_snapshot.json` remain aligned - Session persistence note: - the useful `dragon/v2` code changes were already committed as git commit `9f7ce16` (`Add dragon v2 strategy research and reporting code`) - user then explicitly required that workspace memory files must also be committed, otherwise future sessions may lose context - immediate next git action should be a separate memory-only commit covering `MEMORY.md`, `USER.md`, and the daily memory files