@Override public SwaptionVolatilitiesName getName() { return SwaptionVolatilitiesName.of(surface.getName().getName()); }
@Override public IborFutureOptionVolatilitiesName getName() { return IborFutureOptionVolatilitiesName.of(surface.getName().getName()); }
@Override public SwaptionVolatilitiesName getName() { return SwaptionVolatilitiesName.of(surface.getName().getName()); }
@Override public SwaptionVolatilitiesName getName() { return SwaptionVolatilitiesName.of(surface.getName().getName()); }
@Override public IborCapletFloorletVolatilitiesName getName() { return IborCapletFloorletVolatilitiesName.of(surface.getName().getName()); }
@Override public SwaptionVolatilitiesName getName() { return SwaptionVolatilitiesName.of(surface.getName().getName()); }
@Override public IborCapletFloorletVolatilitiesName getName() { return IborCapletFloorletVolatilitiesName.of(surface.getName().getName()); }
@Override public BondFutureVolatilitiesName getName() { return BondFutureVolatilitiesName.of(surface.getName().getName()); }
@Override public IborCapletFloorletVolatilitiesName getName() { return IborCapletFloorletVolatilitiesName.of(surface.getName().getName()); }
@ImmutablePreBuild private static void preBuild(Builder builder) { if (builder.name == null && builder.surface != null) { builder.name = FxOptionVolatilitiesName.of(builder.surface.getName().getName()); } }
/** * Obtains an instance from the implied volatility surface and the date-time for which it is valid. * <p> * {@code FxOptionVolatilitiesName} is built from the name in {@code Surface}. * <p> * The surface is specified by an instance of {@link Surface}, such as {@link InterpolatedNodalSurface}. * The surface must contain the correct metadata: * <ul> * <li>The x-value type must be {@link ValueType#YEAR_FRACTION} * <li>The y-value type must be {@link ValueType#STRIKE} * <li>The z-value type must be {@link ValueType#BLACK_VOLATILITY} * <li>The day count must be set in the additional information using {@link SurfaceInfoType#DAY_COUNT} * </ul> * Suitable surface metadata can be created using * {@link Surfaces#blackVolatilityByExpiryStrike(String, DayCount)}. * * @param currencyPair the currency pair * @param valuationDateTime the valuation date-time * @param surface the volatility surface * @return the volatilities */ public static BlackFxOptionSurfaceVolatilities of( CurrencyPair currencyPair, ZonedDateTime valuationDateTime, Surface surface) { FxOptionVolatilitiesName name = FxOptionVolatilitiesName.of(surface.getName().getName()); return of(name, currencyPair, valuationDateTime, surface); }
public void test_of() { SurfaceName test = SurfaceName.of("Foo"); assertEquals(test.getName(), "Foo"); assertEquals(test.getMarketDataType(), Surface.class); assertEquals(test.toString(), "Foo"); assertEquals(test.compareTo(SurfaceName.of("Goo")) < 0, true); }