276 lines
6.9 KiB
C#
276 lines
6.9 KiB
C#
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
namespace YLErp.DBModels
|
|
{
|
|
public class EodPnl : DBModelWithOperator
|
|
{
|
|
///// <summary>
|
|
///// 簿记账户信息
|
|
///// </summary>
|
|
//[DisplayName("簿记账户信息")]
|
|
//[Required]
|
|
//public int BookId { get; set; }
|
|
|
|
/// <summary>
|
|
/// 估值日
|
|
/// </summary>
|
|
[DisplayName("估值日")]
|
|
public DateTime ValueDate { get; set; }
|
|
|
|
/// <summary>
|
|
/// 交易信息
|
|
/// </summary>
|
|
[DisplayName("交易信息")]
|
|
public int TradeId { get; set; }
|
|
|
|
///// <summary>
|
|
///// 资产代码
|
|
///// </summary>
|
|
//[DisplayName("资产代码")]
|
|
//public string AssetCode { get; set; }
|
|
|
|
///// <summary>
|
|
///// 持仓类型
|
|
///// </summary>
|
|
//[DisplayName("持仓类型")]
|
|
//public string PositionType { get; set; }
|
|
|
|
///// <summary>
|
|
///// 结构类型
|
|
///// </summary>
|
|
//[DisplayName("结构类型")]
|
|
//public string TradeType { get; set; }
|
|
|
|
///// <summary>
|
|
///// 份额
|
|
///// </summary>
|
|
//[DisplayName("份额")]
|
|
//public double Notional { get; set; }
|
|
|
|
///// <summary>
|
|
///// 昨日价值
|
|
///// </summary>
|
|
//[DisplayName("昨日价值")]
|
|
//public double LastPv { get; set; }
|
|
|
|
///// <summary>
|
|
///// PV
|
|
///// </summary>
|
|
//public double Pv { get => _pv; set => _pv = NumberHelper.Normalize(value); }
|
|
|
|
///// <summary>
|
|
///// 四舍五入处理后的持仓市值
|
|
///// </summary>
|
|
//public double RoundedPv { get => _roundedPv; set => _roundedPv = NumberHelper.Normalize(value); }
|
|
|
|
///// <summary>
|
|
///// 当日价值
|
|
///// </summary>
|
|
//[DisplayName("当日价值")]
|
|
//public double DailyPnL { get => _dailyPnL; set => _dailyPnL = NumberHelper.Normalize(value); }
|
|
|
|
///// <summary>
|
|
///// 总盈亏
|
|
///// </summary>
|
|
//[DisplayName("总盈亏")]
|
|
//public double TotalPnL { get => _totalPnL; set => _totalPnL = NumberHelper.Normalize(value); }
|
|
|
|
///// <summary>
|
|
///// 持仓盈亏
|
|
///// </summary>
|
|
//[DisplayName("持仓盈亏")]
|
|
//public double PositionPnl { get => _positionPnl; set => _positionPnl = NumberHelper.Normalize(value); }
|
|
|
|
///// <summary>
|
|
///// 四舍五入处理后的持仓盈亏
|
|
///// </summary>
|
|
//[DisplayName("持仓盈亏")]
|
|
//public double RoundedPositionPnl { get => _roundedPositionPnl; set => _roundedPositionPnl = NumberHelper.Normalize(value); }
|
|
|
|
///// <summary>
|
|
///// RealizedPnL
|
|
///// </summary>
|
|
//[DisplayName("RealizedPnL")]
|
|
//public double RealizedPnL { get => realizedPnL; set => realizedPnL = NumberHelper.Normalize(value); }
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
[DisplayName("PnLPrice")]
|
|
public double PnLPrice { get; set; }
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
[DisplayName("PnLDelta")]
|
|
public double PnLDelta { get; set; }
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
[DisplayName("PnLGamma")]
|
|
public double PnLGamma { get; set; }
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
[DisplayName("PnLVega")]
|
|
public double PnLVega { get; set; }
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
[DisplayName("PnLTheta")]
|
|
public double PnLTheta { get; set; }
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
[DisplayName("PnLRho")]
|
|
public double PnLRho { get; set; }
|
|
|
|
/// <summary>
|
|
/// Psi 为分红率(q)的变化所产生的 PnL
|
|
/// </summary>
|
|
public double PnLPsi { get; set; }
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
[DisplayName("PnLPriceResidual")]
|
|
public double PnLPriceResidual { get; set; }
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
[DisplayName("PnLVolResidual")]
|
|
public double PnLVolResidual { get; set; }
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
[DisplayName("PnLPriceVolCross")]
|
|
public double PnLPriceVolCross { get; set; }
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
[DisplayName("PnLVol")]
|
|
public double PnLVol { get; set; }
|
|
|
|
/// <summary>
|
|
/// 未归因盈亏
|
|
/// </summary>
|
|
[DisplayName("未归因盈亏")]
|
|
public double UnexplainedPnL { get; set; }
|
|
|
|
/// <summary>
|
|
/// 已归因盈亏
|
|
/// </summary>
|
|
[DisplayName("已归因盈亏")]
|
|
public double ExplainedPnL { get; set; }
|
|
|
|
///// <summary>
|
|
///// 交易编号(准备删除)
|
|
///// </summary>
|
|
//[DisplayName("交易编号")]
|
|
//public string TradeNumber { get; set; }
|
|
|
|
/// <summary>
|
|
/// 对冲交易唯一编码
|
|
/// </summary>
|
|
[DisplayName("对冲交易唯一编码")]
|
|
public string HedgeUniqueCode { get; set; }
|
|
|
|
///// <summary>
|
|
///// 标的ID
|
|
///// </summary>
|
|
//[DisplayName("标的ID")]
|
|
//public int UnderlyingId { get; set; }
|
|
|
|
///// <summary>
|
|
///// 标的代码
|
|
///// </summary>
|
|
//[DisplayName("标的代码")]
|
|
//public string UnderlyingCode { get; set; }
|
|
|
|
///// <summary>
|
|
///// 成本
|
|
///// </summary>
|
|
//[DisplayName("标的代码")]
|
|
//public double Cost { get; set; }
|
|
|
|
///// <summary>
|
|
///// 手续费
|
|
///// </summary>
|
|
//[DisplayName("手续费")]
|
|
//public double Commission { get; set; }
|
|
|
|
///// <summary>
|
|
///// 场内期权合约号
|
|
///// </summary>
|
|
//[DisplayName("场内期权合约号")]
|
|
//public string ExchangeOptionCode { get; set; }
|
|
|
|
public override string ToString()
|
|
{
|
|
var tid = TradeId > 0 ? TradeId.ToString() : HedgeUniqueCode;
|
|
|
|
return $"{ValueDate:yyyy-MM-dd},{tid}";
|
|
}
|
|
|
|
public EodPnl Clone()
|
|
{
|
|
return (EodPnl)MemberwiseClone();
|
|
}
|
|
}
|
|
|
|
[Table("eod_pnl")]
|
|
public class eod_pnl : EodPnl
|
|
{
|
|
|
|
}
|
|
|
|
[Table("eod_pnl_hedgevol")]
|
|
public class eod_pnl_hedgevol : EodPnl
|
|
{
|
|
|
|
}
|
|
|
|
[Table("eod_pnl_extend")]
|
|
public class eod_pnl_extend : EodPnl
|
|
{
|
|
|
|
}
|
|
|
|
[Table("eod_pnl_extend_s")]
|
|
public class eod_pnl_extend_s : EodPnl
|
|
{
|
|
|
|
}
|
|
|
|
[Table("eod_pnl_openvol")]
|
|
public class eod_pnl_openvol : EodPnl
|
|
{
|
|
|
|
}
|
|
|
|
[Table("eod_pnl_s")]
|
|
public class eod_pnl_s : EodPnl
|
|
{
|
|
|
|
}
|
|
|
|
[Table("eod_pnl_hedgevol_s")]
|
|
public class eod_pnl_hedgevol_s : EodPnl
|
|
{
|
|
|
|
}
|
|
|
|
[Table("eod_pnl_openvol_s")]
|
|
public class eod_pnl_openvol_s : EodPnl
|
|
{
|
|
|
|
}
|
|
}
|