命名: InterestLeg→FundingLeg, 消除'interest'与通用'利息'歧义。 Funding精确表达'融资成本'(客户付券商的杠杆成本 spread+FR007)。 改名清单: - IInterestLegStrategy → IFundingLegStrategy - InterestLegStrategyFactory → FundingLegStrategyFactory - InterestLegStrategyTest → FundingLegStrategyTest - 命名空间 InterestLegs → FundingLegs - 目录 InterestLegs/ → FundingLegs/ - SwapDealService 引用同步更新 验证: 编译0错误, 全量503测试7失败(基线一致)。
18 lines
673 B
C#
18 lines
673 B
C#
using YLErp.DBModels;
|
|
using YLErp.Modules.SwapModule.FundingLegs;
|
|
|
|
namespace YLErp.Modules.SwapModule.FundingLegs;
|
|
|
|
/// <summary>
|
|
/// 固定值融资腿(InterestMode=固定值)。
|
|
/// 计息基数由合约约定(InterestPrincipalFix),无论平仓比例多少都恒等于该值。
|
|
/// 业务规则:固定值就是合同写死的固定值,永远不变。
|
|
/// </summary>
|
|
public sealed class FixedNotionalLeg : IFundingLegStrategy
|
|
{
|
|
public InterestModeEnum Mode => InterestModeEnum.固定值;
|
|
|
|
public NotionalResult CalcNotional(decimal fix, decimal posiNotional, decimal posiLong, decimal posiShort, decimal closePercent)
|
|
=> new(fix, fix, 1m);
|
|
}
|