Files
zszq-trs/YLErpDAL/Modules/SwapModule/FundingLegs/UnderlyingEntryFullPriceLeg.cs
T
hjhan c0ac749e5b refactor(swap): 删除未接线的衡泰平仓消费死链 AutoSwapUnwindFromConsumer
- 移除 SwapDealService.AutoSwapUnwindFromConsumer 及其私有辅助
  GetUnwindInterestsByHT(全仓零调用方,随山证 v2.3.0 拷贝引入后从未接线)
- git rm 删除仅被该死链引用的 HengTaiModel/SwapUnwindReq.cs(全仓零引用)
- 修正 UnderlyingEntryFullPriceLeg.cs 中指向已删方法的文档注释
- 保留真实平仓路径 DealUnwind / CalcCloseAmount 等共享活代码
2026-08-14 15:14:09 +08:00

20 lines
987 B
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
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);
}