-
diff --git a/YLErpWeb/Views/margin_template_v2/margin_template_v2DefaultList.cshtml b/YLErpWeb/Views/margin_template_v2/margin_template_v2DefaultList.cshtml
index e02d5c15..680712c7 100644
--- a/YLErpWeb/Views/margin_template_v2/margin_template_v2DefaultList.cshtml
+++ b/YLErpWeb/Views/margin_template_v2/margin_template_v2DefaultList.cshtml
@@ -21,6 +21,7 @@
标准SPAN: "11",
买入自动赎回规则1: "12",
卖出自动赎回规则1: "13",
+ 区间追保结构: "15",
};
var g_grid = {};
@@ -113,6 +114,9 @@
else if (cellValue == MarginRuleTypeEnum.卖出自动赎回规则1) {
return "卖出自动赎回规则1";
}
+ else if (cellValue == MarginRuleTypeEnum.区间追保结构) {
+ return "区间追保结构";
+ }
return "";
}
diff --git a/YLErpWeb/Views/margin_template_v2/margin_template_v2Edit.cshtml b/YLErpWeb/Views/margin_template_v2/margin_template_v2Edit.cshtml
index f4cc8e2b..03dee11a 100644
--- a/YLErpWeb/Views/margin_template_v2/margin_template_v2Edit.cshtml
+++ b/YLErpWeb/Views/margin_template_v2/margin_template_v2Edit.cshtml
@@ -80,6 +80,13 @@
}
else
{
+ @*预付金模板V2迁移:本部署(TRS)只开放 无预付金 和 区间追保结构 两种规则(2026-08 按业务要求)。
+ 原"其他公司显示完整规则列表"的代码以注释形式保留在下方,如需恢复取消注释即可。*@
+
+ @* 原完整规则列表(保留备查):
+ *@
}
@@ -127,6 +135,16 @@
+
diff --git a/YLErpWeb/Views/margin_template_v2/margin_template_v2List.cshtml b/YLErpWeb/Views/margin_template_v2/margin_template_v2List.cshtml
index 53fd5988..b9c69371 100644
--- a/YLErpWeb/Views/margin_template_v2/margin_template_v2List.cshtml
+++ b/YLErpWeb/Views/margin_template_v2/margin_template_v2List.cshtml
@@ -26,6 +26,7 @@
标准SPAN: "11",
买入自动赎回规则1: "12",
卖出自动赎回规则1: "13",
+ 区间追保结构: "15",
};
var g_grid = {};
@@ -119,6 +120,9 @@
else if (cellValue == MarginRuleTypeEnum.卖出自动赎回规则1) {
return "卖出自动赎回规则1";
}
+ else if (cellValue == MarginRuleTypeEnum.区间追保结构) {
+ return "区间追保结构";
+ }
else if (cellValue == MarginRuleTypeEnum.单独计算规则) {
return "单独计算规则";
}
diff --git a/YLErpWeb/wwwroot/Scripts/app/marginTemplate/marginTemplateV2DefaultEdit.js b/YLErpWeb/wwwroot/Scripts/app/marginTemplate/marginTemplateV2DefaultEdit.js
index f543215b..26c09da6 100644
--- a/YLErpWeb/wwwroot/Scripts/app/marginTemplate/marginTemplateV2DefaultEdit.js
+++ b/YLErpWeb/wwwroot/Scripts/app/marginTemplate/marginTemplateV2DefaultEdit.js
@@ -1,4 +1,4 @@
-//定价格式化(来自配置)
+//定价格式化(来自配置)
const inputFormatPercent = Object.freeze({ precision: 2, append: '%' });
const inputFormatPercentNegative = Object.freeze({ precision: 2, append: '%', negative: true });
const inputFormatNegative = Object.freeze({ precision: 2, negative: true });
@@ -18,12 +18,14 @@ const MarginRuleTypeEnum = {
标准SPAN: "11",
买入自动赎回规则1: "12",
卖出自动赎回规则1: "13",
+ 区间追保结构: "15",
默认预付金规则: "99"
};
const UnderlyingSeperateTypeEnum = {
None: "0",//不区分
- CustomStock: "1"//按自定义权益分类
+ CustomStock: "1",//按自定义权益分类
+ CustomInstrumentType: "2"//按资产类型分类
};
const vue = new Vue({
@@ -92,6 +94,9 @@ const vue = new Vue({
case MarginRuleTypeEnum.卖出自动赎回规则1:
this.marginTemplate.Comments = "名义本金*Max(x,y-0.5*虚值比例)+ Flag*Max(0,PV);\n其中虚值比例 = max(0, P - 执行价)/期初价格,当计算日为成交日时,Flag = 0,P = 期初价格,当计算日不为成交日时,Flag = 1,P = 标的现价;\n若勾选了“取与保底金额孰小”,则取较小的一个;\n保底金额 =ABS(执行价格 - 保底价格)* ABS(交易数量)。";
break;
+ case MarginRuleTypeEnum.区间追保结构:
+ this.marginTemplate.Comments = "预付金占用为名义本金的固定比例。支持按标的资产类型(利率债/信用债/其它债券/股票/股指等全部资产类型)分别设置初始预付金率x、维持预付金率y;以期初净价为基准,按(x-y)逐档推算预警线/平仓线,标的价格触及档位线时触发追保或平仓。";
+ break;
case MarginRuleTypeEnum.默认预付金规则:
this.marginTemplate.Comments = "考虑了14种场景下的Span算法与Delta算法比较的通用预付金规则,该规则可以调整Span涨跌幅度";
break;
@@ -108,6 +113,8 @@ const vue = new Vue({
if (this.marginTemplate.UnderlyingSeperateType == UnderlyingSeperateTypeEnum.None) {
this.marginTemplate.UnderlyingSeperateComments = "无论挂钩标的代码为何,都采用同一套参数";
+ } else if (this.marginTemplate.UnderlyingSeperateType == UnderlyingSeperateTypeEnum.CustomInstrumentType) {
+ this.marginTemplate.UnderlyingSeperateComments = "按标的的资产类型分类:在每组参数中选择适用的资产类型(利率债/信用债/其它债券/股票/股指/商品期货等全部资产类型),按标的资产类型匹配对应参数组的初始预付金率x、维持预付金率y。";
} else {
this.marginTemplate.UnderlyingSeperateComments = "把所有标的根据代码所属区间段自动分为4类:\n【1-指数】沪深指数;\n【2-个股/ETF-核准制发行】主板股票、非科创版ETF;\n【3-个股/ETF-非核准制发行】科创版股票、科创版ETF、创业板股票;\n【4-其他】所有不满足以上分类的。";
}
@@ -127,6 +134,7 @@ const vue = new Vue({
needDetailRules.push(MarginRuleTypeEnum.标准SPAN);
needDetailRules.push(MarginRuleTypeEnum.买入自动赎回规则1);
needDetailRules.push(MarginRuleTypeEnum.卖出自动赎回规则1);
+ needDetailRules.push(MarginRuleTypeEnum.区间追保结构);
needDetailRules.push(MarginRuleTypeEnum.默认预付金规则);
if (needDetailRules.indexOf(that.marginTemplate.RuleType.toString()) >= 0) {
new Promise((reslove) => {
diff --git a/YLErpWeb/wwwroot/Scripts/app/marginTemplate/marginTemplateV2Edit.js b/YLErpWeb/wwwroot/Scripts/app/marginTemplate/marginTemplateV2Edit.js
index dda28f4b..a176d959 100644
--- a/YLErpWeb/wwwroot/Scripts/app/marginTemplate/marginTemplateV2Edit.js
+++ b/YLErpWeb/wwwroot/Scripts/app/marginTemplate/marginTemplateV2Edit.js
@@ -1,4 +1,4 @@
-//定价格式化(来自配置)
+//定价格式化(来自配置)
const inputFormatPercent = Object.freeze({ precision: 2, append: '%' });
const inputFormatPercentNegative = Object.freeze({ precision: 2, append: '%', negative: true });
const inputFormatNegative = Object.freeze({ precision: 2, negative: true });
@@ -18,6 +18,7 @@ const MarginRuleTypeEnum = {
标准SPAN: "11",
买入自动赎回规则1: "12",
卖出自动赎回规则1: "13",
+ 区间追保结构: "15",
单独计算规则: "98"
};
@@ -79,6 +80,9 @@ const vue = new Vue({
case MarginRuleTypeEnum.卖出自动赎回规则1:
this.marginTemplate.Comments = "名义本金*Max(x,y-0.5*虚值比例)+ Flag*Max(0,PV);\n其中虚值比例 = max(0, P - 执行价)/期初价格,当计算日为成交日时,Flag = 0,P = 期初价格,当计算日不为成交日时,Flag = 1,P = 标的现价;\n若勾选了“取与保底金额孰小”,则取较小的一个;\n保底金额 =ABS(执行价格 - 保底价格)* ABS(交易数量)。";
break;
+ case MarginRuleTypeEnum.区间追保结构:
+ this.marginTemplate.Comments = "预付金占用为名义本金的固定比例。以期初净价为基准,按(初始预付金率x-维持预付金率y)逐档推算预警线/平仓线,标的价格触及档位线时触发追保或平仓。";
+ break;
case MarginRuleTypeEnum.单独计算规则:
this.marginTemplate.Comments = "基于宏源定制的预付金规则,用于计算单笔交易,不参与Span预付金规则的轧差。";
break;
@@ -108,6 +112,7 @@ const vue = new Vue({
needDetailRules.push(MarginRuleTypeEnum.标准SPAN);
needDetailRules.push(MarginRuleTypeEnum.买入自动赎回规则1);
needDetailRules.push(MarginRuleTypeEnum.卖出自动赎回规则1);
+ needDetailRules.push(MarginRuleTypeEnum.区间追保结构);
needDetailRules.push(MarginRuleTypeEnum.单独计算规则1);
if (needDetailRules.indexOf(that.marginTemplate.RuleType.toString()) >= 0) {
new Promise((reslove) => {