Skip to content

已弃用 (2026-05-25) —— 该算子是 Layer-1 变换、非 Layer-0 原子输入,已并入 sortino_ratio_v1。保留作历史。

做什么(One-liner)

Sortino 比率 —— 只惩罚下行波动的风险调整后收益。Sharpe 的非对称修正版。库级 primitive,候选 Canvas 节点。

怎么用

python
from services.algo.time_series import sortino_ratio
sortino = sortino_ratio(returns, risk_free_rate=0.02)

核心公式

excess = returns - rf/252
downside = [x for x in excess if x < 0]
sortino = mean(excess) / std(downside, ddof=0) × √252

零 downside → 0.0。

假设与适用场景

假设:日频 + 252 年化 + MAR=0(not custom target)。

适用:厚尾 / 偏斜 / hedge fund-style 策略。

不适用:intraday、全正收益序列、n<30。

已知局限

  1. MAR 硬编码 0(不支持 custom target return)
  2. 零 downside clamp 0(修复 BUG-GOLDEN-001 做法)
  3. 与 Sharpe 共享年化因子假设

参考文献

Sortino & Price (1994) + Rollinger-Hoffman (2013) 计算陷阱指南。

Golden Test

tests/golden/fixtures/tier1/sortino_ratio/,1e-12 tolerance,2026-04-20 passing。

Changelog

  • 1.0.0 (2026-04-20) — 首次 Active,BUG-GOLDEN-001 修复

Verifiable intelligence for the decisions that demand scrutiny.