hjhan
cbe5b58577
refactor: 新增 DirectionRatio 方向因子纯函数, 替换7处三元式
多空方向(PositionType==Long?1:-1)和收付方向(xxx==收取?1:-1)
在两个上帝类里重复 15+处, +1/-1 写反是常见 bug 源。
新增 ReturnLegs/DirectionRatio.cs:
- LongShort(positionType): 多头=+1, 空头=-1
- ReceivePay(direction): 收取=+1, 支付=-1
替换:
- SwapEodPositionService: 6处 shortRatio 三元式(含注释1处)
- SwapDealService: 1处 shortRatio + 1处 directionRatio
验证: 编译0错误, 全量511测试7失败(基线一致)。
2026-08-11 12:30:53 +08:00
..
2025-07-18 17:44:58 +08:00
2026-04-27 15:34:12 +08:00
2024-05-09 14:06:26 +08:00
2026-07-07 15:47:17 +08:00
2026-08-11 12:30:53 +08:00
2026-03-11 15:04:10 +08:00
2024-05-09 14:06:26 +08:00
2024-05-09 14:06:26 +08:00
2026-07-21 15:28:17 +08:00
2026-06-26 09:13:37 +08:00
2024-05-09 14:06:26 +08:00
2024-05-09 14:06:26 +08:00
2026-07-23 18:30:05 +08:00
2026-06-26 09:13:37 +08:00