using YLErp.DBModels; namespace YLErp.Modules.SwapModule.InterestLegs; /// /// 标的期初全价利息腿(InterestMode=标的期初全价)。 /// 站在"持仓全价"视角:计息基数 = 标的含费全价(PosiGrossPrice/EntryDirtyPrice) × 数量。 /// 主路径 CalcNotionalByMode 公式与合约名义本金规模(2)相同; /// 差异在衡泰路径会乘 grossPrice 折算(SwapDealService.GetUnwindInterestsByHT), /// 以及 EOD 复利部分平仓后直接返回剩余本金(禁止反推,SwapEodPositionService:1458-1465)。 /// public sealed class UnderlyingFullPriceLeg : IInterestLegStrategy { public InterestModeEnum Mode => InterestModeEnum.标的期初全价; public NotionalResult CalcNotional(decimal fix, decimal posiNotional, decimal posiLong, decimal posiShort, decimal closePercent) => new(posiNotional * closePercent, posiNotional, closePercent); }