Merge branch 'glms/feature/1.4.2_0808' of http://git.yiliantech.com/gitlab/otc-dev/zszq-trs into glms/feature/1.4.2_0808

This commit is contained in:
lisong
2026-08-12 10:47:56 +08:00
4 changed files with 181 additions and 19 deletions
+2 -1
View File
@@ -187,7 +187,8 @@
<td>{{formatQuantity(floatPosition.Quantity)}}</td>
<td>
<vue-number-input v-model="floatPosition.TradingFee" v-bind:format="inputFormatInterestAmount" v-on:input="changeTradingFee"></vue-number-input>
<div class="bubble-box" style="margin-left:6px;">我方{{floatPosition.PayDirection==1?"支付":"收取"}}交易费用</div>
@* <div class="bubble-box" style="margin-left:6px;">我方{{floatPosition.PayDirection==1?"支付":"收取"}}交易费用</div> *@
<div class="bubble-box" style="margin-left:6px;">我方收取交易费用</div>
</td>
<td> <vue-number-input v-model="floatPosition.DividendIn" v-bind:format="inputFormatDividend" v-on:input="changeTradingFee"></vue-number-input></td>
<td style="font-size:18px;">{{formatAmount(floatPosition.FloatPnlSum)}}</td>
+6 -5
View File
@@ -6,11 +6,11 @@
bool isShowReCheckClose = ViewBag.IsShowReCheckClose;
bool hideFloatingIncomeDirection = PS.Config.ErpElement.SwapFloatingIncomeReceiveOnlyMode;
}
@section CSS{
@section CSS {
<link rel="stylesheet" href="~/Style/Css/unwindSwapTrade.css?v=@(HtmlUtil.JsVersion)" />
}
@section JS
{
{
<script>
var model = @Json.Serialize(Model);
model.StartDate = model.StartDate ? model.StartDate.substr(0, 10) : "";
@@ -88,7 +88,7 @@
</div>
<div class="form-group col-md-3">
<label class="formlabel">支付日期</label>
<vue-datepicker :mindate="minStartDate" :holiday="1" v-model="deal.PayDate" />
<vue-datepicker :mindate="minStartDate" :holiday="1" v-model="deal.PayDate" />
</div>
<div class="form-group col-md-3">
<label class="formlabel">年化天数</label>
@@ -224,10 +224,11 @@
<td>{{formatQuantity(deal.CloseQty)}}</td>
<td>
<vue-number-input v-model="floatPosition.TradingFee" v-bind:format="inputFormatCloseAmount" v-on:input="changeTradingFee"></vue-number-input>
<div class="bubble-box">我方{{floatPosition.PayDirection==1?"支付":"收取"}}交易费用</div>
@* <div class="bubble-box">我方{{floatPosition.PayDirection==1?"支付":"收取"}}交易费用</div> *@
<div class="bubble-box">我方收取交易费用</div>
</td>
<td>
<vue-number-input v-model="floatPosition.TradingFeePending" v-bind:format="inputFormatEqvNotional" disabled></vue-number-input>
<vue-number-input v-model="floatPosition.TradingFeePending" v-bind:format="inputFormatEqvNotional" disabled></vue-number-input>
</td>
<td>{{formatAmount(floatPosition.DividendIn)}}</td>
<td style="font-size:18px;">{{formatAmount(floatPosition.FloatPnlSum)}}</td>
+2 -1
View File
@@ -507,7 +507,8 @@
</td>
<td>
<vue-number-input v-model="item.PosiTradingFeePending" v-bind:format="inputFormatTradeSinglePriceFixed2"></vue-number-input>
<div class="bubble-box">我方{{item.PosiDirection==1?"支付":"收取"}}交易费用</div>
@* <div class="bubble-box">我方{{item.PosiDirection==1?"支付":"收取"}}交易费用</div> *@
<div class="bubble-box">我方收取交易费用</div>
</td>
</tr>
</tbody>
+171 -12
View File
@@ -61,6 +61,16 @@
<li class="toctree-l3"><a class="reference internal" href="#id5">2.2 差分法</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#id6">3.新增希腊字母指标(利率敏感性指标)</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#delta-r">3.1 Delta_r</a></li>
<li class="toctree-l3"><a class="reference internal" href="#delta-r-1bp">3.2 Delta_r(1BP)</a></li>
<li class="toctree-l3"><a class="reference internal" href="#dv01">3.3 DV01</a></li>
<li class="toctree-l3"><a class="reference internal" href="#gamma-r">3.4 Gamma_r</a></li>
<li class="toctree-l3"><a class="reference internal" href="#gamma-r-1bp">3.5 Gamma_r(1BP)</a></li>
<li class="toctree-l3"><a class="reference internal" href="#vega-r">3.6 Vega_r</a></li>
<li class="toctree-l3"><a class="reference internal" href="#vega-r-1bp">3.7 Vega_r(1BP)</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="model.html">附录2:期权定价方法概述</a></li>
@@ -221,8 +231,8 @@
<tr class="row-even"><td><p>Delta</p></td>
<td><p>设当前标的价格为 <span class="math notranslate nohighlight">\(S\)</span>,设 <span class="math notranslate nohighlight">\(S_\mathrm{u}=S+S_\mathrm{\bigtriangleup},S_\mathrm{d}=S-S_\mathrm{\bigtriangleup}\)</span></p>
<p><span class="math notranslate nohighlight">\(S_\mathrm{u}和S_\mathrm{d}\)</span> 代入定价公式, 得到期权价值 <span class="math notranslate nohighlight">\(V_\mathrm{u}和V_\mathrm{d}\)</span>; 则</p>
<p><span class="math notranslate nohighlight">\(Delta=(V_\mathrm{u}-V_\mathrm{d})/(S*0.01)\)</span></p>
<p>系统中 <span class="math notranslate nohighlight">\(S_\mathrm{\bigtriangleup}\)</span><span class="math notranslate nohighlight">\(0.005*S\)</span></p>
<p><span class="math notranslate nohighlight">\(Delta=(V_\mathrm{u}-V_\mathrm{d})/(2\times S_\mathrm{\bigtriangleup})\)</span></p>
<p>系统中 <span class="math notranslate nohighlight">\(S_\mathrm{\bigtriangleup}\)</span><span class="math notranslate nohighlight">\(0.0001\)</span>(绝对偏移,对应1bp</p>
</td>
</tr>
<tr class="row-odd"><td><p>DeltaCash</p></td>
@@ -232,7 +242,7 @@
<td><p>设当前标的价格为 <span class="math notranslate nohighlight">\(S\)</span>, 期权理论价值为 <span class="math notranslate nohighlight">\(V\)</span>; 设 <span class="math notranslate nohighlight">\(S_\mathrm{u}=S+S_\mathrm{\bigtriangleup},S_\mathrm{d}=S-S_\mathrm{\bigtriangleup}\)</span></p>
<p><span class="math notranslate nohighlight">\(S_\mathrm{u}和S_\mathrm{d}\)</span> 代入定价公式,得到期权价值 <span class="math notranslate nohighlight">\(V_\mathrm{u}和V_\mathrm{d}\)</span>; 则</p>
<p><span class="math notranslate nohighlight">\(Gamma=(V_\mathrm{u}+V_\mathrm{d}-2V)/S_\mathrm{\bigtriangleup}^2\)</span></p>
<p>系统中 <span class="math notranslate nohighlight">\(S_\mathrm{\bigtriangleup}\)</span><span class="math notranslate nohighlight">\(0.01*S\)</span></p>
<p>系统中 <span class="math notranslate nohighlight">\(S_\mathrm{\bigtriangleup}\)</span><span class="math notranslate nohighlight">\(0.0001\)</span>(绝对偏移,对应1bp</p>
</td>
</tr>
<tr class="row-odd"><td><p>GammaCash</p></td>
@@ -242,7 +252,7 @@
<td><p>设当前波动率为𝜎, 设 <span class="math notranslate nohighlight">\(𝜎_\mathrm{u}=𝜎+𝜎_\mathrm{\bigtriangleup},𝜎_\mathrm{d}=𝜎-𝜎_\mathrm{\bigtriangleup}\)</span></p>
<p><span class="math notranslate nohighlight">\(𝜎_\mathrm{u}和𝜎_\mathrm{d}\)</span> 代入定价公式,得到期权价值 <span class="math notranslate nohighlight">\(V_\mathrm{u}和V_\mathrm{d}\)</span>; 则</p>
<p><span class="math notranslate nohighlight">\(Vega=V_\mathrm{u}-V_\mathrm{d}\)</span></p>
<p>系统中 <span class="math notranslate nohighlight">\(𝜎_\mathrm{\bigtriangleup}\)</span> 为 0.5%</p>
<p>系统中 <span class="math notranslate nohighlight">\(𝜎_\mathrm{\bigtriangleup}\)</span> 为 0.0001(绝对偏移,对应1bp</p>
</td>
</tr>
<tr class="row-odd"><td><p>Theta</p></td>
@@ -255,21 +265,170 @@
</td>
</tr>
<tr class="row-even"><td><p>Rho</p></td>
<td><p>设无风险利率为 <span class="math notranslate nohighlight">\(r\)</span>,期权理论价值为 <span class="math notranslate nohighlight">\(V\)</span>; 设 <span class="math notranslate nohighlight">\(r_\mathrm{u}=r+10bp\)</span>;</p>
<td><p>设无风险利率为 <span class="math notranslate nohighlight">\(r\)</span>, 期权理论价值为 <span class="math notranslate nohighlight">\(V\)</span>; 设 <span class="math notranslate nohighlight">\(r_\mathrm{u}=r+1bp\)</span>;</p>
<p><span class="math notranslate nohighlight">\(r_\mathrm{u}\)</span> 代入定价公式,得到期权价值 <span class="math notranslate nohighlight">\(V_\mathrm{u}\)</span>;则</p>
<p><span class="math notranslate nohighlight">\(Rho=(V_\mathrm{u}-V)/10bp\)</span></p>
<p><span class="math notranslate nohighlight">\(Rho = V_\mathrm{u} - V\)</span></p>
</td>
</tr>
<tr class="row-odd"><td><p>亚式期权Delta</p></td>
<td><p>设当前已观察到的标的平均价格为 <span class="math notranslate nohighlight">\(S_\mathrm{A}\)</span>, 设 <span class="math notranslate nohighlight">\(S_\mathrm{A_\mathrm{u}}=S_\mathrm{A}+S_\mathrm{A_\mathrm{\bigtriangleup}}\)</span></p>
<p><span class="math notranslate nohighlight">\(S_\mathrm{A_\mathrm{u}}\)</span> 代入定价公式,得到期权价值 <span class="math notranslate nohighlight">\(V_\mathrm{u}\)</span>; 则</p>
<p><span class="math notranslate nohighlight">\(Delta=(V_\mathrm{u}-V)/S_\mathrm{A_\mathrm{\bigtriangleup}}\)</span></p>
<p>系统中 <span class="math notranslate nohighlight">\(S_\mathrm{A_\mathrm{\bigtriangleup}}\)</span><span class="math notranslate nohighlight">\(0.01*S_\mathrm{A}\)</span></p>
</td>
<tr class="row-odd"><td><p>RhoQ</p></td>
<td><p>计算逻辑同 Rho</p></td>
</tr>
</tbody>
</table>
</section>
<section id="id6">
<span id="new-greeks"></span><h2>3.新增希腊字母指标(利率敏感性指标)<a class="headerlink" href="#id6" title="Permalink to this headline"></a></h2>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>以下指标<strong>仅适用于</strong>利率收益率、利率债/信用债/其他债券、债券指数、国债期货四类资产。其他资产类别<strong>不计算</strong>这些指标,数值留空。</p>
</div>
<section id="delta-r">
<h3>3.1 Delta_r — 期权对利率的敏感性<a class="headerlink" href="#delta-r" title="Permalink to this headline"></a></h3>
<table class="docutils align-default">
<colgroup>
<col style="width: 20%" />
<col style="width: 15%" />
<col style="width: 65%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>资产类型</p></th>
<th class="head"><p>代表标的</p></th>
<th class="head"><p>公式</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>利率收益率</p></td>
<td><p>GB10</p></td>
<td><p><span class="math notranslate nohighlight">\(Delta\_r = -Delta\)</span></p></td>
</tr>
<tr class="row-odd"><td><p>利率债/信用债/其他债券</p></td>
<td><p>210210.IB</p></td>
<td><p><span class="math notranslate nohighlight">\(Delta\_r = Delta \times P \times D\)</span></p></td>
</tr>
<tr class="row-even"><td><p>债券指数</p></td>
<td><p>CBA00621.CS</p></td>
<td><p><span class="math notranslate nohighlight">\(Delta\_r = Delta \times P \times D\)</span></p></td>
</tr>
<tr class="row-odd"><td><p>国债期货</p></td>
<td><p>TS2609</p></td>
<td><p><span class="math notranslate nohighlight">\(Delta\_r = Delta \times P \times D / CF\)</span></p></td>
</tr>
</tbody>
</table>
<div class="admonition note">
<p class="admonition-title">Note</p>
<ul class="simple">
<li><p><strong>P</strong>:债券/债券指数在计算日的全价/价格</p></li>
<li><p><strong>D</strong>:债券/债券指数在计算日的修正久期(债券指数使用平均市值法久期)</p></li>
<li><p><strong>CF</strong>:国债期货对应CTD债券的转换因子</p></li>
</ul>
</div>
</section>
<section id="delta-r-1bp">
<h3>3.2 Delta_r(1BP) — 利率变动1BP时Delta_r的变动<a class="headerlink" href="#delta-r-1bp" title="Permalink to this headline"></a></h3>
<p>适用于全部四种资产类型:</p>
<p><span class="math notranslate nohighlight">\(Delta\_r(1BP) = Delta\_r \times 0.0001\)</span></p>
</section>
<section id="dv01">
<h3>3.3 DV01 — 利率变动1BP时期权价值变动(基点价值)<a class="headerlink" href="#dv01" title="Permalink to this headline"></a></h3>
<p>适用于全部四种资产类型,与 Delta_r(1BP) 等价:</p>
<p><span class="math notranslate nohighlight">\(DV01 = Delta\_r(1BP)\)</span></p>
</section>
<section id="gamma-r">
<h3>3.4 Gamma_r — 期权对利率的二阶敏感性<a class="headerlink" href="#gamma-r" title="Permalink to this headline"></a></h3>
<table class="docutils align-default">
<colgroup>
<col style="width: 20%" />
<col style="width: 15%" />
<col style="width: 65%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>资产类型</p></th>
<th class="head"><p>代表标的</p></th>
<th class="head"><p>公式</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>利率收益率</p></td>
<td><p>GB10</p></td>
<td><p><span class="math notranslate nohighlight">\(Gamma\_r = Gamma\)</span></p></td>
</tr>
<tr class="row-odd"><td><p>利率债/信用债/其他债券</p></td>
<td><p>210210.IB</p></td>
<td><p><span class="math notranslate nohighlight">\(Gamma\_r = Delta \times P \times C + (P \times D)^2 \times Gamma\)</span></p></td>
</tr>
<tr class="row-even"><td><p>债券指数</p></td>
<td><p>CBA00621.CS</p></td>
<td><p><span class="math notranslate nohighlight">\(Gamma\_r = Delta \times P \times C + (P \times D)^2 \times Gamma\)</span></p></td>
</tr>
<tr class="row-odd"><td><p>国债期货</p></td>
<td><p>TS2609</p></td>
<td><p><span class="math notranslate nohighlight">\(Gamma\_r = Delta \times P \times C / CF + (P \times D / CF)^2 \times Gamma\)</span></p></td>
</tr>
</tbody>
</table>
<div class="admonition note">
<p class="admonition-title">Note</p>
<ul class="simple">
<li><p><strong>C</strong>:债券/债券指数的凸性(债券指数使用平均市值法凸性)</p></li>
<li><p>P、D、CF 含义同 3.1 节</p></li>
</ul>
</div>
</section>
<section id="gamma-r-1bp">
<h3>3.5 Gamma_r(1BP) — 利率变动1BP时Gamma_r的变动<a class="headerlink" href="#gamma-r-1bp" title="Permalink to this headline"></a></h3>
<p>适用于全部四种资产类型:</p>
<p><span class="math notranslate nohighlight">\(Gamma\_r(1BP) = Gamma\_r \times 0.0001^2\)</span></p>
</section>
<section id="vega-r">
<h3>3.6 Vega_r — 期权对利率波动率的敏感性<a class="headerlink" href="#vega-r" title="Permalink to this headline"></a></h3>
<table class="docutils align-default">
<colgroup>
<col style="width: 20%" />
<col style="width: 15%" />
<col style="width: 65%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>资产类型</p></th>
<th class="head"><p>代表标的</p></th>
<th class="head"><p>公式</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>利率收益率</p></td>
<td><p>GB10</p></td>
<td><p><span class="math notranslate nohighlight">\(Vega\_r = Vega\)</span></p></td>
</tr>
<tr class="row-odd"><td><p>利率债/信用债/其他债券</p></td>
<td><p>210210.IB</p></td>
<td><p><span class="math notranslate nohighlight">\(Vega\_r = Vega \times D \times ytm\)</span></p></td>
</tr>
<tr class="row-even"><td><p>债券指数</p></td>
<td><p>CBA00621.CS</p></td>
<td><p><span class="math notranslate nohighlight">\(Vega\_r = Vega \times D \times ytm\)</span></p></td>
</tr>
<tr class="row-odd"><td><p>国债期货</p></td>
<td><p>TS2609</p></td>
<td><p><span class="math notranslate nohighlight">\(Vega\_r = Vega \times D \times ytm\)</span>D和ytm使用对应CTD券的值)</p></td>
</tr>
</tbody>
</table>
<div class="admonition note">
<p class="admonition-title">Note</p>
<ul class="simple">
<li><p><strong>ytm</strong>:债券/债券指数在计算日的到期收益率(债券指数使用平均市值法到期收益率)</p></li>
<li><p>D 含义同 3.1 节(修正久期)</p></li>
</ul>
</div>
</section>
<section id="vega-r-1bp">
<h3>3.7 Vega_r(1BP) — 利率波动率变动1BP时Vega_r的变动<a class="headerlink" href="#vega-r-1bp" title="Permalink to this headline"></a></h3>
<p>适用于全部四种资产类型:</p>
<p><span class="math notranslate nohighlight">\(Vega\_r(1BP) = Vega\_r \times 0.0001\)</span></p>
</section>
</section>
</section>
</section>