Files
zszq-trs/YLErpDAL/Modules/SwapModule/FundingLegs/FixedAmountLeg.cs
T
hjhan e35a738d2e refactor(funding-leg): 修复2个类名+补DividendCalc注释
采纳命名审查建议(优先级最高的2项):

1. UnderlyingFullPriceLeg → UnderlyingEntryFullPriceLeg
   补齐'期初(Entry)'——建仓时点全价, 非当前全价, 金融上是不同计息口径

2. FixedNotionalLeg → FixedAmountLeg
   去掉误导性的Notional——'固定值'是合同写死的数额, 不一定是名义本金,
   避免与ContractNotionalLeg的Notional概念撞车

3. DividendCalc 补充注释: 业务含义(债券票息+股票分红统一用Dividend)、
   税务口径(还原不含税再扣税)、命名保持理由

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

18 lines
767 B
C#

using YLErp.DBModels;
namespace YLErp.Modules.SwapModule.FundingLegs;
/// <summary>
/// 固定值融资腿(InterestMode=固定值)。
/// 计息基数由合约约定(InterestPrincipalFix),无论平仓比例多少都恒等于该值。
/// 业务规则:固定值就是合同写死的固定数额(Amount),永远不变。
/// 不叫 FixedNotionalLeg——"固定值"不一定是"名义本金(Notional)",避免与 ContractNotionalLeg 概念撞车。
/// </summary>
public sealed class FixedAmountLeg : IFundingLegStrategy
{
public InterestModeEnum Mode => InterestModeEnum.固定值;
public NotionalResult CalcNotional(decimal fix, decimal posiNotional, decimal posiLong, decimal posiShort, decimal closePercent)
=> new(fix, fix, 1m);
}