docs: record covariance estimator decision
This commit is contained in:
@@ -33,6 +33,19 @@ component-risk 语义结合,但只保留本项目需要的轻量合同:协
|
||||
component risk 闭合到年化组合波动,percentage contribution 闭合到 1。未来日期、资产
|
||||
标签不完整和零方差组合都直接失败,不以默认值伪造结果。
|
||||
|
||||
## 2026-08-21:协方差快照估计
|
||||
|
||||
| 项目 | 借鉴内容 | 当前决策 |
|
||||
|---|---|---|
|
||||
| [PyPortfolioOpt risk models](https://github.com/PyPortfolio/PyPortfolioOpt/blob/main/pypfopt/risk_models.py) | 将收益输入、协方差估计器和组合优化解耦;sample / EWM / shrinkage 使用统一标签输出 | 借鉴可替换估计器边界,不引入完整包 |
|
||||
| [scikit-learn covariance](https://github.com/scikit-learn/scikit-learn/blob/main/sklearn/covariance/_shrunk_covariance.py) | 维护成熟的 Ledoit–Wolf / OAS shrinkage 实现 | 未来作为可选 adapter;不复制统计公式 |
|
||||
| [Qlib structured risk model](https://github.com/microsoft/qlib/blob/main/qlib/model/riskmodel/structured.py) | PCA/FA 结构化协方差和固定随机状态 | 留作因子风险模型阶段,不进入当前 baseline |
|
||||
|
||||
当前 `estimate_covariance_snapshot` 只编排 pandas 的 sample covariance:先按 `as_of_date`
|
||||
截断,再取固定 session 窗口,使用 complete-case 行并拒绝历史不足;禁止 pandas 默认的
|
||||
pairwise 样本集合产生含义不一致的矩阵。snapshot ID 对窗口数据、缺失掩码、上游数据
|
||||
快照身份和估计参数做 SHA-256,追加未来数据不会改变历史快照。
|
||||
|
||||
## hikyuu 的定位
|
||||
|
||||
[hikyuu](https://github.com/fasiondog/hikyuu) 的 SG / MM / CN / PG 部件化思想、
|
||||
|
||||
Reference in New Issue
Block a user