BugFix 系统中MarkCloseValue歧义部分修改
This commit is contained in:
@@ -1099,8 +1099,8 @@ namespace YLErp.Modules.SwapModule
|
||||
floatEvent.TradingFeePending = Math.Round(floatEvent.TradingFeePending, ConsGlobal.MoneyRound, MidpointRounding.AwayFromZero);
|
||||
floatEvent.TradingFee = closeFee;
|
||||
floatEvent.MarkClosePnl = (unwindPrice - position.PosiGrossPrice) * unwindQty * floatRatio * longRatio;
|
||||
//修改,盯市不要加上 分红
|
||||
floatEvent.MarkClosePnl = Math.Round(floatEvent.MarkClosePnl + ((floatEvent.TradingFeePending + closeFee) * floatRatio * -1), ConsGlobal.MoneyRound, MidpointRounding.AwayFromZero);
|
||||
//MarkClosePnl 纯盯市不要计算交易费用和分红
|
||||
floatEvent.MarkClosePnl = Math.Round(floatEvent.MarkClosePnl, ConsGlobal.MoneyRound, MidpointRounding.AwayFromZero);
|
||||
floatEvent.TradingAmount = unwindPrice * floatEvent.Quantity * floatEvent.ContractSize;
|
||||
floatEvent.TradingAmount = Math.Round(floatEvent.TradingAmount, ConsGlobal.MoneyRound, MidpointRounding.AwayFromZero);
|
||||
floatEvent.OptLog = "流水自动";
|
||||
@@ -1347,7 +1347,7 @@ namespace YLErp.Modules.SwapModule
|
||||
var floatPosition = unwindData.FlowEvents.FirstOrDefault(x => !string.IsNullOrEmpty(x.UnderlyingCode));
|
||||
var interestList = unwindData.FlowEvents.Where(x => string.IsNullOrEmpty(x.UnderlyingCode));
|
||||
decimal floatRatio = floatPosition.PayDirection == 1 ? 1m : -1m;
|
||||
var pnl = floatPosition.MarkClosePnl;
|
||||
var pnl = floatPosition.FloatPnlSum;
|
||||
unwindData.SwapCloseAmount = pnl;
|
||||
unwindData.SwapRealizedPnL = pnl;
|
||||
unwindData.SwapMarginRebatePnl = 0;
|
||||
|
||||
@@ -93,7 +93,7 @@ namespace YLErp.Modules.SwapModule
|
||||
if (x.trade.StructureType == "多空组合")
|
||||
{
|
||||
UnwindData unwindData = new UnwindData();
|
||||
unwindData.SwapCloseAmount = x.swap_flow_event.MarkClosePnl;
|
||||
unwindData.SwapCloseAmount = x.swap_flow_event.FloatPnlSum;
|
||||
x.swap_event.unwindData = unwindData;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1507,12 +1507,9 @@ namespace YLErp.Modules.SwapModule
|
||||
{
|
||||
curretEod.PosiDividendSum = 0;
|
||||
}
|
||||
if (curretEod.PosiDividendSum == 0)//这里处理一下已实现盈亏和互换价值,其他在处理分红的时候会处理
|
||||
{
|
||||
curretEod.RealizedPnl += curretEod.TdCloseDividend;
|
||||
curretEod.SwapPositionValue -= curretEod.TdCloseDividend;
|
||||
curretEod.RealizedPnl += curretEod.TdCloseDividend;
|
||||
curretEod.SwapPositionValue -= curretEod.TdCloseDividend;
|
||||
|
||||
}
|
||||
curretEod.PosiProfitSum = curretEod.PosiMtmPnL + curretEod.PosiDividendSum + curretEod.PosiFeePending;
|
||||
if (curretEod.PosiStatus == 1)
|
||||
{
|
||||
|
||||
@@ -525,8 +525,8 @@ namespace YLErp.Modules.SwapModule
|
||||
{
|
||||
item.TradeFee = item.FlowEvent.TradingFee;
|
||||
item.TradingFee = item.FlowEvent.TradingFeePending;
|
||||
item.PosiPnl= item.FlowEvent.MarkClosePnl- item.TradeFee-item.FlowEvent.DividendIn - item.TradingFee;
|
||||
item.NetSettmentAmount = item.FlowEvent.MarkClosePnl + item.FlowEvent.InterestClosePnL;
|
||||
item.PosiPnl= item.FlowEvent.MarkClosePnl;//MarkClosePnl 纯盯市不计算交易费用和分红
|
||||
item.NetSettmentAmount = item.FlowEvent.FloatPnlSum + item.FlowEvent.InterestClosePnL;
|
||||
item.Days = (item.FlowEvent.UnwindDate - item.StartDate).Value.Days;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user