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失败(基线一致)。
This commit is contained in:
@@ -11,7 +11,7 @@ using YLErp.Modules.DataProviderModule;
|
||||
using YLErp.Modules.EodModule;
|
||||
using YLErp.Modules.TradeModule;
|
||||
using YLErp.Modules.TradeModule.DealModule;
|
||||
using YLErp.Modules.SwapModule.InterestLegs;
|
||||
using YLErp.Modules.SwapModule.FundingLegs;
|
||||
using YLErp.Modules.SwapModule.Margin;
|
||||
using YLErp.QdpModule;
|
||||
|
||||
@@ -905,7 +905,7 @@ namespace YLErp.Modules.SwapModule
|
||||
|
||||
/// <summary>
|
||||
/// 根据计息模式计算名义本金。
|
||||
/// 融资腿(mode 1/2/9)已委托 InterestLegStrategyFactory;保证金(mode 5/6)和
|
||||
/// 融资腿(mode 1/2/9)已委托 FundingLegStrategyFactory;保证金(mode 5/6)和
|
||||
/// 半禁用的多空存续(mode 7/8)暂保留原逻辑,待 Margin 上下文接入后再迁出。
|
||||
/// </summary>
|
||||
private (decimal close, decimal posi, decimal closePct) CalcNotionalByMode(swap_position position, decimal closePercent, decimal posiNotional, decimal posiLong, decimal posiShort)
|
||||
@@ -917,7 +917,7 @@ namespace YLErp.Modules.SwapModule
|
||||
|| mode == InterestModeEnum.合约名义本金规模
|
||||
|| mode == InterestModeEnum.标的期初全价)
|
||||
{
|
||||
var r = InterestLegStrategyFactory.Get(mode)
|
||||
var r = FundingLegStrategyFactory.Get(mode)
|
||||
.CalcNotional(position.InterestPrincipalFix, posiNotional, posiLong, posiShort, closePercent);
|
||||
return (r.ClosePrincipal, r.PosiPrincipal, r.ClosePercent);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user