/// <summary> /// Creates metadata for a surface providing Normal expiry-simple moneyness volatility. /// <para> /// The x-values represent time to expiry year fractions as defined by the specified day count. /// The y-values represent simple moneyness. /// The z-values represent Normal volatility. /// /// </para> /// </summary> /// <param name="name"> the surface name </param> /// <param name="dayCount"> the day count </param> /// <param name="moneynessType"> the moneyness type, prices or rates </param> /// <returns> the surface metadata </returns> public static SurfaceMetadata normalVolatilityByExpirySimpleMoneyness(SurfaceName name, DayCount dayCount, MoneynessType moneynessType) { return(DefaultSurfaceMetadata.builder().surfaceName(name).xValueType(ValueType.YEAR_FRACTION).yValueType(ValueType.SIMPLE_MONEYNESS).zValueType(ValueType.NORMAL_VOLATILITY).dayCount(dayCount).addInfo(SurfaceInfoType.MONEYNESS_TYPE, moneynessType).build()); }
//------------------------------------------------------------------------- /// <summary> /// Creates metadata for a surface providing Normal expiry-simple moneyness volatility. /// <para> /// The x-values represent time to expiry year fractions as defined by the specified day count. /// The y-values represent simple moneyness. /// The z-values represent Normal volatility. /// /// </para> /// </summary> /// <param name="name"> the surface name </param> /// <param name="dayCount"> the day count </param> /// <param name="moneynessType"> the moneyness type, prices or rates </param> /// <returns> the surface metadata </returns> public static SurfaceMetadata normalVolatilityByExpirySimpleMoneyness(string name, DayCount dayCount, MoneynessType moneynessType) { return(normalVolatilityByExpirySimpleMoneyness(SurfaceName.of(name), dayCount, moneynessType)); }