* @param target The computation target, not null
* @param fxMatrix The FX matrix, not null
* @return The Black surface and curve data
*/
protected BlackSwaptionFlatProvider getBlackSurface(final FunctionExecutionContext executionContext, final FunctionInputs inputs, final ComputationTarget target, final FXMatrix fxMatrix) {
final SecuritySource securitySource = OpenGammaExecutionContext.getSecuritySource(executionContext);
final SwaptionSecurity security = (SwaptionSecurity) target.getTrade().getSecurity();
final InstrumentDefinition<?> definition = getDefinitionFromTarget(target);
final MulticurveProviderInterface data = getMergedProviders(inputs, fxMatrix);
final VolatilitySurface volatilitySurface = (VolatilitySurface) inputs.getValue(INTERPOLATED_VOLATILITY_SURFACE);
final BlackFlatSwaptionParameters parameters = new BlackFlatSwaptionParameters(volatilitySurface.getSurface(),