计算指标可配置

This commit is contained in:
yexuzhong
2026-07-31 14:49:52 +08:00
parent f7e7aaa373
commit 633cd7d32d
8 changed files with 112 additions and 11 deletions
@@ -472,7 +472,7 @@ namespace YLErp.Modules.EodModule
r.DeltaLots = (r.Delta ?? 0) / um.ContractSize;
}
r.Rho *= 100;
greeksHandleService.Handle(r);
greeksHandleService.Handle(r,um);
if (r.trade == null)
{
r.TradeSinglePrice = r.etcTradePrice / r.TradeAmount;
@@ -1206,7 +1206,7 @@ namespace YLErp.Modules.EodModule
}
r.Rho *= 100;
greeksHandleService.Handle(r);
greeksHandleService.Handle(r,um);
r.CountRatio = um.CountRatio;
r.TradeOriginalAmount = r.OriginalNotional / um.CountRatio;
r.etcTradePrice = ConsTrade.TradeTypesForHedge.Contains(r.TradeType)
@@ -4,6 +4,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
using YLErp.Model;
using YLErp.Modules.CalculationModule;
namespace YLErp.Modules.EodModule
{
@@ -19,10 +20,22 @@ namespace YLErp.Modules.EodModule
}
public void Handle(EodPositionRisksDTO dto)
public void Handle(EodPositionRisksDTO dto,underlying_manager um)
{
//对Delta_r Delta_r_1bp Dv01 Gamma_r Gamma_r_1bp Vega_r Vega_r_1bp
if ("GB10".Equals(um.UnderlyingCode))
{
dto.Delta_r = dto.Delta * -1;
}
}
public void Handle(trade td,TradeValueResult calRes)
{
calRes.Delta_r = calRes.Delta * -1;
}
}
}