- 删除 IFundingLegStrategy.CalcNotional 的 posiLong/posiShort 死参数(多空存续腿界面已禁用,三个实现均不读取),同步三个实现签名、SwapDealService 唯一调用点、FundingLegStrategyTest 7 处调用 - 修正 SwapPosition/SwapFlowEvent/EodSwapPosition 的 InterestMode 字段注释(去掉已删的 3/4,补全 5/6/9) - 重写 SwapUnwindFloatingLegDiagnosticTdd 过时类注释 零行为变化;编译 0 错误;FundingLegStrategyTest 11/11 通过。
20 lines
955 B
C#
20 lines
955 B
C#
using YLErp.DBModels;
|
||
|
||
namespace YLErp.Modules.SwapModule.FundingLegs;
|
||
|
||
/// <summary>
|
||
/// 标的期初全价融资腿(InterestMode=标的期初全价)。
|
||
/// 计息基数 = 标的期初含费全价(PosiGrossPrice/EntryDirtyPrice) × 数量。
|
||
/// "期初(Entry)"是关键——建仓时点的全价,非当前估值全价。
|
||
/// 主路径 CalcNotionalByMode 公式与合约名义本金规模(2)相同;
|
||
/// 差异在衡泰路径会乘 grossPrice 折算(SwapDealService.GetUnwindInterestsByHT),
|
||
/// 以及 EOD 复利部分平仓后直接返回剩余本金(禁止反推,SwapEodPositionService:1458-1465)。
|
||
/// </summary>
|
||
public sealed class UnderlyingEntryFullPriceLeg : IFundingLegStrategy
|
||
{
|
||
public InterestModeEnum Mode => InterestModeEnum.标的期初全价;
|
||
|
||
public NotionalResult CalcNotional(decimal fix, decimal posiNotional, decimal closePercent)
|
||
=> new(posiNotional * closePercent, posiNotional, closePercent);
|
||
}
|