final Currency callCurrency = security.accept(ForexVisitors.getCallCurrencyVisitor());
final Object baseQuotePairsObject = inputs.getValue(ValueRequirementNames.CURRENCY_PAIRS);
if (baseQuotePairsObject == null) {
throw new OpenGammaRuntimeException("Could not get base/quote pair data");
}
final CurrencyPairs baseQuotePairs = (CurrencyPairs) baseQuotePairsObject;
final ValueRequirement desiredValue = desiredValues.iterator().next();
final String putCurveName = desiredValue.getConstraint(PUT_CURVE);
final String callCurveName = desiredValue.getConstraint(CALL_CURVE);
final String deltaName = desiredValue.getConstraint(PROPERTY_OTM_DELTA);
final String[] allCurveNames = getCurveNames(putCurrency, putCurveName, callCurrency, callCurveName, baseQuotePairs);
final SmileDeltaTermStructureVannaVolgaDataBundle smiles = getSmiles(putCurrency, callCurrency, allCurveNames, baseQuotePairs, deltaName, inputs);
final ForexOptionVanilla fxOption = (ForexOptionVanilla) getDerivative(security, allCurveNames, baseQuotePairs, now);
final MultipleCurrencyAmount pv = CALCULATOR.presentValue(fxOption, smiles);
ArgumentChecker.isTrue(pv.size() == 1, "result size must be one; have {}", pv.size());
final CurrencyAmount ca = pv.getCurrencyAmounts()[0];
final double amount = ca.getAmount();
final CurrencyPair baseQuotePair = baseQuotePairs.getCurrencyPair(putCurrency, callCurrency);
final ValueSpecification spec = getSpecification(target, desiredValue, baseQuotePair);
return Collections.singleton(new ComputedValue(spec, amount));
}