105 lines
2.6 KiB
C#
105 lines
2.6 KiB
C#
using BaseOUDAL;
|
|
|
|
namespace YLErp.Model
|
|
{
|
|
public class RiskExposureModel
|
|
{
|
|
/// <summary>
|
|
/// 品种
|
|
/// </summary>
|
|
public string VarietyCode { get; set; }
|
|
|
|
/// <summary>
|
|
/// 品种指数收盘价
|
|
/// </summary>
|
|
public double? VarietyIndexClosePrice { get; set; }
|
|
|
|
/// <summary>
|
|
/// 品种指数日波动率
|
|
/// </summary>
|
|
public double? VarietyIndexDailyVol { get; set; }
|
|
|
|
public RiskIndicatorParameter FuturesIndicator { get; set; }
|
|
|
|
public OptionRiskIndicatorParameter OptionIndicator { get; set; }
|
|
|
|
public RiskIndicatorParameter PortfolioIndicator => new RiskIndicatorParameter
|
|
{
|
|
Delta = FuturesIndicator.Delta + OptionIndicator.Delta,
|
|
Pnl = FuturesIndicator.Pnl + OptionIndicator.Pnl
|
|
};
|
|
|
|
/// <summary>
|
|
/// 组合Delta敞口比例
|
|
/// </summary>
|
|
public double? DeltaExposureRatio { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gamma*日波动率*指数收盘价
|
|
/// </summary>
|
|
public double? GammaDailyVolClosePrice { get; set; }
|
|
|
|
/// <summary>
|
|
/// 风险价值
|
|
/// </summary>
|
|
public double? VAR { get; set; }
|
|
|
|
/// <summary>
|
|
/// 是否超敞口
|
|
/// </summary>
|
|
public bool? IsOverexposure { get; set; }
|
|
}
|
|
|
|
public class RiskExposureModelSum
|
|
{
|
|
public double? FuturesPnlSum { get; set; }
|
|
|
|
public double? FuturesDeltaSum { get; set; }
|
|
|
|
public double? OptionPnlSum { get; set; }
|
|
|
|
public double? OptionDeltaSum { get; set; }
|
|
|
|
public double? OptionGamma { get; set; }
|
|
|
|
public double? PortfolioPnlSum { get; set; }
|
|
|
|
public double? PortfolioDeltaSum { get; set; }
|
|
|
|
public double? VARSum { get; set; }
|
|
}
|
|
|
|
public class RiskIndicatorParameter
|
|
{
|
|
/// <summary>
|
|
/// 盈亏
|
|
/// </summary>
|
|
public double? Pnl { get; set; }
|
|
|
|
public double? Delta { get; set; }
|
|
}
|
|
|
|
public class OptionRiskIndicatorParameter : RiskIndicatorParameter
|
|
{
|
|
public double? Gamma { get; set; }
|
|
}
|
|
|
|
public class RiskExposureReq : BaseSearchReq
|
|
{
|
|
/// <summary>
|
|
/// 品种
|
|
/// </summary>
|
|
public string VarietyCodes { get; set; }
|
|
|
|
/// <summary>
|
|
/// 品种
|
|
/// </summary>
|
|
public List<string> VarietyCodeList => DataConvert.SplitByComma(VarietyCodes).ToList();
|
|
|
|
/// <summary>
|
|
/// 结算日
|
|
/// </summary>
|
|
public DateTime? SettlementDate { get; set; }
|
|
}
|
|
}
|