- 移除 SwapDealService.AutoSwapUnwindFromConsumer 及其私有辅助 GetUnwindInterestsByHT(全仓零调用方,随山证 v2.3.0 拷贝引入后从未接线) - git rm 删除仅被该死链引用的 HengTaiModel/SwapUnwindReq.cs(全仓零引用) - 修正 UnderlyingEntryFullPriceLeg.cs 中指向已删方法的文档注释 - 保留真实平仓路径 DealUnwind / CalcCloseAmount 等共享活代码
20 lines
987 B
C#
20 lines
987 B
C#
using YLErp.DBModels;
|
||
|
||
namespace YLErp.Modules.SwapModule.FundingLegs;
|
||
|
||
/// <summary>
|
||
/// 标的期初全价融资腿(InterestMode=标的期初全价)。
|
||
/// 计息基数 = 标的期初含费全价(PosiGrossPrice/EntryDirtyPrice) × 数量。
|
||
/// "期初(Entry)"是关键——建仓时点的全价,非当前估值全价。
|
||
/// 主路径 CalcNotionalByMode 公式与合约名义本金规模(2)相同;
|
||
/// 衡泰回执折算路径(原 SwapDealService.GetUnwindInterestsByHT 乘 grossPrice 折算)已随死链清理移除;
|
||
/// 以及 EOD 复利部分平仓后直接返回剩余本金(禁止反推,SwapEodPositionService:1458-1465)。
|
||
/// </summary>
|
||
public sealed class UnderlyingEntryFullPriceLeg : IFundingLegStrategy
|
||
{
|
||
public InterestModeEnum Mode => InterestModeEnum.标的期初全价;
|
||
|
||
public NotionalResult CalcNotional(decimal fix, decimal posiNotional, decimal closePercent)
|
||
=> new(posiNotional * closePercent, posiNotional, closePercent);
|
||
}
|