694 lines
23 KiB
C#
694 lines
23 KiB
C#
using YLErp.Commons;
|
|
using static YLErp.Models.OtcFormatModel;
|
|
|
|
namespace System
|
|
{
|
|
/// <summary>
|
|
/// OtcFormat扩展
|
|
/// </summary>
|
|
public static class OtcFormatExtensions
|
|
{
|
|
static TradingFormat tradingFormat => OtcFormatHelper.FormatModel.trading;
|
|
|
|
public static string OtcFormat(this double? d, OtcFormatFlag fmt)
|
|
{
|
|
if (d == -0) d = 0;
|
|
return d.HasValue ? OtcFormat(d.Value, fmt) : string.Empty;
|
|
}
|
|
|
|
/// <summary>
|
|
/// OtcFormat扩展
|
|
/// </summary>
|
|
public static string OtcFormat(this double d, OtcFormatFlag fmt)
|
|
{
|
|
switch (fmt)
|
|
{
|
|
case OtcFormatFlag.umprice:
|
|
return tradingFormat.umprice.Format(d);
|
|
|
|
case OtcFormatFlag.umpriceP:
|
|
return tradingFormat.umpriceP.Format(d);
|
|
|
|
case OtcFormatFlag.umpricePR:
|
|
return tradingFormat.umpricePR.Format(d);
|
|
|
|
case OtcFormatFlag.tradePrice:
|
|
return d.ToString("0.00");
|
|
|
|
case OtcFormatFlag.tradeSinglePrice:
|
|
return tradingFormat.tradeSinglePrice.Format(d);
|
|
|
|
case OtcFormatFlag.StockEqvNotional:
|
|
return tradingFormat.StockEqvNotional.Format(d);
|
|
|
|
case OtcFormatFlag.premiumRate:
|
|
return tradingFormat.premiumRate.Format(d);
|
|
|
|
case OtcFormatFlag.premiumRateP:
|
|
return tradingFormat.premiumRateP.Format(d);
|
|
|
|
case OtcFormatFlag.notional:
|
|
return tradingFormat.notional.Format(d);
|
|
|
|
case OtcFormatFlag.notionalP:
|
|
return tradingFormat.notionalP.Format(d);
|
|
|
|
case OtcFormatFlag.greek:
|
|
return tradingFormat.greek.Format(d);
|
|
|
|
case OtcFormatFlag.percent:
|
|
return d.ToString("0.00%");
|
|
|
|
case OtcFormatFlag.percent4:
|
|
return d.ToString("0.0000%");
|
|
|
|
case OtcFormatFlag.volatility:
|
|
return tradingFormat.volatility.Format(d);
|
|
|
|
case OtcFormatFlag.volatilityP:
|
|
return tradingFormat.volatilityP.Format(d);
|
|
|
|
case OtcFormatFlag.marginRate:
|
|
return tradingFormat.marginRate.Format(d);
|
|
|
|
case OtcFormatFlag.marginRateP:
|
|
return tradingFormat.marginRateP.Format(d);
|
|
|
|
default: return d.ToString("0.00");
|
|
}
|
|
}
|
|
|
|
public static string OtcFormat(this decimal? d, OtcFormatFlag fmt)
|
|
{
|
|
if (d == -0) d = 0;
|
|
return d.HasValue ? OtcFormat(d.Value, fmt) : string.Empty;
|
|
}
|
|
|
|
/// <summary>
|
|
/// OtcFormat扩展
|
|
/// </summary>
|
|
public static string OtcFormat(this decimal d, OtcFormatFlag fmt)
|
|
{
|
|
switch (fmt)
|
|
{
|
|
case OtcFormatFlag.umprice:
|
|
return tradingFormat.umprice.Format(d);
|
|
|
|
case OtcFormatFlag.umpriceP:
|
|
return tradingFormat.umpriceP.Format(d);
|
|
|
|
case OtcFormatFlag.umpricePR:
|
|
return tradingFormat.umpricePR.Format(d);
|
|
|
|
case OtcFormatFlag.tradePrice:
|
|
return d.ToString("0.00");
|
|
|
|
case OtcFormatFlag.tradeSinglePrice:
|
|
return tradingFormat.tradeSinglePrice.Format(d);
|
|
|
|
case OtcFormatFlag.StockEqvNotional:
|
|
return tradingFormat.StockEqvNotional.Format(d);
|
|
|
|
case OtcFormatFlag.premiumRate:
|
|
return tradingFormat.premiumRate.Format(d);
|
|
|
|
case OtcFormatFlag.premiumRateP:
|
|
return tradingFormat.premiumRateP.Format(d);
|
|
|
|
case OtcFormatFlag.notional:
|
|
return tradingFormat.notional.Format(d);
|
|
|
|
case OtcFormatFlag.notionalP:
|
|
return tradingFormat.notionalP.Format(d);
|
|
|
|
case OtcFormatFlag.greek:
|
|
return tradingFormat.greek.Format(d);
|
|
|
|
case OtcFormatFlag.percent:
|
|
return d.ToString("0.00%");
|
|
|
|
case OtcFormatFlag.percent4:
|
|
return d.ToString("0.0000%");
|
|
|
|
case OtcFormatFlag.volatility:
|
|
return tradingFormat.volatility.Format(d);
|
|
|
|
case OtcFormatFlag.volatilityP:
|
|
return tradingFormat.volatilityP.Format(d);
|
|
|
|
case OtcFormatFlag.marginRate:
|
|
return tradingFormat.marginRate.Format(d);
|
|
|
|
case OtcFormatFlag.marginRateP:
|
|
return tradingFormat.marginRateP.Format(d);
|
|
|
|
default: return d.ToString("0.00");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// 数字格式化
|
|
/// </summary>
|
|
public static string OtcFormatFlex(this double? d, int minDecimals, int maxDecimals = 6
|
|
, bool percent = false, bool grouping = false, bool rounded = true)
|
|
{
|
|
if (d.HasValue)
|
|
{
|
|
var d2 = d.Value;
|
|
|
|
if (double.IsNaN(d2) || double.IsInfinity(d2))
|
|
{
|
|
return string.Empty;
|
|
}
|
|
|
|
if (!rounded)
|
|
{
|
|
d2 = NumberHelper.Truncate(d2, minDecimals: minDecimals, maxDecimals: maxDecimals, percent: percent);
|
|
}
|
|
|
|
return d2.ToString(NumberHelper.GetFormat(minDecimals: minDecimals, maxDecimals: maxDecimals, percent: percent, grouping: grouping));
|
|
}
|
|
|
|
return string.Empty;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 数字格式化
|
|
/// </summary>
|
|
public static string OtcFormatFlex(this double d, int minDecimals, int maxDecimals = 6
|
|
, bool percent = false, bool grouping = false, bool rounded = true)
|
|
{
|
|
if (double.IsNaN(d) || double.IsInfinity(d))
|
|
{
|
|
return string.Empty;
|
|
}
|
|
|
|
if (!rounded)
|
|
{
|
|
d = NumberHelper.Truncate(d, minDecimals: minDecimals, maxDecimals: maxDecimals, percent: percent);
|
|
}
|
|
|
|
return d.ToString(NumberHelper.GetFormat(minDecimals: minDecimals, maxDecimals: maxDecimals, percent: percent, grouping: grouping));
|
|
}
|
|
|
|
/// <summary>
|
|
/// OtcFormat扩展
|
|
/// </summary>
|
|
public static double OtcFormatValue(this double d, OtcFormatFlag fmt)
|
|
{
|
|
switch (fmt)
|
|
{
|
|
case OtcFormatFlag.umprice:
|
|
return tradingFormat.umprice.FormatValue(d);
|
|
|
|
case OtcFormatFlag.umpriceP:
|
|
return tradingFormat.umpriceP.FormatValue(d);
|
|
|
|
case OtcFormatFlag.umpricePR:
|
|
return tradingFormat.umpricePR.FormatValue(d);
|
|
|
|
case OtcFormatFlag.tradePrice:
|
|
return tradingFormat.tradePrice.FormatValue(d);
|
|
|
|
case OtcFormatFlag.tradeSinglePrice:
|
|
return tradingFormat.tradeSinglePrice.FormatValue(d);
|
|
|
|
case OtcFormatFlag.StockEqvNotional:
|
|
return tradingFormat.StockEqvNotional.FormatValue(d);
|
|
|
|
case OtcFormatFlag.premiumRate:
|
|
return tradingFormat.premiumRate.FormatValue(d);
|
|
|
|
case OtcFormatFlag.premiumRateP:
|
|
return tradingFormat.premiumRateP.FormatValue(d);
|
|
|
|
case OtcFormatFlag.notional:
|
|
return tradingFormat.notional.FormatValue(d);
|
|
|
|
case OtcFormatFlag.notionalP:
|
|
return tradingFormat.notionalP.FormatValue(d);
|
|
|
|
case OtcFormatFlag.greek:
|
|
return tradingFormat.greek.FormatValue(d);
|
|
|
|
case OtcFormatFlag.percent:
|
|
return OtcFormatHelper.FormatValue(d * 100, 2);
|
|
|
|
case OtcFormatFlag.percent4:
|
|
return OtcFormatHelper.FormatValue(d * 100, 4);
|
|
|
|
case OtcFormatFlag.volatility:
|
|
return tradingFormat.volatility.FormatValue(d);
|
|
|
|
case OtcFormatFlag.volatilityP:
|
|
return tradingFormat.volatilityP.FormatValue(d);
|
|
|
|
case OtcFormatFlag.marginRate:
|
|
return tradingFormat.marginRate.FormatValue(d);
|
|
|
|
case OtcFormatFlag.marginRateP:
|
|
return tradingFormat.marginRateP.FormatValue(d);
|
|
|
|
default: return OtcFormatHelper.FormatValue(d, 2);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// OtcFormat扩展
|
|
/// </summary>
|
|
public static double? OtcFormatValue(this double? d, OtcFormatFlag fmt)
|
|
{
|
|
return d.HasValue ? OtcFormatValue(d.Value, fmt) : d;
|
|
}
|
|
|
|
/// <summary>
|
|
/// OtcFormat扩展
|
|
/// </summary>
|
|
public static double OtcFormatValue(this double d, int precision, bool rounded = true)
|
|
{
|
|
return OtcFormatHelper.FormatValue(d, precision, rounded);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 系统标的价格格式化
|
|
/// </summary>
|
|
public static string OtcFormatUmPrice(this double d, bool isMoneyness = false)
|
|
{
|
|
return isMoneyness ? tradingFormat.umpriceP.Format(d) : tradingFormat.umprice.Format(d);
|
|
}
|
|
/// <summary>
|
|
/// 系统标的价格格式化
|
|
/// </summary>
|
|
public static string OtcFormatUmPrice(this decimal d, bool isMoneyness = false)
|
|
{
|
|
return isMoneyness ? tradingFormat.umpriceP.Format(Convert.ToDouble(d)) : tradingFormat.umprice.Format(Convert.ToDouble(d));
|
|
}
|
|
/// <summary>
|
|
/// 系统标的价格格式化
|
|
/// </summary>
|
|
public static string OtcFormatUmPrice(this double? d, bool isMoneyness = false)
|
|
{
|
|
if (d.HasValue)
|
|
{
|
|
return isMoneyness ? tradingFormat.umpriceP.Format(d.Value) : tradingFormat.umprice.Format(d.Value);
|
|
}
|
|
return string.Empty;
|
|
}
|
|
public static string OtcFormatUmPrice(this decimal? d, bool isMoneyness = false)
|
|
{
|
|
if (d.HasValue)
|
|
{
|
|
return isMoneyness ? tradingFormat.umpriceP.Format(Convert.ToDouble(d)) : tradingFormat.umprice.Format(Convert.ToDouble(d));
|
|
}
|
|
return string.Empty;
|
|
}
|
|
/// <summary>
|
|
/// 系统金额格式化
|
|
/// </summary>
|
|
public static string OtcFormatMoney(this double? d, bool grouping = false, int minDecimals = 2)
|
|
{
|
|
var sb = StringBuilderPool.Acquire();
|
|
sb.Append(grouping ? "#,##0" : "0");
|
|
|
|
if (minDecimals > 0)
|
|
{
|
|
sb.Append('.').Append('0', minDecimals);
|
|
}
|
|
var formatStr=sb.Release();
|
|
var v = d.HasValue ? d.Value.ToString(formatStr) : string.Empty;
|
|
|
|
// 处理v=="-0.00"问题
|
|
if (!string.IsNullOrEmpty(v) && double.TryParse(v, out double result))
|
|
{
|
|
if (result == 0)
|
|
{
|
|
v = 0d.ToString(formatStr);
|
|
}
|
|
}
|
|
return v;
|
|
}
|
|
/// <summary>
|
|
/// 系统金额格式化
|
|
/// </summary>
|
|
public static string OtcFormatMoney(this decimal? d, bool grouping = false)
|
|
{
|
|
var v = d.HasValue ? d.Value.ToString(grouping ? "#,##0.00" : "0.00") : string.Empty;
|
|
|
|
// 处理v=="-0.00"问题
|
|
if (!string.IsNullOrEmpty(v) && decimal.TryParse(v, out decimal result))
|
|
{
|
|
if (result == 0)
|
|
{
|
|
v = 0d.ToString(grouping ? "#,##0.00" : "0.00");
|
|
}
|
|
}
|
|
return v;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 系统金额格式化
|
|
/// </summary>
|
|
public static string OtcFormatMoney(this double d, bool grouping = false, int minDecimals = 2)
|
|
{
|
|
var sb = StringBuilderPool.Acquire();
|
|
sb.Append(grouping ? "#,##0" : "0");
|
|
|
|
if (minDecimals > 0)
|
|
{
|
|
sb.Append('.').Append('0', minDecimals);
|
|
}
|
|
var formatStr = sb.Release();
|
|
var v = d.ToString(formatStr);
|
|
|
|
// 处理v=="-0.00"问题
|
|
if (double.TryParse(v, out double result))
|
|
{
|
|
if (result == 0)
|
|
{
|
|
v = 0d.ToString(formatStr);
|
|
}
|
|
}
|
|
|
|
return v;
|
|
}
|
|
/// <summary>
|
|
/// 系统金额格式化
|
|
/// </summary>
|
|
public static string OtcFormatMoney(this decimal d, bool grouping = false, int minDecimals = 2)
|
|
{
|
|
var sb = StringBuilderPool.Acquire();
|
|
sb.Append(grouping ? "#,##0" : "0");
|
|
|
|
if (minDecimals > 0)
|
|
{
|
|
sb.Append('.').Append('0', minDecimals);
|
|
}
|
|
var formatStr = sb.Release();
|
|
var v = d.ToString(formatStr);
|
|
|
|
// 处理v=="-0.00"问题
|
|
if (decimal.TryParse(v, out decimal result))
|
|
{
|
|
if (result == 0)
|
|
{
|
|
v = 0d.ToString(formatStr);
|
|
}
|
|
}
|
|
|
|
return v;
|
|
}
|
|
/// <summary>
|
|
/// 系统数量格式化
|
|
/// </summary>
|
|
public static string OtcFormatNotional(this double? d, bool isPercent = false)
|
|
{
|
|
if (d.HasValue)
|
|
{
|
|
return isPercent ? tradingFormat.notionalP.Format(d.Value) : tradingFormat.notional.Format(d.Value);
|
|
}
|
|
return string.Empty;
|
|
}
|
|
/// <summary>
|
|
/// 系统数量格式化
|
|
/// </summary>
|
|
public static string OtcFormatNotional(this decimal? d, bool isPercent = false)
|
|
{
|
|
if (d.HasValue)
|
|
{
|
|
return isPercent ? tradingFormat.notionalP.Format(Convert.ToDouble(d)) : tradingFormat.notional.Format(Convert.ToDouble(d));
|
|
}
|
|
return string.Empty;
|
|
}
|
|
/// <summary>
|
|
/// 系统数量格式化
|
|
/// </summary>
|
|
public static string OtcFormatNotional(this double? d, int? CountRatio, bool IsUseDisplayNotional = false, bool isPercent = false)
|
|
{
|
|
if (d.HasValue)
|
|
{
|
|
d = IsUseDisplayNotional ? d.Value * (CountRatio ?? 1) : d.Value;
|
|
|
|
return isPercent ? tradingFormat.notionalP.Format(d.Value) : tradingFormat.notional.Format(d.Value);
|
|
}
|
|
return string.Empty;
|
|
}
|
|
/// <summary>
|
|
/// 系统数量格式化
|
|
/// </summary>
|
|
public static string OtcFormatNotional(this decimal? d, int? CountRatio, bool IsUseDisplayNotional = false, bool isPercent = false)
|
|
{
|
|
if (d.HasValue)
|
|
{
|
|
d = IsUseDisplayNotional ? d.Value * (CountRatio ?? 1) : d.Value;
|
|
|
|
return isPercent ? tradingFormat.notionalP.Format(Convert.ToDouble(d)) : tradingFormat.notional.Format(Convert.ToDouble(d));
|
|
}
|
|
return string.Empty;
|
|
}
|
|
/// <summary>
|
|
/// 系统数量格式化
|
|
/// </summary>
|
|
public static string OtcFormatNotional(this double d, bool isPercent = false)
|
|
{
|
|
return isPercent ? tradingFormat.notionalP.Format(d) : tradingFormat.notional.Format(d);
|
|
}
|
|
/// <summary>
|
|
/// 系统数量格式化
|
|
/// </summary>
|
|
public static string OtcFormatNotional(this decimal d, bool isPercent = false)
|
|
{
|
|
return isPercent ? tradingFormat.notionalP.Format(Convert.ToDouble(d)) : tradingFormat.notional.Format(Convert.ToDouble(d));
|
|
}
|
|
/// <summary>
|
|
/// 系统数量格式化
|
|
/// </summary>
|
|
public static string OtcFormatNotional(this double d, int? CountRatio, bool IsUseDisplayNotional = false, bool isPercent = false)
|
|
{
|
|
d = IsUseDisplayNotional ? d * (CountRatio ?? 1) : d;
|
|
return isPercent ? tradingFormat.notionalP.Format(d) : tradingFormat.notional.Format(d);
|
|
}
|
|
/// <summary>
|
|
/// 系统数量格式化
|
|
/// </summary>
|
|
public static string OtcFormatNotional(this decimal d, int? CountRatio, bool IsUseDisplayNotional = false, bool isPercent = false)
|
|
{
|
|
d = IsUseDisplayNotional ? d * (CountRatio ?? 1) : d;
|
|
return isPercent ? tradingFormat.notionalP.Format(Convert.ToDouble(d)) : tradingFormat.notional.Format(Convert.ToDouble(d));
|
|
}
|
|
/// <summary>
|
|
/// 系统百分比格式化
|
|
/// </summary>
|
|
public static string OtcFormatPercent(this double? d, int decimals = 2, bool grouping = false)
|
|
{
|
|
return d.HasValue ? OtcFormatPercent(d.Value, decimals, grouping) : string.Empty;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 系统百分比格式化
|
|
/// </summary>
|
|
public static string OtcFormatPercent(this double d, int decimals = 2, bool grouping = false)
|
|
{
|
|
if (double.IsNaN(d) || double.IsInfinity(d))
|
|
{
|
|
return string.Empty;
|
|
}
|
|
|
|
if (decimals <= 0)
|
|
{
|
|
return d.ToString(grouping ? "P0" : "0%");
|
|
}
|
|
|
|
if (grouping)
|
|
{
|
|
return d.ToString("P" + decimals);
|
|
}
|
|
|
|
switch (decimals)
|
|
{
|
|
case 0: return d.ToString("0%");
|
|
case 1: return d.ToString("0.0%");
|
|
case 2: return d.ToString("0.00%");
|
|
case 3: return d.ToString("0.000%");
|
|
case 4: return d.ToString("0.0000%");
|
|
case 5: return d.ToString("0.00000%");
|
|
case 6: return d.ToString("0.000000%");
|
|
default: return d.ToString("0." + new string('0', decimals) + "%");
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// 系统百分比格式化
|
|
/// </summary>
|
|
public static string OtcFormatPercent(this decimal? d, int decimals = 2, bool grouping = false)
|
|
{
|
|
return d.HasValue ? OtcFormatPercent(d.Value, decimals, grouping) : string.Empty;
|
|
}
|
|
/// <summary>
|
|
/// 系统万分比格式化
|
|
/// </summary>
|
|
public static string OtcFormatTenThousandsPercent(this decimal? d, int decimals = 2, bool grouping = false)
|
|
{
|
|
return d.HasValue ? OtcFormatTenThousandsPercent(d.Value, decimals, grouping) : string.Empty;
|
|
}
|
|
/// <summary>
|
|
/// 系统万分比格式化
|
|
/// </summary>
|
|
public static string OtcFormatTenThousandsPercent(this decimal d, int decimals = 2, bool grouping = false)
|
|
{
|
|
if (decimals <= 0)
|
|
{
|
|
return d.ToString(grouping ? "P0" : "0‱");
|
|
}
|
|
|
|
if (grouping)
|
|
{
|
|
return d.ToString("P" + decimals);
|
|
}
|
|
d = d * 10000;
|
|
switch (decimals)
|
|
{
|
|
case 0: return d.ToString("0‱");
|
|
case 1: return d.ToString("0.0‱");
|
|
case 2: return d.ToString("0.00‱");
|
|
case 3: return d.ToString("0.000‱");
|
|
case 4: return d.ToString("0.0000‱");
|
|
case 5: return d.ToString("0.00000‱");
|
|
case 6: return d.ToString("0.000000‱");
|
|
default: return d.ToString("0." + new string('0', decimals) + "‱");
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// 系统百分比格式化
|
|
/// </summary>
|
|
public static string OtcFormatPercent(this decimal d, int decimals = 2, bool grouping = false)
|
|
{
|
|
if (decimals <= 0)
|
|
{
|
|
return d.ToString(grouping ? "P0" : "0%");
|
|
}
|
|
|
|
if (grouping)
|
|
{
|
|
return d.ToString("P" + decimals);
|
|
}
|
|
|
|
switch (decimals)
|
|
{
|
|
case 0: return d.ToString("0%");
|
|
case 1: return d.ToString("0.0%");
|
|
case 2: return d.ToString("0.00%");
|
|
case 3: return d.ToString("0.000%");
|
|
case 4: return d.ToString("0.0000%");
|
|
case 5: return d.ToString("0.00000%");
|
|
case 6: return d.ToString("0.000000%");
|
|
default: return d.ToString("0." + new string('0', decimals) + "%");
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// 系统日期格式化
|
|
/// </summary>
|
|
public static string OtcFormatDate(this DateTime? date)
|
|
{
|
|
return date?.ToString("yyyy-MM-dd");
|
|
}
|
|
|
|
/// <summary>
|
|
/// 系统日期格式化
|
|
/// </summary>
|
|
public static string OtcFormatDate(this DateTime date)
|
|
{
|
|
return date.ToString("yyyy-MM-dd");
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public enum OtcFormatFlag
|
|
{
|
|
/// <summary>
|
|
/// 标的价格(障碍价格)百分比格式值
|
|
/// </summary>
|
|
umprice,
|
|
|
|
/// <summary>
|
|
/// 标的价格(障碍价格)百分比格式值
|
|
/// </summary>
|
|
umpriceP,
|
|
|
|
/// <summary>
|
|
/// 百分比格式真实值
|
|
/// </summary>
|
|
umpricePR,
|
|
|
|
/// <summary>
|
|
/// 总额(PV)
|
|
/// </summary>
|
|
tradePrice,
|
|
|
|
/// <summary>
|
|
/// 单价(期权费,补偿金额)
|
|
/// </summary>
|
|
tradeSinglePrice,
|
|
|
|
/// <summary>
|
|
/// 名义本金
|
|
/// </summary>
|
|
StockEqvNotional,
|
|
|
|
/// <summary>
|
|
/// 期权费率(补偿费率)百分比真实数值
|
|
/// </summary>
|
|
premiumRate,
|
|
|
|
/// <summary>
|
|
/// 期权费率%(补偿费率%) 百分比格式
|
|
/// </summary>
|
|
premiumRateP,
|
|
|
|
/// <summary>
|
|
/// 交易数量(平仓数量)
|
|
/// </summary>
|
|
notional,
|
|
|
|
/// <summary>
|
|
/// 交易数量比例(平仓数量比例)
|
|
/// </summary>
|
|
notionalP,
|
|
|
|
/// <summary>
|
|
/// 希腊值
|
|
/// </summary>
|
|
greek,
|
|
|
|
/// <summary>
|
|
/// 2位精度百分比格式
|
|
/// </summary>
|
|
percent,
|
|
|
|
/// <summary>
|
|
/// 4位小数百分比格式
|
|
/// </summary>
|
|
percent4,
|
|
|
|
/// <summary>
|
|
/// 波动率
|
|
/// </summary>
|
|
volatility,
|
|
|
|
/// <summary>
|
|
/// 波动率百分比格式
|
|
/// </summary>
|
|
volatilityP,
|
|
|
|
/// <summary>
|
|
/// 预付金率
|
|
/// </summary>
|
|
marginRate,
|
|
|
|
/// <summary>
|
|
/// 预付金率百分比格式
|
|
/// </summary>
|
|
marginRateP
|
|
}
|
|
}
|