Files
zszq-trs/YLErpDAL/Modules/SwapModule/FundingLegs/ContractNotionalLeg.cs
T
hjhan 946cbbb66d refactor: InterestLeg 改名 FundingLeg(业界标准 Financing Leg)
命名: InterestLeg→FundingLeg, 消除'interest'与通用'利息'歧义。
Funding精确表达'融资成本'(客户付券商的杠杆成本 spread+FR007)。

改名清单:
- IInterestLegStrategy → IFundingLegStrategy
- InterestLegStrategyFactory → FundingLegStrategyFactory
- InterestLegStrategyTest → FundingLegStrategyTest
- 命名空间 InterestLegs → FundingLegs
- 目录 InterestLegs/ → FundingLegs/
- SwapDealService 引用同步更新

验证: 编译0错误, 全量503测试7失败(基线一致)。
2026-08-11 10:52:04 +08:00

17 lines
755 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 posiLong, decimal posiShort, decimal closePercent)
=> new(posiNotional * closePercent, posiNotional, closePercent);
}