final CreditSecurityToIdentifierVisitor identifierVisitor = new CreditSecurityToIdentifierVisitor(OpenGammaExecutionContext.getSecuritySource(executionContext));
final FinancialSecurity security = (FinancialSecurity) target.getPosition().getSecurity();
final String spreadCurveName = security.accept(identifierVisitor).getUniqueId().getValue();
//TODO
final String curveName = getCurvePrefix() + "_" + spreadCurveName;
final CurveSpecification curveSpecification = CurveUtils.getCurveSpecification(snapshotClock.instant(), configSource, now, curveName);
DoubleTimeSeries<?> fxSeries = null;
boolean isInverse = true;
if (!desiredCurrency.equals(currency)) {
final Object fxSeriesObject = inputs.getValue(ValueRequirementNames.HISTORICAL_FX_TIME_SERIES);
if (fxSeriesObject == null) {