using YLErp.DBModels; namespace YLErp.Modules.SwapModule.FundingLegs; /// /// 标的期初全价融资腿(InterestMode=标的期初全价)。 /// 计息基数 = 标的期初含费全价(PosiGrossPrice/EntryDirtyPrice) × 数量。 /// "期初(Entry)"是关键——建仓时点的全价,非当前估值全价。 /// 主路径 CalcNotionalByMode 公式与合约名义本金规模(2)相同; /// 衡泰回执折算路径(原 SwapDealService.GetUnwindInterestsByHT 乘 grossPrice 折算)已随死链清理移除; /// 以及 EOD 复利部分平仓后直接返回剩余本金(禁止反推,SwapEodPositionService:1458-1465)。 /// public sealed class UnderlyingEntryFullPriceLeg : IFundingLegStrategy { public InterestModeEnum Mode => InterestModeEnum.标的期初全价; public NotionalResult CalcNotional(decimal fix, decimal posiNotional, decimal closePercent) => new(posiNotional * closePercent, posiNotional, closePercent); }