refactor(eod): MtmCalc.BlendPrice提取加权均价混合(候选J)

4处内联 (prevPrice*prevQty + sum) / total → MtmCalc.BlendPrice(...)
SwapModule零回归(7基线/510通过)

候选K(单点TdRealizedPnL)/L(2处guard差InterestType)/M(2处guard)/N(单点)为低频,
提取收益不足以抵消新增方法的开销, 暂不提取
This commit is contained in:
hjhan
2026-08-12 15:03:00 +08:00
parent dbdc975da4
commit 8419d53421
2 changed files with 8 additions and 4 deletions
@@ -23,4 +23,8 @@ public static class MtmCalc
/// <summary>浮动端总未实现盈亏 = 盯市盈亏 + 分红 + 待结费用。原 4 处内联收口到此。</summary>
public static decimal ReturnLegProfitSum(decimal mtmPnl, decimal dividendSum, decimal feePending)
=> mtmPnl + dividendSum + feePending;
/// <summary>加权均价混合:(昨日均价×昨日量 + 今日∑(量×均额)) / 总量。原 4 处内联收口到此。</summary>
public static decimal BlendPrice(decimal prevPrice, decimal prevQty, decimal sumQtyTimesPrice, decimal totalQty)
=> (prevPrice * prevQty + sumQtyTimesPrice) / totalQty;
}