hjhan
431ac9b502
feat(accrual): 新增 AccrueCompoundPeriod + 影子测试(3个全过)
第3步迁移: CalcDailyCompoundInterest(盘中复利多日)。
新增纯函数 AccrueCompoundPeriod:
- 从 PosiStartDate 到 endDate 全程重放
- 每个重置日并本金: principal + replayed interest
- 末日(endDate)为重置日且 resetCarryInterest!=0 时用存量替代
- consumedInterest × closePercent 在末尾扣除
- 分段模型替代逐日循环, 段内本金恒定+利率恒定
影子测试(3个,全过):
- 固定利率全平+末日重置日: 旧新一致
- 部分平仓30%+consumedInterest扣除: 旧新一致
- 算头算尾(calcMode=11): 旧新一致
清理: 删除 SwapInterestAccrueCompoundInArrearsTest(半成品残留,
依赖已回退的 SwapInterest 签名)。
修复: SwapInterestAccrueCompoundInArrearsTest 缺 using(已随文件删除)。
验证: 编译0错误, 全量520测试7失败(基线一致)。
4个CalcDaily*方法的新架构纯函数全部就绪, 旧方法暂保留对比。
2026-08-12 09:48:49 +08:00
..
2026-08-12 09:48:49 +08:00
2025-08-29 14:43:24 +08:00
2026-08-11 11:24:05 +08:00
2026-08-12 06:13:38 +08:00
2026-08-11 16:59:22 +08:00
2026-08-11 17:09:13 +08:00
2024-05-09 14:06:26 +08:00
2026-08-10 18:01:37 +08:00
2025-09-11 14:18:51 +08:00
2026-08-12 07:05:41 +08:00
2024-05-09 14:06:26 +08:00
2026-07-23 11:06:50 +08:00
2026-08-11 09:23:01 +08:00
2026-08-12 07:05:41 +08:00
2026-07-03 08:22:27 +08:00
2026-08-11 16:59:22 +08:00
2026-08-11 09:40:48 +08:00
2026-08-06 17:45:43 +08:00
2025-04-14 16:31:35 +08:00
2026-07-29 14:42:03 +08:00
2026-07-23 11:06:50 +08:00
2026-08-07 19:44:01 +08:00
2026-07-21 15:28:14 +08:00
2026-07-22 16:51:40 +08:00
2024-05-09 14:06:26 +08:00
2024-05-09 14:06:26 +08:00
2026-01-26 17:35:56 +08:00
2026-07-23 11:06:50 +08:00
2026-08-11 17:09:13 +08:00
2026-08-11 19:23:21 +08:00
2024-05-09 14:06:26 +08:00
2024-05-09 14:06:26 +08:00
2024-06-04 18:19:49 +08:00