using YLErp.DBModels; namespace YLErp.Modules.SwapModule.InterestLegs; /// /// 合约名义本金规模利息腿(InterestMode=合约名义本金规模)。 /// 站在"合约规模"视角:平仓本金 = 剩余名义本金 × 平仓比例。 /// 与标的期初全价(9)在 CalcNotionalByMode 里公式相同,差异在衡泰路径 grossPrice 折算和 EOD 复利反推。 /// public sealed class ContractNotionalLeg : IInterestLegStrategy { public InterestModeEnum Mode => InterestModeEnum.合约名义本金规模; public NotionalResult CalcNotional(decimal fix, decimal posiNotional, decimal posiLong, decimal posiShort, decimal closePercent) => new(posiNotional * closePercent, posiNotional, closePercent); }