@Override public BlackSwaptionExpiryTenorVolatilities build() { return new BlackSwaptionExpiryTenorVolatilities( convention, valuationDateTime, surface); }
private Object readResolve() { return new BlackSwaptionExpiryTenorVolatilities(convention, valuationDateTime, surface); }
/** * Obtains an instance from the implied volatility surface and the date-time for which it is valid. * <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#YEAR_FRACTION} * <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#blackVolatilityByExpiryTenor(String, DayCount)}. * * @param convention the swap convention that the volatilities are to be used for * @param valuationDateTime the valuation date-time * @param surface the implied volatility surface * @return the volatilities */ public static BlackSwaptionExpiryTenorVolatilities of( FixedIborSwapConvention convention, ZonedDateTime valuationDateTime, Surface surface) { return new BlackSwaptionExpiryTenorVolatilities(convention, valuationDateTime, surface); }
@Override public BlackSwaptionExpiryTenorVolatilities withPerturbation(ParameterPerturbation perturbation) { return new BlackSwaptionExpiryTenorVolatilities( convention, valuationDateTime, surface.withPerturbation(perturbation)); }
@Override public BlackSwaptionExpiryTenorVolatilities withParameter(int parameterIndex, double newValue) { return new BlackSwaptionExpiryTenorVolatilities( convention, valuationDateTime, surface.withParameter(parameterIndex, newValue)); }