年化天数
@trade.trade_extend.ExtendObj.AnnualDays
计息方式
@(TradeViewModel.GetSwapRateCalcModeDesc(trade.trade_extend.ExtendObj.InterestCalcMode))
@*
是否开仓时收取开仓费
@(trade.trade_extend.ExtendObj.NeedOpenFee ? "是" : "否")
收费基本单位
@(trade.trade_extend.ExtendObj.OpenFeeType == 0 ? "按手数收费" : "按份数收费")
*@
结算规则
@(trade.trade_extend.ExtendObj.SettlementRules == 0 ? "T+0" : "T+1")
派息金额支付日
@(trade.trade_extend.ExtendObj.DividendPayDate == 0 ? "到期结算日" : "派息日+" + (trade.trade_extend.ExtendObj.DividendPayDate - 1))
保证金模板
@trade.MarginTemplateName
收支方向
资金类别
发生日期
金额
币种
预付金返息率
利率是否年化
结算规则
@if (trade.swap_positions != null)
{
foreach (var item in trade.swap_positions.Where(x => (x.InterestMode == 5 || x.InterestMode == 6) && x.IsInitial))
{
var bgclass = item.InterestDirection == (int)SwapDirectionEnum.收取 ? "swapget" : "swappay";
@((SwapDirectionEnum)item.InterestDirection)
@((InterestModeEnum)item.InterestMode)
@item.HappenDate.OtcFormatDate()
@item.Currency
@(item.IsAnnualized ? "是" : "否")
查看
}
}
收支方向
计息基本类型
计息基数
利率
利率是否年化
计息方式
重置频率(天)
利率准则
类别
结算规则
@if (trade.swap_positions != null)
{
foreach (var item in trade.swap_positions.Where(x => ConsTrade.InterestModels.Contains(x.InterestMode) && x.IsInitial))
{
decimal? interestPrice = null;
if (item.InterestMode == (int)InterestModeEnum.合约名义本金规模)
{
interestPrice = Convert.ToDecimal(trade.OriginalStockEqvNotional.Value);
}
else if (item.InterestMode == (int)InterestModeEnum.标的期初全价)
{
interestPrice = Convert.ToDecimal(trade.OriginalStockEqvNotional.Value);
}
else if (item.InterestMode == (int)InterestModeEnum.固定值)
{
interestPrice = item.InterestPrincipalFix;
}
@* else if (item.InterestMode == (int)InterestModeEnum.多头存续名义本金)
{
interestPrice = positions.Where(w => w.PositionType == (int)PositionTypeFlag.Long).Sum(s => s.PosiNotionalValue);
}
else if (item.InterestMode == (int)InterestModeEnum.空头存续名义本金)
{
interestPrice = positions.Where(w => w.PositionType == (int)PositionTypeFlag.Short).Sum(s => s.PosiNotionalValue);
}*@
var bgclass = item.InterestDirection == (int)SwapDirectionEnum.收取 ? "swapget" : "swappay";
var sign = item.InterestRateDefault < 0 ? "" : "+";
@((SwapDirectionEnum)item.InterestDirection)
@((InterestModeEnum)item.InterestMode)
@(string.IsNullOrEmpty(item.FloatRateUnderlyingCode) ? "无" : item.FloatRateUnderlyingCode)
@sign
@(item.IsAnnualized ? "是" : "否")
@((InterestTypeEnum)item.InterestType)
@item.interest_rest_days
@((item.interest_rule != null) ? (SwapInterestRule)item.interest_rule : "")
@(string.IsNullOrEmpty(item.category_tag) ? "互换利率" : item.category_tag)
查看
}
}
@if (singleTrade || !hideFloatingIncomeDirection)
{
}
@if (trade.swap_positions != null)
{
var paySwapPositions = trade.swap_positions.Where(x => !string.IsNullOrEmpty(x.UnderlyingCode) && x.IsInitial&&x.PosiStartDate==trade.StartDate).ToList();
if (paySwapPositions.Count > 0)
{
@if (!hideFloatingIncomeDirection)
{
收支方向
}
多空方向
标的代码
@spotPriceTitle
@if (isBond)
{
@netSportPriceTitle
@initYtmTitle
}
数量
基础费率
交易费用后付
@foreach (var item in paySwapPositions)
{
var bgclass = item.PosiDirection == (int)SwapDirectionEnum.收取 ? "swapget" : "swappay";
var multiplier = ConsGlobal.InstrumentType.IsBond(item.UnderlyingInstrumentType) ? 100 : 1;
@if (!hideFloatingIncomeDirection)
{
@((SwapDirectionEnum)item.PosiDirection)
}
@FloatingPositionTypeText(item.PosiDirection, item.PositionType)
@item.UnderlyingCode
@if (isBond)
{
}
@if (item.PosiFeeType == 0)
{
@(item.PosiTradingFeeUnit.ToString("0.0000") + "%")
}
else
{
@item.PosiTradingFeeUnit.ToString("0.000000")
}
}
}
else if (!hideFloatingIncomeDirection)
{
收支方向
@{
var posiDirection = trade.trade_extend.ExtendObj.Direction;
var bgclass = posiDirection == (int)SwapDirectionEnum.收取 ? "swapget" : "swappay";
@((SwapDirectionEnum)posiDirection)
}
}
}
收支方向
资金类别
发生日期
金额
币种
预付金返息率
利率是否年化
结算规则
@foreach (var item in trade.swap_positions.Where(x => (x.InterestMode == 5 || x.InterestMode == 6) && !x.IsInitial))
{
var bgclass = item.InterestDirection == (int)SwapDirectionEnum.收取 ? "swapget" : "swappay";
@((SwapDirectionEnum)item.InterestDirection)
@((InterestModeEnum)item.InterestMode)
@item.HappenDate.OtcFormatDate()
@item.Currency
@(item.IsAnnualized ? "是" : "否")
查看
}
收支方向
计息基本类型
计息基数
利率
利率是否年化
计息方式
重置频率(天)
利率准则
类别
结算规则
@{
foreach (var item in trade.swap_positions.Where(x => ConsTrade.InterestModels.Contains(x.InterestMode) && !x.IsInitial))
{
decimal? interestPrice = null;
if (item.InterestMode == (int)InterestModeEnum.合约名义本金规模)
{
interestPrice = Convert.ToDecimal(trade.StockEqvNotional);
}
else if (item.InterestMode == (int)InterestModeEnum.标的期初全价)
{
interestPrice = Convert.ToDecimal(trade.StockEqvNotional);
}
else if (item.InterestMode == (int)InterestModeEnum.固定值)
{
interestPrice = item.InterestPrincipalFix;
}
//else if (item.InterestMode == (int)InterestModeEnum.多头存续名义本金)
//{
// interestPrice = realPositions.Where(w => w.PositionType == (int)PositionTypeFlag.Long).Sum(s => s.PosiNotionalValue);
//}
//else if (item.InterestMode == (int)InterestModeEnum.空头存续名义本金)
//{
// interestPrice = realPositions.Where(w => w.PositionType == (int)PositionTypeFlag.Short).Sum(s => s.PosiNotionalValue);
//}
var bgclass = item.InterestDirection == (int)SwapDirectionEnum.收取 ? "swapget" : "swappay";
var sign = item.InterestRateDefault < 0 ? "" : "+";
@((SwapDirectionEnum)item.InterestDirection)
@((InterestModeEnum)item.InterestMode)
@(string.IsNullOrEmpty(item.FloatRateUnderlyingCode) ? "无" : item.FloatRateUnderlyingCode)
@sign
@(item.IsAnnualized ? "是" : "否")
@(item.InterestType == 0 ? "单利" : "复利")
@item.interest_rest_days
@((item.interest_rule != null) ? (SwapInterestRule)item.interest_rule : "")
@(string.IsNullOrEmpty(item.category_tag) ? "互换利率" : item.category_tag)
查看
}
}
@if (singleTrade || realPositions.Any(x => !string.IsNullOrEmpty(x.UnderlyingCode)) || !hideFloatingIncomeDirection)
{
}
@if (trade.swap_positions != null)
{
var paySwapPositions = trade.swap_positions.Where(x => !string.IsNullOrEmpty(x.UnderlyingCode) && !x.IsInitial).ToList();
if (paySwapPositions.Count > 0)
{
@if (!hideFloatingIncomeDirection)
{
收支方向
}
多空方向
标的代码
@spotPriceTitle
@if (isBond)
{
@netSportPriceTitle
}
数量
持仓名义本金
交易费用后付
起始日期
到期日期
@foreach (var item in paySwapPositions)
{
var bgclass = item.PosiDirection == 1 ? "swapget" : "swappay";
var multiplier = ConsGlobal.InstrumentType.IsBond(item.UnderlyingInstrumentType) ? 100 : 1;
@if (!hideFloatingIncomeDirection)
{
@((SwapDirectionEnum)item.PosiDirection)
}
@FloatingPositionTypeText(item.PosiDirection, item.PositionType)
@item.UnderlyingCode
@if (isBond)
{
}
@item.PosiStartDate.OtcFormatDate()
@item.PosiMatuirityDate.OtcFormatDate()
}
}
else if (!hideFloatingIncomeDirection)
{
收支方向
@{
var posiDirection = trade.trade_extend.ExtendObj.Direction;
var bgclass = posiDirection == (int)SwapDirectionEnum.收取 ? "swapget" : "swappay";
@((SwapDirectionEnum)posiDirection)
}
}
}
@if (singleTrade && closeSwapDeals.Count > 0)
{
var index = 1;
@foreach (var deal in closeSwapDeals)
{
var tc = deal.unwindData;
if (tc.FlowEvents.Count == 0)
{
continue;
}
var closeFloat = tc.FlowEvents.First(x => !string.IsNullOrEmpty(x.UnderlyingCode));
var DealInterests = tc.FlowEvents.Where(x => string.IsNullOrEmpty(x.UnderlyingCode)).ToList();
var fbgclass = closeFloat.PayDirection == (int)SwapDirectionEnum.收取 ? "swapget" : "swappay";
var multiplier = ConsGlobal.InstrumentType.IsBond(closeFloat.UnderlyingInstrumentType) ? 100 : 1;
var unwindDate = tc.UnwindDate.HasValue ? tc.UnwindDate.Value : tc.ValueDate;
提前终止序号
@(index++)
@if (tc.CloseType == 1)
{
平仓数量
}
else
{
平仓比例
@(tc.ClosePercent.OtcFormatPercent(4))
平仓名义本金
}
起始日期
@(tc.StartDate.OtcFormatDate())
事件日期
@(tc.ValueDate.OtcFormatDate())
平仓日期
@(unwindDate.OtcFormatDate())
支付日期
@(tc.PayDate.OtcFormatDate())
实现盈亏
平仓总额
收支方向
资金类别
应返还本金
利息金额
预付金平仓盈亏
@foreach (var item in DealInterests.Where(x => x.InterestMode == 5 || x.InterestMode == 6))
{
var bgclass = item.InterestDirection == (int)SwapDirectionEnum.收取 ? "swapget" : "swappay";
@((SwapDirectionEnum)item.InterestDirection)
@(item.InterestModeStr)
}
收支方向
@*计息基准
计息开始日
计息结束日
利率(年化) *@
其他费用
利息金额
利息端平仓盈亏
@foreach (var item in DealInterests.Where(x => ConsTrade.InterestModels.Contains(x.InterestMode)))
{
var bgclass = item.InterestDirection == (int)SwapDirectionEnum.收取 ? "swapget" : "swappay";
@((SwapDirectionEnum)item.InterestDirection)
@*@(item.Principal.OtcFormatMoney(true))
@(item.InterestStartDate.OtcFormatDate())
@(item.InterestEndDate.OtcFormatDate())
@(item.Rate.OtcFormatPercent()) *@
}
@if (!hideFloatingIncomeDirection)
{
收支方向
}
多空方向
标的代码
@if (isBond)
{
期初标的交割全价%
期末标的交割全价%
}
else
{
期初标的价格
期末标的价格
}
数量
交易费用
交易费用(待结算)
分红收益
浮动端平仓盈亏
@if (!hideFloatingIncomeDirection)
{
@((SwapDirectionEnum)closeFloat.PayDirection)
}
@FloatingPositionTypeText(closeFloat.PayDirection, closeFloat.PositionType)
@closeFloat.UnderlyingCode
@if (isBond)
{
}
else
{
}
}
}
@if (!singleTrade && closeSwapDeals.Count > 0)
{
var index = 1;
@foreach (var eod in trade.eod_swaps)
{
提前终止序号
@(index++)
查看
起始日期
@(eod.CloseStartDate.OtcFormatDate())
平仓日期
@(eod.ValueDate.OtcFormatDate())
平仓总额
实现盈亏
}
}
@if (swap_deals.Count > 0)
{
var index = 1;
@foreach (var deal in swap_deals)
{
var tc = deal.unwindData;
var closeFloat = tc.FlowEvents.FirstOrDefault(x => !string.IsNullOrEmpty(x.UnderlyingCode));
var DealInterests = tc.FlowEvents.Where(x => string.IsNullOrEmpty(x.UnderlyingCode)).ToList();
var swapInterests = DealInterests.Where(x => ConsTrade.InterestModels.Contains(x.InterestMode)).ToList();
var marginInterests = DealInterests.Where(x => x.InterestMode == 5 || x.InterestMode == 6).ToList();
互换序号
@(index++)
互换名义本金
起始日期
@(tc.StartDate.OtcFormatDate())
互换日期
@(tc.ValueDate.OtcFormatDate())
支付日期
@(tc.PayDate?.OtcFormatDate() ?? tc.ValueDate.OtcFormatDate())
平仓总额
实现盈亏
@if (marginInterests.Count > 0)
{
收支方向
其他费用
利息金额
预付金平仓盈亏
@foreach (var item in marginInterests)
{
var bgclass = item.InterestDirection == (int)SwapDirectionEnum.收取 ? "swapget" : "swappay";
@((SwapDirectionEnum)item.InterestDirection)
}
}
@if (swapInterests.Count > 0)
{
收支方向
其他费用
利息金额
利息端平仓盈亏
@foreach (var item in swapInterests)
{
var bgclass = item.InterestDirection == (int)SwapDirectionEnum.收取 ? "swapget" : "swappay";
@((SwapDirectionEnum)item.InterestDirection)
}
}
@if (singleTrade && closeFloat != null)
{
var fbgclass = closeFloat.PayDirection == (int)SwapDirectionEnum.收取 ? "swapget" : "swappay";
var multiplier = ConsGlobal.InstrumentType.IsBond(closeFloat.UnderlyingInstrumentType) ? 100 : 1;
@if (!hideFloatingIncomeDirection)
{
收支方向
}
多空方向
标的代码
@if (isBond)
{
@spotPriceTitle
@netSportPriceTitle
}
else
{
标的价格
}
@endSpotPriceTitle
数量
交易费用
分红收益
浮动端平仓盈亏
@if (!hideFloatingIncomeDirection)
{
@((SwapDirectionEnum)closeFloat.PayDirection)
}
@FloatingPositionTypeText(closeFloat.PayDirection, closeFloat.PositionType)
@closeFloat.UnderlyingCode
@if (isBond)
{
}
else
{
}
}
}
}
@if (trade.ClientCashInCashOutList.Count > 0)
{
资金编号
方向类型
金额
资金状态
操作人
创建人
发生时间
操作时间
备注
@foreach (var item in trade.ClientCashInCashOutList)
{
@item.Number
@item.TradeDirectionType
@(item.Money == 0 ? 0 : item.Money * -1)
@item.State
@item.OptName
@item.CreatorName
@item.HappenDate?.ToString("yyyy-MM-dd")
@item.OptDate?.ToString("yyyy-MM-dd HH:mm:ss")
@(item.Comments)
}
}