final Object receiveCurveObject = inputs.getValue(YieldCurveFunction.getCurveRequirement(receiveCurrency, _receiveCurveName, null, null));
if (receiveCurveObject == null) {
throw new OpenGammaRuntimeException("Could not get " + _receiveCurveName + " curve");
}
// TODO: The convention is only looked up here so that we can convert the spot rate; would be better to request the spot rate using the correct currency pair in the first place
final CurrencyPairs currencyPairs = OpenGammaExecutionContext.getCurrencyPairsSource(executionContext).getCurrencyPairs(CurrencyPairs.DEFAULT_CURRENCY_PAIRS);
final CurrencyPair currencyPair = currencyPairs.getCurrencyPair(payCurrency, receiveCurrency);
final Currency currencyBase = currencyPair.getBase();
final Object spotObject = inputs.getValue(ValueRequirementNames.SPOT_RATE);
if (spotObject == null) {
throw new OpenGammaRuntimeException("Could not get market data for spot rate");
}