Files
zszq-trs/YLErpDAL/Modules/SwapModule/FundingLegs/ContractNotionalLeg.cs
T
hjhan 70550af29a refactor(funding-leg): 清理CalcNotional死参数posiLong/posiShort+修正过时InterestMode注释
- 删除 IFundingLegStrategy.CalcNotional 的 posiLong/posiShort 死参数(多空存续腿界面已禁用,三个实现均不读取),同步三个实现签名、SwapDealService 唯一调用点、FundingLegStrategyTest 7 处调用
- 修正 SwapPosition/SwapFlowEvent/EodSwapPosition 的 InterestMode 字段注释(去掉已删的 3/4,补全 5/6/9)
- 重写 SwapUnwindFloatingLegDiagnosticTdd 过时类注释

零行为变化;编译 0 错误;FundingLegStrategyTest 11/11 通过。
2026-08-13 08:51:21 +08:00

17 lines
718 B
C#

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