@Override
protected Set<ComputedValue> getResult(final InstrumentDerivative forex, final ForexOptionDataBundle<?> data, final ComputationTarget target,
final Set<ValueRequirement> desiredValues, final FunctionInputs inputs, final ValueSpecification spec, final FunctionExecutionContext executionContext) {
if (data instanceof SmileDeltaTermStructureDataBundle) {
final double result = forex.accept(ForwardBlackGammaForexCalculator.getInstance(), data);
return Collections.singleton(new ComputedValue(spec, result));
}
throw new OpenGammaRuntimeException("Can only calculate forward gamma for surfaces with smiles");
}