public ExchangeRate lookup(final Currency source, final Currency target, Date date, final ExchangeRate.Type type) {
if (source.equals(target))
return new ExchangeRate(source, target, 1.0);
if (date.isToday()) {
date = new Settings().evaluationDate();
}
if (type == ExchangeRate.Type.Direct)
return directLookup(source, target, date);
else if (!source.triangulationCurrency().empty()) {