删除单笔名义本金风控指标

This commit is contained in:
吴方海
2025-04-24 17:40:48 +08:00
parent cb8e7be009
commit 7efc82a79f
2 changed files with 14 additions and 50 deletions
@@ -3302,20 +3302,20 @@ namespace YLErp.Modules.RiskModule
#endregion
#region
//交易-名义本金
_quotaSettings.Add(new QuotaSetting()
{
QuotaType = QuotaTypeEnum.TRADE,
QuotaRange = 0,
QuotaIndex = "名义本金",
QuotaLowerLimit = null,
QuotaUpperLimit = null,
WarningLowerLimit = null,
WarningUpperLimit = null,
Percent = false,
IsValid = true,
Status = QuotaSettingApprovalStatus.Valid,
});
////交易-名义本金
//_quotaSettings.Add(new QuotaSetting()
//{
// QuotaType = QuotaTypeEnum.TRADE,
// QuotaRange = 0,
// QuotaIndex = "名义本金",
// QuotaLowerLimit = null,
// QuotaUpperLimit = null,
// WarningLowerLimit = null,
// WarningUpperLimit = null,
// Percent = false,
// IsValid = true,
// Status = QuotaSettingApprovalStatus.Valid,
//});
//交易-互换价格偏离比例
_quotaSettings.Add(new QuotaSetting()
@@ -5186,18 +5186,6 @@ namespace YLErp.Modules.RiskModule
var tag = $"{tag_prefix}({checkItem.quotaType})";
switch (checkItem.quotaType)
{
case "名义本金":
var clientPv = positionList.Where(s => s.ClientId == current.ClientId && s.UnderlyingCode == current.UnderlyingCode && s.Side != current.Side).Sum(s => s.Pv * (s.Side == 0 ? 1 : -1));
var currentPv = current.Pv * (current.Side == 0 ? 1 : -1);
currentValue = Convert.ToDouble(Math.Abs(clientPv + currentPv));
var posiPv = positionList.Where(s => s.ClientId == current.ClientId && s.UnderlyingCode == current.UnderlyingCode && !s.Current).Sum(s => s.Pv);
posiVal = Convert.ToDouble(posiPv);
checkItem.currentValue = Math.Round(currentValue ?? 0, 2);
if (!ValidateQuoteResult(checkItem, currentValue, posiVal))
{
return checkItem;
}
return null;
case "互换价格偏离比例":
var sportPrice = Convert.ToDouble(current.Price);
var basePrice = Convert.ToDouble(current.LastPrice);
@@ -1557,30 +1557,6 @@ var colModel_trade = [
align: 'left',
optionHide: true,
sortable: false,
}, {
name: 'StockEqvNotional',
label: '名义本金',
index: 'StockEqvNotional',
width: 120,
align: 'right',
sortable: false,
formatter: function (cellvalue, options, rowObject) {
return !cellvalue || cellvalue == "NaN" ? "" : cellvalue.toLocaleString();
},
cellattr: function (cellvalue, options, rowObject) {
var style = "style='" + checkQuota(rowObject, 'StockEqvNotional') + "'";
return style;
}
}, {
name: 'Quota_StockEqvNotional_Upper',
label: '名义本金限额',
index: 'Quota_StockEqvNotional_Upper',
width: 120,
align: 'right',
sortable: false,
formatter: function (cellvalue, options, rowObject) {
return formatQuotaAbs(rowObject, 'StockEqvNotional');
}
}, {
name: 'Quota_SwapPercent_Upper',
label: '互换价格偏离比例限额',