throw new OpenGammaRuntimeException("Could not get any data for " + volatilityDataRequirement);
}
final Interpolator1D xInterpolator = CombinedInterpolatorExtrapolatorFactory.getInterpolator(xInterpolatorName, leftXExtrapolatorName, rightXExtrapolatorName);
final Interpolator1D yInterpolator = CombinedInterpolatorExtrapolatorFactory.getInterpolator(yInterpolatorName, leftYExtrapolatorName, rightYExtrapolatorName);
final GridInterpolator2D interpolator = new GridInterpolator2D(xInterpolator, yInterpolator);
final Surface<Double, Double, Double> surface = InterpolatedDoublesSurface.from(x.toDoubleArray(), y.toDoubleArray(), sigma.toDoubleArray(), interpolator);
final VolatilitySurface volatilitySurface = new VolatilitySurface(surface);
final ValueProperties properties = getResultProperties(surfaceName, instrumentType, leftXExtrapolatorName, rightXExtrapolatorName, xInterpolatorName, leftYExtrapolatorName,
rightYExtrapolatorName, yInterpolatorName);
final ValueSpecification spec = new ValueSpecification(ValueRequirementNames.INTERPOLATED_VOLATILITY_SURFACE, target.toSpecification(), properties);
return Collections.singleton(new ComputedValue(spec, volatilitySurface));