final FinancialSecurity security = (FinancialSecurity) target.getSecurity();
final ComputationTargetSpecification currencyTarget = ComputationTargetSpecification.of(FinancialSecurityUtils.getCurrency(target.getSecurity()));
final String yieldCurveName = Iterables.getOnlyElement(yieldCurveNames);
final String yieldCurveCalculationConfigName = Iterables.getOnlyElement(yieldCurveCalculationConfigNames);
final String yieldCurveCalculationMethodName = Iterables.getOnlyElement(yieldCurveCalculationMethodNames);
final CreditSecurityToIdentifierVisitor identifierVisitor = new CreditSecurityToIdentifierVisitor(OpenGammaCompilationContext.getSecuritySource(context));
final String spreadCurveName = security.accept(identifierVisitor).getUniqueId().getValue();
final ValueRequirement yieldCurveRequirement = YieldCurveFunctionUtils.getCurveRequirement(currencyTarget, yieldCurveName, yieldCurveCalculationConfigName,
yieldCurveCalculationMethodName);
final ValueProperties.Builder spreadCurveProperties = ValueProperties.builder()