fix(swap): 开平仓费用 取反

This commit is contained in:
张名锐
2026-08-26 18:23:47 +08:00
parent b0804e6e92
commit 5c0c8a8506
@@ -194,7 +194,7 @@ namespace YLErp.Modules.SwapModule
string structureType,
decimal notionalValue,
DateTime? startDate,
DateTime? maturityDate,
DateTime? ExerciseDate,
decimal periodAmount,
int dividendPayDate)
{
@@ -245,7 +245,7 @@ namespace YLErp.Modules.SwapModule
InitialPrice = initialPrice,
NotionalQuantity = notionalValue,
ContractStartDate = startDate,
ContractMaturityDate = maturityDate,
ContractMaturityDate = ExerciseDate,
// 只要普通利息腿存在 FR007,即按需求显示 FR007;保证金腿不影响该展示基准。
InterestBenchmark = ordinaryInterests.Any(x =>
!string.IsNullOrWhiteSpace(x.FloatRateUnderlyingCode)
@@ -253,8 +253,10 @@ namespace YLErp.Modules.SwapModule
? "FR007" : "固定利率",
// 使用日终当日实际适用的 TdInterestRate 合计,而非合同初始利率或利差字段。
InterestRatePrice = ordinaryInterests.Sum(x => x.TdInterestRate),
OpeningClosingFee = openingClosingFee,
OpeningClosingFee = -openingClosingFee,
// 合约浮动端待实现收益
FloatingUnrealizedPnl = floatingUnrealizedPnl,
// 合约利息端待实现收益
OrdinaryInterestPnl = ordinaryInterestPnl,
MarginInterestAmount = marginInterestAmount,
MarginInterestGain = marginInterests