return matrix;
}
public static CurrencyMatrix createSyntheticConversionMatrix(final CurrencyPairs currencies) {
final SimpleCurrencyMatrix matrix = new SimpleCurrencyMatrix();
final Currency commonCross = Currency.USD;
for (final CurrencyPair pair : currencies.getPairs()) {
if (commonCross.equals(pair.getBase()) || commonCross.equals(pair.getCounter())) {
matrix.setLiveData(pair.getCounter(), pair.getBase(),
new ValueRequirement(MarketDataRequirementNames.MARKET_VALUE, ComputationTargetType.PRIMITIVE, ExternalId.of(ExternalSchemes.OG_SYNTHETIC_TICKER.getName(), pair.getBase().getCode() +
pair.getCounter().getCode())));
}
}
for (final CurrencyPair pair : currencies.getPairs()) {
if (!commonCross.equals(pair.getBase()) && !commonCross.equals(pair.getCounter())) {
matrix.setCrossConversion(pair.getCounter(), pair.getBase(), commonCross);
}
}
dumpMatrix(matrix);
return matrix;