refactor(swap): 误导布尔 swap 改名 interestWindowEmpty——按"计息窗口为空"本质命名
InitInterestDate 返回 true 的语义是"计息窗口为空→不计利息"(利率与金额归零), 判定只看日期窗口(interestStart>interestEnd)、与事件类型无关;旧名 swap 把 典型原因(互换当日已结息)当成了效果的名字,读者会误读为事件类型判断。 - SwapDealService: GetInterests 局部变量 + GetFloatRate/CalcUnwindInterest/ InitSwapDealInterest/CalcMarginInterest 四个签名参数及分支/日志/注释同步 - SwapTradeBaseService.InitInterestDate 返回值语义补入 XML 文档 - MarginInterestGoldenReplay/Shadow 测试命名参数同步 零行为变更。 验证:相关套件 51/51;全量 978 例 145 败与基线 diff=0
This commit is contained in:
@@ -128,7 +128,7 @@ namespace UnitTestProject.Modules.SwapModule.Margin
|
||||
newEvt = svc.CalcMarginInterest(td, valueDate, valueDate, posClone, rate,
|
||||
pos.InterestPrincipalFix, pos.InterestPrincipalFix, 1.0m,
|
||||
annualDays, calcFirst, calcLast, preEod,
|
||||
(int)SwapEventTypeEnum.自动互换, add: false, settment: true, swap: false);
|
||||
(int)SwapEventTypeEnum.自动互换, add: false, settment: true, interestWindowEmpty: false);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user