From fc90636ab4c8e7fc9ea8871f91aca7947f15017f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=94=A6=E9=BA=9F=20=E7=8E=8B?= Date: Wed, 1 Jul 2026 15:20:24 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BD=93=E5=A4=A9=E5=88=A9=E6=81=AF=E7=AB=AF?= =?UTF-8?q?=E5=BE=85=E5=AE=9E=E7=8E=B0=E9=80=BB=E8=BE=91=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E4=B8=BA=20=3D=20=E4=B8=8A=E4=B8=80=E5=A4=A9=E5=BE=85=E5=AE=9E?= =?UTF-8?q?=E7=8E=B0=20+=20=E5=BD=93=E5=A4=A9=E4=BA=A7=E7=94=9F=E7=9A=84?= =?UTF-8?q?=E5=88=A9=E6=81=AF=20-=20flowEvents=E7=9A=84=E5=88=A9=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Modules/SwapModule/SwapEodPositionService.cs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/YLErpDAL/Modules/SwapModule/SwapEodPositionService.cs b/YLErpDAL/Modules/SwapModule/SwapEodPositionService.cs index 1fa4c2ad..7f676dd1 100644 --- a/YLErpDAL/Modules/SwapModule/SwapEodPositionService.cs +++ b/YLErpDAL/Modules/SwapModule/SwapEodPositionService.cs @@ -830,11 +830,13 @@ namespace YLErp.Modules.SwapModule newEodPayPosition.TdCloseInterest = flowEvents.Sum(x => x.InterestAmount); newEodPayPosition.TdCloseInterestFee = newEodPayPosition.TdInterestFee; //持仓内容-利息腿-损益统计(本方视角) - newEodPayPosition.TdInterestIncome = newEodPayPosition.TdCloseInterest; - // 互换日待实现应扣减当日实现的全程利息(TdCloseInterest)。 - // 原公式 pre + TdInterestIncome - TdCloseInterest 中 TdInterestIncome==TdCloseInterest 会抵消, - // 导致待实现不变(互换结清后没归零)。改为直接 pre - TdCloseInterest。 - newEodPayPosition.InterestIncomeSum = eodPayPosition.InterestIncomeSum - newEodPayPosition.TdCloseInterest; + var intersetAcmount = newEodPayPosition.TdInterestPrincipal * (newEodPayPosition.TdInterestRate + newEodPayPosition.FloatRate); + if (position.IsAnnualized) + { + intersetAcmount /= tradeExtend.AnnualDays; + } + newEodPayPosition.TdInterestIncome = intersetAcmount;// 要算一下当天产生的利息 + newEodPayPosition.InterestIncomeSum = eodPayPosition.InterestIncomeSum + newEodPayPosition.TdInterestIncome - newEodPayPosition.TdCloseInterest; //上一天待实现 + 当天产生的利息 - flowEvents的利息 newEodPayPosition.InterestFeeSum = eodPayPosition.InterestFeeSum + newEodPayPosition.TdInterestFee - newEodPayPosition.TdCloseInterestFee; newEodPayPosition.InterestProfitSum = newEodPayPosition.InterestIncomeSum + newEodPayPosition.InterestFeeSum; //持仓价值