656 lines
36 KiB
Plaintext
656 lines
36 KiB
Plaintext
@using YLErp.DBModels.Helpers;
|
||
@using System;
|
||
@using System.Linq;
|
||
@using System.Collections.Generic;
|
||
@using YLErp.DBModels;
|
||
@using YLErp.DBModels.Enums;
|
||
|
||
@model IEnumerable<trade>
|
||
|
||
<style type="text/css">
|
||
table { display: block; text-align: center; }
|
||
#head { background-color: #9D9D9D; }
|
||
.wrap { width: 100px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
|
||
</style>
|
||
|
||
@if (Model.Any(c => c.TradeType == "香草期权"))
|
||
{
|
||
var list = Model.Where(c => c.TradeType == "香草期权").ToList();
|
||
<div>
|
||
<p>香草期权</p>
|
||
<table class="table-border" border="1">
|
||
<tr id="head">
|
||
<td>交易编号</td>
|
||
<td>买方</td>
|
||
<td>交易<br />达成日</td>
|
||
<td>起始日</td>
|
||
<td>到期日</td>
|
||
<td>名义金额</td>
|
||
<td>行权方式</td>
|
||
<td>交易方向</td>
|
||
<td>标的资产</td>
|
||
<td>期初价格</td>
|
||
<td>执行价格</td>
|
||
<td>期权费率</td>
|
||
<td>初始合格履<br />约保障品金额</td>
|
||
</tr>
|
||
<tbody>
|
||
@foreach (var item in list)
|
||
{
|
||
<tr>
|
||
<td>@item.TradeNumber</td>
|
||
<td>
|
||
@switch (item.BuySell)
|
||
{
|
||
case "买入":
|
||
@YLErp.PS.Config.CompanyFullName;
|
||
break;
|
||
case "卖出":
|
||
@item.ClientName;
|
||
break;
|
||
default:
|
||
break;
|
||
}
|
||
</td>
|
||
<td>
|
||
@item.TradeDate.OtcFormatDate()
|
||
</td>
|
||
<td>@item.StartDate.OtcFormatDate()</td>
|
||
<td>@item.ExerciseDate.OtcFormatDate()</td>
|
||
<td>@item.OriginalStockEqvNotional.OtcFormatMoney()</td>
|
||
<td>@(item.ExerciseMode == "European"?"欧式":"美式")</td>
|
||
<td>@item.OptionType</td>
|
||
<td>@item.UnderlyingCode<br />@item.UnderlyingAssetName</td>
|
||
<td>@item.SpotPrice</td>
|
||
<td>@(item.IsMoneynessOptionData ? (item.SpotPrice * item.Strike).OtcFormatUmPrice() : item.Strike.OtcFormatUmPrice())<br />(K₂=@(item.IsMoneynessOptionData ? item.Strike.OtcFormatPercent(4) : (item.Strike / item.SpotPrice).OtcFormatPercent(4)))</td>
|
||
<td>@(((item.PremiumRate ?? (item.TradePrice ?? 0) / item.StockEqvNotional * 100)).OtcFormatPercent())</td>
|
||
<td>@(item.InitialMargin>0?item.InitialMargin?.ToString("0"):"0")<br />(φ=@(item.InitialMargin>0? (item.InitialMargin / item.OriginalStockEqvNotional).OtcFormatPercent(): "0.00%"))</td>
|
||
</tr>
|
||
}
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
}
|
||
@if (Model.Any(c => c.TradeType == "雪球期权"))
|
||
{
|
||
var list = Model.Where(c => c.TradeType == "雪球期权").ToList();
|
||
|
||
<div>
|
||
<p>雪球期权</p>
|
||
<table class="table-border" border="1">
|
||
<tr id="head">
|
||
<td rowspan="3">交易编号</td>
|
||
<td rowspan="3">买方</td>
|
||
<td rowspan="3">交易达成日</td>
|
||
<td rowspan="3">起始日-到期日</td>
|
||
<td rowspan="3">名义金额</td>
|
||
<td rowspan="3">标的资产</td>
|
||
<td rowspan="3">期初价格</td>
|
||
<td colspan="4">敲入要素</td>
|
||
<td colspan="3">敲出要素</td>
|
||
<td rowspan="3">未敲入未敲出收益率</td>
|
||
<td rowspan="3">初始合格履约保障品金额</td>
|
||
</tr>
|
||
<tr id="head">
|
||
<td rowspan="2">敲入价格</td>
|
||
<td rowspan="2">敲入观察日</td>
|
||
<td colspan="2">敲入未敲出收益结构</td>
|
||
<td rowspan="2">敲出价格</td>
|
||
<td rowspan="2">敲出观察日</td>
|
||
<td rowspan="2">敲出收益率</td>
|
||
</tr>
|
||
<tr id="head"><td>执行价格一</td><td>执行价格二</td></tr>
|
||
|
||
<tbody>
|
||
@foreach (var item in list)
|
||
{
|
||
var toSpreadOption = item.trade_snowball.KIPayoffType == KIPayoffTypeEnum.ToCallSpreadOption
|
||
|| item.trade_snowball.KIPayoffType == KIPayoffTypeEnum.ToPutSpreadOption;
|
||
<tr>
|
||
<td>@item.TradeNumber</td>
|
||
<td>
|
||
@switch (item.BuySell)
|
||
{
|
||
case "买入":
|
||
@YLErp.PS.Config.CompanyFullName;
|
||
break;
|
||
case "卖出":
|
||
@item.ClientName;
|
||
break;
|
||
default:
|
||
break;
|
||
}
|
||
</td>
|
||
<td>
|
||
@item.TradeDate.OtcFormatDate()
|
||
</td>
|
||
<td>@item.StartDate.OtcFormatDate()<br />@item.ExerciseDate.OtcFormatDate()</td>
|
||
<td>@item.OriginalStockEqvNotional.OtcFormatMoney()</td>
|
||
<td>@item.UnderlyingCode<br />@item.UnderlyingAssetName</td>
|
||
<td>@item.SpotPrice</td>
|
||
<td>@(item.IsMoneynessOptionData?(item.trade_snowball.KIBarrier * item.SpotPrice).OtcFormatUmPrice():item.trade_snowball.KIBarrier.OtcFormatUmPrice())<br />(H₁=@(item.IsMoneynessOptionData? item.trade_snowball.KIBarrier.OtcFormatPercent():((item.trade_snowball.KIBarrier / item.SpotPrice).OtcFormatPercent())))</td>
|
||
<td>@TradeHelper.GetObDates(item.trade_snowball.ObservationDates)</td>
|
||
|
||
@if (!item.IsMoneynessOptionData)
|
||
{
|
||
<td> @(item.trade_snowball.KIPayoffType != KIPayoffTypeEnum.None ? @item.trade_snowball.SpreadStrikeAtMaturity1.OtcFormatUmPrice() : "无")<br />(K₁=@((item.trade_snowball.SpreadStrikeAtMaturity1 / item.SpotPrice).OtcFormatPercent()))</td>
|
||
<td> @(toSpreadOption ? item.trade_snowball.SpreadStrikeAtMaturity.OtcFormatUmPrice() : "无")<br />(K₂=@((item.trade_snowball.SpreadStrikeAtMaturity / item.SpotPrice).OtcFormatPercent()))</td>
|
||
}
|
||
else
|
||
{
|
||
<td>@(item.trade_snowball.KIPayoffType != KIPayoffTypeEnum.None ? (item.trade_snowball.SpreadStrikeAtMaturity1 * item.SpotPrice).OtcFormatUmPrice() : "无")<br />(K₁=@(item.trade_snowball.SpreadStrikeAtMaturity1.OtcFormatPercent()))</td>
|
||
<td>@(toSpreadOption ? (item.trade_snowball.SpreadStrikeAtMaturity * item.SpotPrice).OtcFormatUmPrice() : "无")<br />(K₂=@(item.trade_snowball.SpreadStrikeAtMaturity.OtcFormatPercent()))</td>
|
||
}
|
||
|
||
<td>@(item.IsMoneynessOptionData?(item.trade_snowball.KOBarrier * item.SpotPrice).OtcFormatUmPrice() : item.trade_snowball.KOBarrier.OtcFormatUmPrice())<br />(H₂=@(item.IsMoneynessOptionData? item.trade_snowball.KOBarrier.OtcFormatPercent():((item.trade_snowball.KOBarrier / item.SpotPrice).OtcFormatPercent())))</td>
|
||
<td>
|
||
@TradeHelper.GetObDates(item.trade_snowball.KOObservationDates)
|
||
</td>
|
||
<td>@item.trade_snowball.KORebate.OtcFormatPercent()</td>
|
||
<td>@item.trade_snowball.Coupon.OtcFormatPercent()</td>
|
||
<td>@(item.InitialMargin>0?item.InitialMargin?.ToString("0"):"0")<br />(φ=@(item.InitialMargin>0? (item.InitialMargin / item.OriginalStockEqvNotional).OtcFormatPercent(): "0.00%"))</td>
|
||
</tr>
|
||
}
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
}
|
||
@if (Model.Any(c => c.TradeType == "双鲨期权"))
|
||
{
|
||
var list = Model.Where(c => c.TradeType == "双鲨期权").ToList();
|
||
<div>
|
||
<p>双鲨期权</p>
|
||
<table class="table-border" border="1">
|
||
<tr id="head">
|
||
<td rowspan="2">交易编号</td>
|
||
<td rowspan="2">买方</td>
|
||
<td rowspan="2">交易达成日</td>
|
||
<td rowspan="2">起始日-到期日</td>
|
||
<td rowspan="2">名义金额</td>
|
||
<td rowspan="2">标的资产</td>
|
||
<td rowspan="2">期初价格</td>
|
||
<td colspan="4">向下收益结构</td>
|
||
<td colspan="4">向上收益结构</td>
|
||
<td rowspan="2">敲出观察日</td>
|
||
<td rowspan="2">保底收益率</td>
|
||
<td rowspan="2">期权费率</td>
|
||
<td rowspan="2">是否年化</td>
|
||
</tr>
|
||
<tr id="head">
|
||
<td rowspan="2">低执行价格</td>
|
||
<td rowspan="2">低参与率</td>
|
||
<td rowspan="2">低敲出价格</td>
|
||
<td rowspan="2">低敲出收益</td>
|
||
<td rowspan="2">高执行价格</td>
|
||
<td rowspan="2">高参与率</td>
|
||
<td rowspan="2">高敲出价格</td>
|
||
<td rowspan="2">高敲出收益</td>
|
||
</tr>
|
||
<tbody>
|
||
@foreach (var item in list)
|
||
{
|
||
<tr>
|
||
<td>@item.TradeNumber</td>
|
||
<td>
|
||
@switch (item.BuySell)
|
||
{
|
||
case "买入":
|
||
@YLErp.PS.Config.CompanyFullName;
|
||
break;
|
||
case "卖出":
|
||
@item.ClientName;
|
||
break;
|
||
default:
|
||
break;
|
||
}
|
||
</td>
|
||
<td>
|
||
@item.TradeDate.OtcFormatDate()
|
||
</td>
|
||
<td>@item.StartDate.OtcFormatDate()<br />@item.ExerciseDate.OtcFormatDate()</td>
|
||
<td>@item.OriginalStockEqvNotional.OtcFormatMoney()</td>
|
||
<td>@item.UnderlyingCode<br />@item.UnderlyingAssetName</td>
|
||
<td>@item.SpotPrice</td>
|
||
<td>
|
||
@(item.IsMoneynessOptionData?((item.Strike * item.SpotPrice)).OtcFormatUmPrice(): item.Strike.OtcFormatUmPrice())
|
||
<br />(K₁=@(item.IsMoneynessOptionData?(item.Strike).OtcFormatPercent():((item.Strike / item.SpotPrice)).OtcFormatPercent()))
|
||
</td>
|
||
<td>@item.ParticipationRate.OtcFormatPercent()</td>
|
||
<td>
|
||
@(item.IsMoneynessOptionData?(item.trade_double_sharkfin_option.BarrierLow * item.SpotPrice).OtcFormatUmPrice(): item.trade_double_sharkfin_option.BarrierLow.OtcFormatUmPrice())
|
||
<br />(B₁=@(item.IsMoneynessOptionData?item.trade_double_sharkfin_option.BarrierLow.OtcFormatPercent():(item.trade_double_sharkfin_option.BarrierLow / item.SpotPrice).OtcFormatPercent()))
|
||
</td>
|
||
<td>@(item.IsUsePremiumRate==true?item.trade_double_sharkfin_option.RebateRate.OtcFormatPercent():(item.trade_double_sharkfin_option.Rebate * item.SpotPrice).OtcFormatUmPrice())</td>
|
||
<td>
|
||
@(item.IsMoneynessOptionData?((item.trade_double_sharkfin_option.StrikeHigh * item.SpotPrice)).OtcFormatUmPrice(): item.trade_double_sharkfin_option.StrikeHigh.OtcFormatUmPrice())
|
||
<br />(K₂=@(item.IsMoneynessOptionData?(item.trade_double_sharkfin_option.StrikeHigh).OtcFormatPercent():((item.trade_double_sharkfin_option.StrikeHigh / item.SpotPrice)).OtcFormatPercent()))
|
||
</td>
|
||
<td>@item.ParticipationRate.OtcFormatPercent()</td>
|
||
<td>
|
||
@(item.IsMoneynessOptionData?(item.trade_double_sharkfin_option.BarrierHigh * item.SpotPrice).OtcFormatUmPrice(): item.trade_double_sharkfin_option.BarrierHigh.OtcFormatUmPrice())
|
||
<br />(B₂=@(item.IsMoneynessOptionData?item.trade_double_sharkfin_option.BarrierHigh.OtcFormatPercent():(item.trade_double_sharkfin_option.BarrierHigh / item.SpotPrice).OtcFormatPercent()))
|
||
</td>
|
||
<td>@(item.IsUsePremiumRate==true?item.trade_double_sharkfin_option.RebateHighRate.OtcFormatPercent():(item.trade_double_sharkfin_option.RebateHighRate * item.SpotPrice).OtcFormatUmPrice())</td>
|
||
<td>
|
||
@(item.trade_double_sharkfin_option.ObservationDates??"每天")
|
||
</td>
|
||
<td>@item.PrincipalRate.OtcFormatPercent()</td>
|
||
<td>@(item.PremiumRate.OtcFormatPercent()?? (((item.TradePrice ?? 0) / (item.StockEqvNotional)) * 100).OtcFormatPercent())</td>
|
||
<td>@(item.IsAnnualized==true?"是":"否")</td>
|
||
</tr>
|
||
}
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
}
|
||
@if (Model.Any(c => c.TradeType == "凤凰期权"))
|
||
{
|
||
var list = Model.Where(c => c.TradeType == "凤凰期权").ToList();
|
||
<div>
|
||
<p>凤凰期权</p>
|
||
<table class="table-border" border="1">
|
||
<tr id="head">
|
||
<td rowspan="3">交易编号</td>
|
||
<td rowspan="3">买方</td>
|
||
<td rowspan="3">交易达成日</td>
|
||
<td rowspan="3">起始日-到期日</td>
|
||
<td rowspan="3">名义金额</td>
|
||
<td rowspan="3">标的资产</td>
|
||
<td rowspan="3">期初价格</td>
|
||
<td colspan="4">敲入要素</td>
|
||
<td colspan="3">派息要素</td>
|
||
<td colspan="2">敲出要素</td>
|
||
<td rowspan="3">初始合格履约保障品金额</td>
|
||
</tr>
|
||
<tr id="head">
|
||
<td rowspan="2">敲入价格</td>
|
||
<td rowspan="2">敲入观察日</td>
|
||
<td colspan="2">敲入收益结构</td>
|
||
<td rowspan="2">派息价格</td>
|
||
<td rowspan="2">派息观察日</td>
|
||
<td rowspan="2">派息率</td>
|
||
<td rowspan="2">敲出价格</td>
|
||
<td rowspan="2">敲出观察日</td>
|
||
</tr>
|
||
<tr id="head"><td>执行价格一</td><td>执行价格二</td></tr>
|
||
<tbody>
|
||
@foreach (var item in list)
|
||
{
|
||
var toSpreadOption = item.trade_snowball.KIPayoffType == KIPayoffTypeEnum.ToCallSpreadOption
|
||
|| item.trade_snowball.KIPayoffType == KIPayoffTypeEnum.ToPutSpreadOption;
|
||
<tr>
|
||
<td>@item.TradeNumber</td>
|
||
<td>
|
||
@switch (item.BuySell)
|
||
{
|
||
case "买入":
|
||
@YLErp.PS.Config.CompanyFullName;
|
||
break;
|
||
case "卖出":
|
||
@item.ClientName;
|
||
break;
|
||
default:
|
||
break;
|
||
}
|
||
</td>
|
||
<td>
|
||
@item.TradeDate.OtcFormatDate()
|
||
</td>
|
||
<td>@item.StartDate.OtcFormatDate()<br />@item.ExerciseDate.OtcFormatDate()</td>
|
||
<td>@item.OriginalStockEqvNotional.OtcFormatMoney()</td>
|
||
<td>@item.UnderlyingCode<br />@item.UnderlyingAssetName</td>
|
||
<td>@item.SpotPrice</td>
|
||
<td>@(item.IsMoneynessOptionData? (item.trade_autocall.KIBarrier * item.SpotPrice).OtcFormatUmPrice() : item.trade_autocall.KIBarrier.OtcFormatUmPrice())<br />(H₁=@(item.IsMoneynessOptionData? item.trade_autocall.KIBarrier.OtcFormatPercent():((item.trade_autocall.KIBarrier / item.SpotPrice).OtcFormatPercent())))</td>
|
||
<td>@(YLErp.DBModels.Helpers.TradeHelper.GetObDates(item.trade_autocall.ObservationDates))</td>
|
||
@if (item.IsMoneynessOptionData)
|
||
{
|
||
<td> @(item.trade_autocall.KIPayoffType != KIPayoffTypeEnum.None ? (item.trade_autocall.SpreadStrike1 * item.SpotPrice).OtcFormatUmPrice() : "无")<br />(K₁=@item.trade_autocall.SpreadStrike1.OtcFormatPercent())</td>
|
||
<td>
|
||
@(toSpreadOption ? (item.trade_autocall.SpreadStrike * item.SpotPrice).OtcFormatUmPrice() : "无")<br />(K₂=@item.trade_autocall.SpreadStrike.OtcFormatPercent())
|
||
</td>
|
||
<td>
|
||
@((item.trade_autocall.CouponBarrier * item.SpotPrice).OtcFormatUmPrice())<br />(C=@item.trade_autocall.CouponBarrier.OtcFormatPercent())
|
||
</td>
|
||
}
|
||
else
|
||
{
|
||
<td> @(item.trade_autocall.KIPayoffType != KIPayoffTypeEnum.None ? item.trade_autocall.SpreadStrike1.OtcFormatUmPrice() : "无")<br />(K₁=@((item.trade_autocall.SpreadStrike1 / item.SpotPrice).OtcFormatPercent()))</td>
|
||
<td>
|
||
@(toSpreadOption ? item.trade_autocall.SpreadStrike1.OtcFormatUmPrice() : "无")<br />(K₂=@(item.trade_autocall.SpreadStrike / item.SpotPrice).OtcFormatPercent())
|
||
</td>
|
||
<td>
|
||
@item.trade_autocall.CouponBarrier.OtcFormatUmPrice()<br />(C=@(item.trade_autocall.CouponBarrier / item.SpotPrice).OtcFormatPercent())
|
||
</td>
|
||
}
|
||
<td><div class="wrap" title="@item.trade_autocall.KOObservationDates">@TradeHelper.GetObDates(item.trade_autocall.KOObservationDates)</div></td>
|
||
<td>@item.trade_autocall.Coupon.OtcFormatPercent()</td>
|
||
<td>@(item.IsMoneynessOptionData? (item.trade_autocall.KOBarrier * item.SpotPrice).OtcFormatUmPrice() : item.trade_autocall.KOBarrier.OtcFormatUmPrice())<br />(H₂=@(item.IsMoneynessOptionData? item.trade_autocall.KOBarrier.OtcFormatPercent():((item.trade_autocall.KOBarrier / item.SpotPrice).OtcFormatPercent())))</td>
|
||
<td><div class="warp" title="@item.trade_autocall.KOObservationDates">@TradeHelper.GetObDates(item.trade_autocall.KOObservationDates)</div></td>
|
||
<td>@(item.InitialMargin>0?item.InitialMargin?.ToString("0"):"0")<br />(φ=@(item.InitialMargin>0? (item.InitialMargin / item.OriginalStockEqvNotional).OtcFormatPercent(): "0.00%"))</td>
|
||
</tr>
|
||
}
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
}
|
||
@if (Model.Any(c => c.TradeType == "气囊结构"))
|
||
{
|
||
var list = Model.Where(c => c.TradeType == "气囊结构").ToList();
|
||
<div>
|
||
<p>气囊结构</p>
|
||
<table class="table-border" border="1">
|
||
<tr id="head">
|
||
<td rowspan="3">交易编号</td>
|
||
<td rowspan="3">买方</td>
|
||
<td rowspan="3">交易达成日</td>
|
||
<td rowspan="3">起始日</td>
|
||
<td rowspan="3">到期日</td>
|
||
<td rowspan="3">名义金额</td>
|
||
<td rowspan="3">标的资产</td>
|
||
<td rowspan="3">期初价格</td>
|
||
<td colspan="3">未敲入要素</td>
|
||
<td colspan="2">敲入要素</td>
|
||
<td rowspan="3">期权费率</td>
|
||
<td rowspan="3">初始合格履约保障品金额</td>
|
||
</tr>
|
||
<tr id="head">
|
||
<td>执行价格</td>
|
||
<td>未敲入参与率</td>
|
||
<td>封顶价格</td>
|
||
<td>敲入价格</td>
|
||
<td>敲入观察频率</td>
|
||
</tr>
|
||
<tbody>
|
||
@foreach (var item in list)
|
||
{
|
||
<tr>
|
||
<td>@item.TradeNumber</td>
|
||
<td>
|
||
@switch (item.BuySell)
|
||
{
|
||
case "买入":
|
||
@YLErp.PS.Config.CompanyFullName;
|
||
break;
|
||
case "卖出":
|
||
@item.ClientName;
|
||
break;
|
||
default:
|
||
break;
|
||
}
|
||
</td>
|
||
<td>
|
||
@item.TradeDate.OtcFormatDate()
|
||
</td>
|
||
<td>@item.StartDate.OtcFormatDate()</td>
|
||
<td>@item.ExerciseDate.OtcFormatDate()</td>
|
||
<td>@item.OriginalStockEqvNotional.OtcFormatMoney()</td>
|
||
<td>@item.UnderlyingCode<br />@item.UnderlyingAssetName</td>
|
||
<td>@item.SpotPrice</td>
|
||
<td>@(item.IsMoneynessOptionData? (item.Strike * item.SpotPrice).OtcFormatUmPrice() : item.Strike.OtcFormatUmPrice())<br />(K =@(item.IsMoneynessOptionData ? item.Strike.OtcFormatPercent() : (item.Strike / item.SpotPrice).OtcFormatPercent()))</td>
|
||
<td>@item.ParticipationRate.OtcFormatPercent()</td>
|
||
<td>@(item.trade_airbag.HasPayoffLimit?(item.trade_airbag.HighStrike*item.SpotPrice).OtcFormatUmPrice():"无")<br />(C =@(item.trade_airbag.HasPayoffLimit ? item.trade_airbag.HighStrike.OtcFormatPercent() : "+∞"))</td>
|
||
<td>@(item.IsMoneynessOptionData? (item.trade_airbag.Barrier * item.SpotPrice).OtcFormatUmPrice():item.trade_airbag.Barrier.OtcFormatUmPrice())<br />(H=@(item.IsMoneynessOptionData? item.trade_airbag.Barrier.OtcFormatPercent(): (item.trade_airbag.Barrier / item.SpotPrice).OtcFormatPercent()))</td>
|
||
<td>每日</td>
|
||
<td>
|
||
@(((item.PremiumRate ?? (item.TradePrice ?? 0) / item.StockEqvNotional * 100)).OtcFormatPercent())
|
||
</td>
|
||
<td>@(item.InitialMargin>0?item.InitialMargin?.ToString("0"):"0")<br />(φ=@(item.InitialMargin>0? (item.InitialMargin / item.OriginalStockEqvNotional).OtcFormatPercent(): "0.00%"))</td>
|
||
</tr>
|
||
}
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
}
|
||
@if (Model.Any(c => c.TradeType == "二元期权"))
|
||
{
|
||
var list = Model.Where(c => c.TradeType == "二元期权").ToList();
|
||
<div>
|
||
<p>二元期权</p>
|
||
<table class="table-border" border="1">
|
||
<tr id="head">
|
||
<td>交易编号</td>
|
||
<td>买方</td>
|
||
<td>交易达成日</td>
|
||
<td>起始日</td>
|
||
<td>到期日</td>
|
||
<td>名义金额</td>
|
||
<td>标的资产</td>
|
||
<td>期初价格</td>
|
||
<td>执行价格</td>
|
||
<td>交易方向</td>
|
||
<td>一级收益率</td>
|
||
<td>二级收益率</td>
|
||
@*<td>观察日</td>*@
|
||
<td>参与率</td>
|
||
<td>期权费率</td>
|
||
<td>是否年化</td>
|
||
<td>期权费</td>
|
||
</tr>
|
||
<tbody>
|
||
@foreach (var item in list)
|
||
{
|
||
<tr>
|
||
<td>@item.TradeNumber</td>
|
||
<td>
|
||
@switch (item.BuySell)
|
||
{
|
||
case "买入":
|
||
@YLErp.PS.Config.CompanyFullName;
|
||
break;
|
||
case "卖出":
|
||
@item.ClientName;
|
||
break;
|
||
default:
|
||
break;
|
||
}
|
||
</td>
|
||
<td>
|
||
@item.TradeDate.OtcFormatDate()
|
||
</td>
|
||
<td>@item.StartDate.OtcFormatDate()</td>
|
||
<td>@item.ExerciseDate.OtcFormatDate()</td>
|
||
<td>@item.OriginalStockEqvNotional.OtcFormatMoney()</td>
|
||
<td>@item.UnderlyingCode<br />@item.UnderlyingAssetName</td>
|
||
<td>@item.SpotPrice</td>
|
||
<td>@(item.IsMoneynessOptionData? (item.Strike * item.SpotPrice).OtcFormatUmPrice() : item.Strike.OtcFormatUmPrice())<br />(K =@(item.IsMoneynessOptionData ? item.Strike.OtcFormatPercent() : (item.Strike / item.SpotPrice).OtcFormatPercent()))</td>
|
||
<td>@item.OptionType</td>
|
||
@if (item.IsUsePremiumRate == true)
|
||
{
|
||
<td>@(item.TradePrice>0 ? (item.trade_binary_option.CashOrNothingAmountRate * item.SpotPrice / item.TradePrice).OtcFormatPercent() :"0")</td>
|
||
}
|
||
else
|
||
{
|
||
<td>@(item.TradePrice>0 ? (item.trade_binary_option.CashOrNothingAmount / item.TradePrice).OtcFormatPercent():"0")</td>
|
||
}
|
||
<td>@item.PrincipalRate.OtcFormatPercent()</td>
|
||
@*<td>@(item.trade_binary_option.ObservationDates??"每天")</td>*@
|
||
<td>@item.ParticipationRate.OtcFormatPercent()</td>
|
||
<td>@(((item.PremiumRate ?? (item.TradePrice ?? 0) / item.StockEqvNotional * 100)).OtcFormatPercent())</td>
|
||
<td>@(item.IsAnnualized==true?"是":"否")</td>
|
||
<td>@item.TradePrice.OtcFormatMoney()</td>
|
||
</tr>
|
||
}
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
}
|
||
@if (Model.Any(c => c.TradeType == "障碍期权"))
|
||
{
|
||
var list = Model.Where(c => c.TradeType == "障碍期权").ToList();
|
||
<div>
|
||
<p>障碍期权</p>
|
||
<table class="table-border" border="1">
|
||
<tr id="head">
|
||
<td>交易编号</td>
|
||
<td>买方</td>
|
||
<td>交易达成日</td>
|
||
<td>起始日</td>
|
||
<td>到期日</td>
|
||
<td>名义金额</td>
|
||
<td>标的资产</td>
|
||
<td>期初价格</td>
|
||
<td>执行价格</td>
|
||
<td>参与率</td>
|
||
<td>低敲出价格</td>
|
||
<td>高敲出价格</td>
|
||
<td>敲出观察日</td>
|
||
<td>敲出收益率</td>
|
||
<td>高敲出收益率</td>
|
||
<td>保底收益率</td>
|
||
<td>期权费率</td>
|
||
<td>是否年化</td>
|
||
</tr>
|
||
<tbody>
|
||
@foreach (var item in list)
|
||
{
|
||
<tr>
|
||
<td>@item.TradeNumber</td>
|
||
<td>
|
||
@switch (item.BuySell)
|
||
{
|
||
case "买入":
|
||
@YLErp.PS.Config.CompanyFullName;
|
||
break;
|
||
case "卖出":
|
||
@item.ClientName;
|
||
break;
|
||
default:
|
||
break;
|
||
}
|
||
</td>
|
||
<td>
|
||
@item.TradeDate.OtcFormatDate()
|
||
</td>
|
||
<td>@item.StartDate.OtcFormatDate()</td>
|
||
<td>@item.ExerciseDate.OtcFormatDate()</td>
|
||
<td>@item.OriginalStockEqvNotional.OtcFormatMoney()</td>
|
||
<td>@item.UnderlyingCode<br />@item.UnderlyingAssetName</td>
|
||
<td>@item.SpotPrice</td>
|
||
<td>@(item.IsMoneynessOptionData? (item.Strike * item.SpotPrice).OtcFormatUmPrice() : item.Strike.OtcFormatUmPrice())<br />(K =@(item.IsMoneynessOptionData ? item.Strike.OtcFormatPercent() : (item.Strike / item.SpotPrice).OtcFormatPercent()))</td>
|
||
<td>@item.ParticipationRate.OtcFormatPercent()</td>
|
||
<td>@(item.IsMoneynessOptionData? (item.trade_barrier_option.BarrierPrice * item.SpotPrice).OtcFormatUmPrice() : item.trade_barrier_option.BarrierPrice.OtcFormatUmPrice())<br />(B₁=@(item.IsMoneynessOptionData? item.trade_barrier_option.BarrierPrice.OtcFormatPercent(): (item.trade_barrier_option.BarrierPrice / item.SpotPrice).OtcFormatPercent()))</td>
|
||
@if (item.trade_barrier_option.BarrierType == "双障碍敲出" || item.trade_barrier_option.BarrierType == "双障碍敲入")
|
||
{
|
||
<td>@(item.IsMoneynessOptionData? (item.trade_barrier_option.UpperBarrierPrice * item.SpotPrice).OtcFormatUmPrice() : item.trade_barrier_option.UpperBarrierPrice.OtcFormatUmPrice())<br />(B₂=@(item.IsMoneynessOptionData? item.trade_barrier_option.UpperBarrierPrice.OtcFormatPercent(): (item.trade_barrier_option.UpperBarrierPrice / item.SpotPrice).OtcFormatPercent()))</td>
|
||
}
|
||
else
|
||
{
|
||
<td>无<br />(B₂=0.00%)</td>
|
||
}
|
||
<td>@(item.trade_barrier_option.ObservationDates??"每天")</td>
|
||
<td>@(item.IsUsePremiumRate==true? item.trade_barrier_option.RebateRate.OtcFormatPercent():(item.trade_barrier_option.Rebate/item.SpotPrice).OtcFormatPercent())</td>
|
||
<td>@(item.IsUsePremiumRate==true? item.trade_barrier_option.RebateHighRate.OtcFormatPercent():(item.trade_barrier_option.RebateHigh / item.SpotPrice).OtcFormatPercent())</td>
|
||
<td>@item.PrincipalRate.OtcFormatPercent()</td>
|
||
<td>@(((item.PremiumRate ?? (item.TradePrice ?? 0) / item.StockEqvNotional * 100)).OtcFormatPercent())</td>
|
||
<td>@(item.IsAnnualized==true?"是":"否")</td>
|
||
</tr>
|
||
}
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
}
|
||
@if (Model.Any(c => c.TradeType == "累计期权"))
|
||
{
|
||
var list = Model.Where(c => c.TradeType == "累计期权").ToList();
|
||
|
||
|
||
<div>
|
||
<p>累计期权</p>
|
||
<table class="table-border" border="1">
|
||
<tr id="head">
|
||
<td>交易编号</td>
|
||
<td>买方</td>
|
||
<td>交易达成日</td>
|
||
<td>起始日</td>
|
||
<td>到期日</td>
|
||
<td>名义金额</td>
|
||
<td>标的资产</td>
|
||
<td>期初价格</td>
|
||
<td>执行价格</td>
|
||
<td>参与率</td>
|
||
|
||
<td>敲出障碍价格</td>
|
||
<td>观察日</td>
|
||
<td>上端收益类型</td>
|
||
<td>票息</td>
|
||
<td>票息年化</td>
|
||
<td>票息日历</td>
|
||
<td>结算方式</td>
|
||
<td>累计类型</td>
|
||
@if (YLErp.PS.Config.ErpElement.AccumulatorShowMultiplier1)
|
||
{
|
||
<td>杠杆倍数</td>
|
||
}
|
||
else
|
||
{
|
||
<td>看涨乘数</td>
|
||
<td>看跌乘数</td>
|
||
}
|
||
<td>敲出是否终止</td>
|
||
</tr>
|
||
<tbody>
|
||
@foreach (var item in list)
|
||
{
|
||
var accumu = item.trade_accumulator_option;
|
||
<tr>
|
||
<td>@item.TradeNumber</td>
|
||
<td>
|
||
@switch (item.BuySell)
|
||
{
|
||
case "买入":
|
||
@YLErp.PS.Config.CompanyFullName;
|
||
break;
|
||
case "卖出":
|
||
@item.ClientName;
|
||
break;
|
||
}
|
||
</td>
|
||
<td>
|
||
@item.TradeDate.OtcFormatDate()
|
||
</td>
|
||
<td>@item.StartDate.OtcFormatDate()</td>
|
||
<td>@item.ExerciseDate.OtcFormatDate()</td>
|
||
<td>@item.OriginalStockEqvNotional.OtcFormatMoney()</td>
|
||
<td>@item.UnderlyingCode<br />@item.UnderlyingAssetName</td>
|
||
<td>@item.SpotPrice</td>
|
||
<td>@(item.IsMoneynessOptionData? (item.Strike * item.SpotPrice).OtcFormatUmPrice() : item.Strike.OtcFormatUmPrice())<br />(K =@(item.IsMoneynessOptionData ? item.Strike.OtcFormatPercent() : (item.Strike / item.SpotPrice).OtcFormatPercent()))</td>
|
||
<td>@item.ParticipationRate.OtcFormatPercent()</td>
|
||
|
||
<td>@((item.IsMoneynessOptionData ? accumu.KOBarrier * item.SpotPrice : accumu.KOBarrier).OtcFormatUmPrice())</td>
|
||
<td><div class="wrap">@TradeHelper.GetObDates(accumu.KOObservationDates)</div></td>
|
||
<td>@(accumu.PayoffType=="固定"?"固定(票息)":accumu.PayoffType)</td>
|
||
<td>@(accumu.PayoffType == "固定" ? (accumu.CouponPercent?accumu.Coupon.OtcFormatPercent():accumu.Coupon.OtcFormatFlex(2)):"")</td>
|
||
<td>@(accumu.PayoffType == "固定" ? (accumu.IsFixedCoupon?"否":"是"):"")</td>
|
||
<td>@(accumu.PayoffType == "固定" ? accumu.CouponDayCount:"")</td>
|
||
<td>
|
||
@if (accumu.SettlementMode == "现金当日")
|
||
{
|
||
<span>现金结算(当日)</span>
|
||
}
|
||
else if (accumu.SettlementMode == "现金期末")
|
||
{
|
||
<span>现金结算(期末)</span>
|
||
}
|
||
else
|
||
{
|
||
<span>@(accumu.SettlementMode)</span>
|
||
}
|
||
</td>
|
||
<td>@(accumu.SettlementMode == "现金期末" ? accumu.AccumuType:"")</td>
|
||
@if (YLErp.PS.Config.ErpElement.AccumulatorShowMultiplier1)
|
||
{
|
||
<td>@(item.OptionType=="看涨"?accumu.PutMultiplier:accumu.CallMultiplier)</td>
|
||
}
|
||
else
|
||
{
|
||
<td>@(accumu.CallMultiplier)</td>
|
||
<td>@(accumu.PutMultiplier)</td>
|
||
}
|
||
<td>@(accumu.EarlyTerminate?"是":"否")</td>
|
||
</tr>
|
||
}
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
}
|