# ============================================================ # 报告与图表输出配置(★ 可直接修改) # 对应 plan.md §33/§34:K线与交易点、策略研究页面 # 约定:固定格式 HTML,单文件自包含,离线可开,无 CDN 依赖 # ============================================================ version: 1 templates_dir: templates output_dir: output assets_dir: assets theme: light # light | dark | auto offline_assets: true # 禁止 CDN;图表库必须来自本地 assets/ # 图表库引用方式: # shared —— 输出 output/assets/echarts.min.js 并相对引用(默认,体积小、生成快) # inline —— 直接内联进每个 HTML(单文件可携带,但每份约 +1MB) asset_mode: shared include_sql_provenance: true # 页脚展示数据来源 SQL + run_id,便于复现 # ------------------------------------------------------------ # 图表开关(plan.md §33 的四联图 + §28 的绩效图) # ------------------------------------------------------------ charts: # 个股页:K线 / 股息率 / PE / PB / 回撤 共享 X 轴四联图 kline_signals: true # 回测页 equity_curve: true drawdown: true yearly_returns: true monthly_heatmap: true rolling_metrics: true sector_exposure: true position_weights: true # 画像页 yield_percentile: true yield_histogram: true financial_trend: true # 研究页 sensitivity_heatmap: true walkforward_compare: true # ------------------------------------------------------------ # 固定输出命名(可预测路径) # # 注意:静态报告统一输出到 reports/ 子目录,与统一前端(output/index.html # + output/app/)分离 —— 站点根只保留前端入口,避免几十份报告平铺在一起。 # 资源引用(assets/echarts.min.js)会按子目录深度自动补 ../。 # ------------------------------------------------------------ # 文件名一律带执行 id:同一天用同一 asof 跑多次会产生多条数据库记录, # 若文件名只按 asof 命名,后一次会覆盖前一次的报告,与「每次运行都留痕」矛盾。 # 注意:index 是「静态报告目录的索引」,必须放在 reports/ 下。 # 站点根 output/index.html 归统一前端(web/index.html)所有 —— # 早期把两者都指向 index.html,导致跑一次 `audit --html` 就把前端首页覆盖成静态索引。 naming: index: "reports/index.html" audit: "reports/data_audit_{date}.html" universe: "reports/universe_{asof}_{run_id}.html" profile: "reports/profile_{symbol}_{asof}_{run_id}.html" backtest: "reports/backtest_{run_id}.html" walkforward: "reports/walkforward_{wf_id}.html" sensitivity: "reports/sensitivity_{sens_id}.html" # 注:策略说明报告(plan.md §36)属第四版扩展(P8),尚未实现, # 因此不在此声明命名 —— 配置不应承诺不存在的产物。 # ------------------------------------------------------------ # 页面排版参数 # ------------------------------------------------------------ layout: # 内容最大宽度(px) max_width: 1440 # 表格分页大小 table_page_size: 100 # K 线默认展示天数 kline_default_days: 1500 # 净值曲线是否归一化到 1.0 normalize_nav: true # 数值小数位 decimals: ratio: 4 money: 2 price: 2