namespace YLErp.QdpModule.Constants
{
public class ConsVolInfos
{
public const string 财务 = "财务"; //结算
public const string 交易 = "交易";
public const string 报价Bid = "报价Bid";
public const string 报价Ask = "报价Ask";
public const string BidAsk = "BidAsk";
///
/// 波动率曲面类型
///
public static readonly IReadOnlyList VolTypes = new List { 交易, "风控", 财务, "客户", 报价Bid, 报价Ask, "其它" }.AsReadOnly();
public static readonly Dictionary VolTypesFormat = new Dictionary();
public static readonly IReadOnlyList VolTypesWithOutAB = new List { 交易, "风控", 财务, "客户", "隐含", "其它" }.AsReadOnly();
public static readonly IReadOnlyList TradeVolTypes = new List() { 交易, 报价Bid, 报价Ask }.AsReadOnly();
///
/// 波动率模式
///
public static readonly List VolSurfaceModes = new List { "MoneynessVol", "StrikeVol" };
///
/// 波动率模式(国泰君安)
///
public static readonly List Gtja_VolSurfaceModes = new List { "MoneynessVol" };
///
/// MoneynessVol StrikeVol
///
public static Dictionary InterpolationMethods = new Dictionary();
///
/// 日终持仓风险波动率类型
///
public static List VolTypesForEodTradeRisk = new List { "对冲", "持仓", "开仓" };
public const string defVolType = "交易";
public const string defVolMode = "MoneynessVol";
public const string defInterpolationMethod = ConsVolMethod.Default;
public const double defVol = ConsGlobal.DefaultVol;
public const double defOptId = -1;
public const string defOptName = "系统";
///
/// 审核波动率下限
///
public const double defReviewDownLimit = 0.3;
///
/// 审核波动率上限
///
public const double defReviewUpLimit = 0.7;
public static List DefaultVolStrikeList = new List { 2000, 2100, 2200 };
public static readonly List DefaultMoneynessVolStrikeList = new List { 0.9, 0.95, 1, 1.05, 1.1 };
public static readonly List DefaultVolTenorList = new List { "1D", "2M", "1Y" };
public static readonly IEnumerable subTradeVolType = new List { "报价Bid", "报价Ask" }.AsReadOnly();
static ConsVolInfos()
{
VolTypesFormat["交易Mid"] = 交易;
VolTypesFormat["风控"] = "风控";
VolTypesFormat[财务] = 财务;
VolTypesFormat["客户"] = "客户";
VolTypesFormat["交易Bid"] = 报价Bid;
VolTypesFormat["交易Ask"] = 报价Ask;
InterpolationMethods[ConsVolMethod.BiLinear] = ConsVolMethod.BiLinear;
InterpolationMethods[ConsVolMethod.BiCubicSpline] = ConsVolMethod.BiCubicSpline;
InterpolationMethods[ConsVolMethod.VarianceBiLinear] = ConsVolMethod.VarianceBiLinear;
InterpolationMethods[ConsVolMethod.VarianceBiCubicSpline] = ConsVolMethod.VarianceBiCubicSpline;
}
///
/// 获取波动率类型组
///
public static List GetVolTypes(string volType)
{
if (volType == 交易)
{
return new List() { 交易, 报价Bid, 报价Ask };
}
return new List() { volType };
}
}
///
/// 波动率插值方法常量
///
public class ConsVolMethod
{
public const string BiLinear = "BiLinear";
public const string BiCubicSpline = "BiCubicSpline";
public const string VarianceBiLinear = "VarianceBiLinear";
public const string VarianceBiCubicSpline = "VarianceBiCubicSpline";
///
/// 默认波动率类型
///
public const string Default = "BiLinear";
}
}